From f672e06748bd7f24c3f81e1a0d5b9b0f4103b67a Mon Sep 17 00:00:00 2001 From: "Lukas F. Hartmann" Date: Fri, 3 May 2024 17:34:05 +0200 Subject: [PATCH] sysctl: add ACM_ENABLED and FACTORY_MODE defines --- pocket-reform-sysctl-fw/sysctl.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pocket-reform-sysctl-fw/sysctl.c b/pocket-reform-sysctl-fw/sysctl.c index aa1421d..89ff2bf 100644 --- a/pocket-reform-sysctl-fw/sysctl.c +++ b/pocket-reform-sysctl-fw/sysctl.c @@ -1197,6 +1197,12 @@ int main() { 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"); while (true) { @@ -1207,6 +1213,7 @@ int main() { handle_spi_commands(); +#ifdef ACM_ENABLED // handle commands over usb serial int usb_c = getchar_timeout_us(0); if (usb_c != PICO_ERROR_TIMEOUT) { @@ -1221,6 +1228,7 @@ int main() { print_pack_info = !print_pack_info; } } +#endif if (state == 0) { gpio_put(PIN_LED_R, 0);