Update examples

This commit is contained in:
Rocky04
2023-08-07 12:04:22 +00:00
parent 9560d0813f
commit 45af3d6a83
20 changed files with 34 additions and 20 deletions

View File

@@ -176,7 +176,14 @@ void tud_suspend_cb(bool remote_wakeup_en)
// Invoked when usb bus is resumed
void tud_resume_cb(void)
{
xTimerChangePeriod(blinky_tm, pdMS_TO_TICKS(BLINK_MOUNTED), 0);
if (tud_mounted())
{
xTimerChangePeriod(blinky_tm, pdMS_TO_TICKS(BLINK_MOUNTED), 0);
}
else
{
xTimerChangePeriod(blinky_tm, pdMS_TO_TICKS(BLINK_SUSPENDED), 0);
}
}
//--------------------------------------------------------------------+