diff options
| author | hathach <[email protected]> | 2019-03-30 02:26:15 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2019-03-30 02:26:15 +0700 |
| commit | 93a853cd5b5a7840536939d5a43c5ea3a0dcdfc3 (patch) | |
| tree | 5937c57910ae79078ab9d729c3397916eac9d497 /examples | |
| parent | 28610198dfe70e98d3c2dcadb229f5ff12e2faf1 (diff) | |
usbd add connected, suspended, remote_wakeup
- remove use of osal_queue_reset
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/device/cdc_msc_hid/src/main.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/device/cdc_msc_hid/src/main.c b/examples/device/cdc_msc_hid/src/main.c index 53161fe83..1fa0fead1 100644 --- a/examples/device/cdc_msc_hid/src/main.c +++ b/examples/device/cdc_msc_hid/src/main.c @@ -38,7 +38,7 @@ /* Blink pattern * - 250 ms : device not mounted * - 1000 ms : device mounted - * - 2000 ms : device is suspended + * - 2500 ms : device is suspended */ static uint32_t blink_interval_ms = 250; @@ -210,6 +210,18 @@ void tud_umount_cb(void) blink_interval_ms = 250; } +// Invoked when device is suspended +void tud_suspend_cb(bool remote_wakeup_en) +{ + (void) remote_wakeup_en; + blink_interval_ms = 2500; +} + +void tud_resume_cb(void) +{ + blink_interval_ms = 1000; +} + //--------------------------------------------------------------------+ // BLINKING TASK //--------------------------------------------------------------------+ |
