sysctl: add ACM_ENABLED and FACTORY_MODE defines

This commit is contained in:
Lukas F. Hartmann 2024-05-03 17:34:05 +02:00
parent 42af610c64
commit f672e06748
No known key found for this signature in database
GPG Key ID: 376511EB67AD7BAF
1 changed files with 8 additions and 0 deletions

View File

@ -1197,6 +1197,12 @@ int main() {
sleep_ms(5000); sleep_ms(5000);
#ifdef FACTORY_MODE
// in factory mode, turn on power immediately to be able to flash
// the keyboard
turn_som_power_on();
#endif
printf("# [pocket_sysctl] entering main loop.\n"); printf("# [pocket_sysctl] entering main loop.\n");
while (true) { while (true) {
@ -1207,6 +1213,7 @@ int main() {
handle_spi_commands(); handle_spi_commands();
#ifdef ACM_ENABLED
// handle commands over usb serial // handle commands over usb serial
int usb_c = getchar_timeout_us(0); int usb_c = getchar_timeout_us(0);
if (usb_c != PICO_ERROR_TIMEOUT) { if (usb_c != PICO_ERROR_TIMEOUT) {
@ -1221,6 +1228,7 @@ int main() {
print_pack_info = !print_pack_info; print_pack_info = !print_pack_info;
} }
} }
#endif
if (state == 0) { if (state == 0) {
gpio_put(PIN_LED_R, 0); gpio_put(PIN_LED_R, 0);