summaryrefslogtreecommitdiff
path: root/examples/device/hid_multiple_interface/src/main.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-04-09 20:26:26 +0700
committerhathach <[email protected]>2024-04-09 22:04:43 +0700
commit2bce68a065aa873ffd738b5a90639b3b4b18d2c2 (patch)
treec1a2bfc42a3be56b4751969681005665dfaf90ad /examples/device/hid_multiple_interface/src/main.c
parent75cf8e21a7e525eb24b7fd34fe5859cba331fcc2 (diff)
parent68a08e33d2a1a3b02a28c616bc825eb674700833 (diff)
Merge branch 'master' into dwc2-interrupts
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;
}
//--------------------------------------------------------------------+