summaryrefslogtreecommitdiff
path: root/examples/device/hid_multiple_interface/src/main.c
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-04-29 22:22:59 +0200
committerHiFiPhile <[email protected]>2024-04-29 22:22:59 +0200
commitbf1540af4c3a57245b946c8622454c05e7fc098e (patch)
tree9ed0573097d821696b8775e4826cd555b26bdb1b /examples/device/hid_multiple_interface/src/main.c
parentcba327fc384ae730287b0ab620d1f7ef50b0da3b (diff)
parent1c04d5992a020aefe16ffb2acce62d84d4899395 (diff)
Merge branch 'master' of https://github.com/hathach/tinyusb into pr/2132
Diffstat (limited to 'examples/device/hid_multiple_interface/src/main.c')
-rw-r--r--examples/device/hid_multiple_interface/src/main.c8
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;
}
//--------------------------------------------------------------------+