File tree Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Expand file tree Collapse file tree 3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 4141 #define SEL_CLEAR_FLASH_STORAGE_MENU_LEN 2
4242#endif
4343
44+ bool suspendI2CTasks = false ;
45+
4446void pollInputs ()
4547{
4648 keysPollingCycle ();
@@ -109,6 +111,7 @@ void bootloaderMenu()
109111 if (usbPlugged ()) {
110112 state = ST_USB;
111113#if !defined(SIMU)
114+ suspendI2CTasks = true ;
112115 usbStart ();
113116#endif
114117 }
@@ -119,6 +122,7 @@ void bootloaderMenu()
119122 vpos = 0 ;
120123#if !defined(SIMU)
121124 usbStop ();
125+ suspendI2CTasks = false ;
122126#endif
123127 state = ST_START;
124128 }
Original file line number Diff line number Diff line change 3434
3535#define FRAME_INTERVAL_MS 20
3636
37+ bool suspendI2CTasks = false ;
38+
3739void bootloaderUF2 ()
3840{
3941 BootloaderState state = ST_START;
@@ -71,6 +73,7 @@ void bootloaderUF2()
7173 if (usbPlugged ()) {
7274 state = ST_USB;
7375#if !defined(SIMU)
76+ suspendI2CTasks = true ;
7477 usbStart ();
7578#endif
7679 } else if (pwrOffPressed ()) {
@@ -83,6 +86,8 @@ void bootloaderUF2()
8386 if (usbPlugged () == 0 ) {
8487#if !defined(SIMU)
8588 usbStop ();
89+ suspendI2CTasks = false ;
90+
8691#endif
8792 state = (state == ST_FLASH_DONE) ? ST_REBOOT : ST_START;
8893 } else {
Original file line number Diff line number Diff line change @@ -104,6 +104,7 @@ uint8_t latencyToggleSwitch = 0;
104104#endif
105105
106106volatile uint8_t rtc_count = 0 ;
107+ bool suspendI2CTasks = false ;
107108
108109#if defined(DEBUG_LATENCY)
109110void toggleLatencySwitch ()
@@ -169,8 +170,6 @@ void checkValidMCU(void)
169170static bool evalFSok = false ;
170171#endif
171172
172- bool suspendI2CTasks = false ;
173-
174173void per10ms ()
175174{
176175 DEBUG_TIMER_START (debugTimerPer10ms);
You can’t perform that action at this time.
0 commit comments