fix(pa01): SD storage hangs after copy a large file (#6783)
Co-authored-by: 3djc <3djc@gh.com>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
bool boardBLStartCondition()
|
||||
{
|
||||
// Trims combo activated
|
||||
pollKeys();
|
||||
bool result = (readTrims() == BOOTLOADER_KEYS);
|
||||
#if defined(SECONDARY_BOOTLOADER_KEYS)
|
||||
result |= (readTrims() == SECONDARY_BOOTLOADER_KEYS);
|
||||
|
||||
@@ -34,6 +34,10 @@ __weak void keysInit()
|
||||
_init_trims();
|
||||
}
|
||||
|
||||
__weak void pollKeys()
|
||||
{
|
||||
}
|
||||
|
||||
__weak uint32_t readKeys()
|
||||
{
|
||||
return _read_keys();
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
#include "debug.h"
|
||||
|
||||
extern const stm32_switch_t* boardGetSwitchDef(uint8_t idx);
|
||||
extern bool suspendI2CTasks;
|
||||
|
||||
struct bsp_io_expander {
|
||||
pca95xx_t exp;
|
||||
@@ -108,6 +109,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