summaryrefslogtreecommitdiff
path: root/examples/host/hid_controller/src/main.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-10-31 14:21:17 +0700
committerhathach <[email protected]>2025-10-31 14:21:17 +0700
commit6837e47584d2512c8251345e09775075f8159c4d (patch)
tree06224d3b8f75c9536ba909f954f117d23b7b8245 /examples/host/hid_controller/src/main.c
parentcc82e088b5333bae3dba8fb12965271d89cd5117 (diff)
parentfc3857eb1abefff3cf19816e231e549bf75b9dc3 (diff)
Merge branch 'master' into fork/ArcaneNibble/ohci-upstream
Diffstat (limited to 'examples/host/hid_controller/src/main.c')
-rw-r--r--examples/host/hid_controller/src/main.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/examples/host/hid_controller/src/main.c b/examples/host/hid_controller/src/main.c
index f3244db95..fa70d7d1a 100644
--- a/examples/host/hid_controller/src/main.c
+++ b/examples/host/hid_controller/src/main.c
@@ -34,18 +34,15 @@
#include "bsp/board_api.h"
#include "tusb.h"
+#include "app.h"
//--------------------------------------------------------------------+
// MACRO CONSTANT TYPEDEF PROTYPES
//--------------------------------------------------------------------+
void led_blinking_task(void);
-extern void cdc_task(void);
-extern void hid_app_task(void);
-
/*------------- MAIN -------------*/
-int main(void)
-{
+int main(void) {
board_init();
printf("TinyUSB Host HID Controller Example\r\n");
@@ -60,19 +57,11 @@ int main(void)
board_init_after_tusb();
- while (1)
- {
+ while (1) {
// tinyusb host task
tuh_task();
led_blinking_task();
-
-#if CFG_TUH_CDC
- cdc_task();
-#endif
-
-#if CFG_TUH_HID
hid_app_task();
-#endif
}
}
@@ -83,8 +72,7 @@ int main(void)
//--------------------------------------------------------------------+
// Blinking Task
//--------------------------------------------------------------------+
-void led_blinking_task(void)
-{
+void led_blinking_task(void) {
const uint32_t interval_ms = 1000;
static uint32_t start_ms = 0;