diff options
| author | Rocky04 <[email protected]> | 2023-08-07 12:04:22 +0000 |
|---|---|---|
| committer | Rocky04 <[email protected]> | 2023-08-07 12:04:22 +0000 |
| commit | 45af3d6a83f89d3b048701f8d6d7de15ebfa0101 (patch) | |
| tree | 71471b18f4ba3f10a306f318b7cc35182df22c73 /examples/device/cdc_msc_freertos/src | |
| parent | 9560d0813f0872a1b8dfb337922b0ab5cc4cb811 (diff) | |
Update examples
Diffstat (limited to 'examples/device/cdc_msc_freertos/src')
| -rw-r--r-- | examples/device/cdc_msc_freertos/src/main.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/device/cdc_msc_freertos/src/main.c b/examples/device/cdc_msc_freertos/src/main.c index 0e8a24d02..457c88d70 100644 --- a/examples/device/cdc_msc_freertos/src/main.c +++ b/examples/device/cdc_msc_freertos/src/main.c @@ -175,7 +175,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_NOT_MOUNTED), 0); + } } //--------------------------------------------------------------------+ |
