diff options
| author | Ha Thach <[email protected]> | 2023-08-28 17:46:05 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-08-28 17:46:05 +0700 |
| commit | 9063ede25f4a013dae8edccc2d953ba2de7ed684 (patch) | |
| tree | 6f3b8ed3721b60955380514d414228bb567767cb /examples/device/hid_multiple_interface/src/main.c | |
| parent | aa0fabd51d3ed855ccb337602c6a0083bb50f648 (diff) | |
| parent | 7bf5923052e5861f54c9cb0581e328f8be26a0a9 (diff) | |
Merge branch 'master' into nxp_k64
Diffstat (limited to 'examples/device/hid_multiple_interface/src/main.c')
| -rw-r--r-- | examples/device/hid_multiple_interface/src/main.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/examples/device/hid_multiple_interface/src/main.c b/examples/device/hid_multiple_interface/src/main.c index 72240b208..30b4ae055 100644 --- a/examples/device/hid_multiple_interface/src/main.c +++ b/examples/device/hid_multiple_interface/src/main.c @@ -27,7 +27,7 @@ #include <stdio.h> #include <string.h> -#include "bsp/board.h" +#include "bsp/board_api.h" #include "tusb.h" //--------------------------------------------------------------------+ @@ -64,6 +64,10 @@ int main(void) // init device stack on configured roothub port tud_init(BOARD_TUD_RHPORT); + if (board_init_after_tusb) { + board_init_after_tusb(); + } + while (1) { tud_task(); // tinyusb device task @@ -101,7 +105,7 @@ void tud_suspend_cb(bool remote_wakeup_en) // Invoked when usb bus is resumed void tud_resume_cb(void) { - blink_interval_ms = BLINK_MOUNTED; + blink_interval_ms = tud_mounted() ? BLINK_MOUNTED : BLINK_NOT_MOUNTED; } //--------------------------------------------------------------------+ |
