File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,8 @@ static bool automatic_sleep_on = AUTOMATIC_SLEEP_DEFAULT;
128
128
static app_power_mode_t interface_power_mode = kAPP_PowerModeVlls0 ;
129
129
// reset button state count
130
130
static uint16_t gpio_reset_count = 0 ;
131
+ // button state
132
+ static uint8_t reset_pressed = 0 ;
131
133
static bool do_remount = false;
132
134
133
135
static flashConfig_t gflashConfig = {
@@ -273,9 +275,6 @@ static void prerun_board_config(void)
273
275
// Handle the reset button behavior, this function is called in the main task every 30ms
274
276
void handle_reset_button ()
275
277
{
276
- // button state
277
- static uint8_t reset_pressed = 0 ;
278
-
279
278
#ifdef DRAG_N_DROP_SUPPORT
280
279
if (!flash_intf_target -> flash_busy ()) //added checking if flashing on target is in progress
281
280
#endif
@@ -522,7 +521,9 @@ void board_usb_sof_event(void)
522
521
523
522
void board_vfs_stream_closed_hook ()
524
523
{
525
- // Return LED to default ON state
524
+ // Return reset button and LED to default state
525
+ reset_pressed = 0 ;
526
+ power_led_sleep_state_on = PWR_LED_SLEEP_STATE_DEFAULT ;
526
527
main_shutdown_state = MAIN_SHUTDOWN_WAITING ;
527
528
528
529
// Clear any pending I2C response
You can’t perform that action at this time.
0 commit comments