fix(pa01): SD storage hangs after copy a large file (#6783)
Co-authored-by: 3djc <3djc@gh.com>
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#define IO_RESET_GPIO GPIO_PIN(GPIOE, 15)
|
||||
|
||||
extern const stm32_switch_t* boardGetSwitchDef(uint8_t idx);
|
||||
extern bool suspendI2CTasks;
|
||||
|
||||
struct bsp_io_expander {
|
||||
pca95xx_t exp;
|
||||
@@ -84,6 +85,9 @@ static void _poll_switches(void *param1, uint32_t trigger_source)
|
||||
timer_reset(&_poll_timer);
|
||||
}
|
||||
|
||||
// Suspend hardware reads when required
|
||||
if (suspendI2CTasks) return;
|
||||
|
||||
_read_io_expander(&_io_switches);
|
||||
_read_io_expander(&_io_fs_switches);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user