diff options
| author | HiFiPhile <[email protected]> | 2024-04-26 13:12:56 +0200 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-04-26 13:12:56 +0200 |
| commit | 9ef3755f0316d25864d3ac3a49a2523eabfddf8a (patch) | |
| tree | 4fb337482662308674101d5269192b7a4fe58f91 /examples/device/hid_multiple_interface/src/main.c | |
| parent | f88a5bb03b2504df272d2cd285b17e66f11dfc64 (diff) | |
| parent | 69313ef45564cc8967575f47fb8c57371cbea470 (diff) | |
Merge branch 'master' of https://github.com/hathach/tinyusb into pr/2283
Diffstat (limited to 'examples/device/hid_multiple_interface/src/main.c')
| -rw-r--r-- | examples/device/hid_multiple_interface/src/main.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/device/hid_multiple_interface/src/main.c b/examples/device/hid_multiple_interface/src/main.c index 29ba74398..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 @@ -71,8 +75,6 @@ int main(void) hid_task(); } - - return 0; } //--------------------------------------------------------------------+ @@ -103,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; } //--------------------------------------------------------------------+ |
