diff options
| author | hathach <[email protected]> | 2025-11-18 10:18:27 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-11-18 10:18:27 +0700 |
| commit | 6c140930591fd49725a1ec1434dfb841560bc6ae (patch) | |
| tree | 8433576ea573a2f6f5d88ff309716f3ad5538f05 /examples/host/hid_controller/src/main.c | |
| parent | 619ef71fdb5da5dbfabe76189ead4ab97837ec12 (diff) | |
| parent | 66c84528f67c0eedc23d25221500d820e702d93f (diff) | |
Merge branch 'master' into fork/HiFiPhile/xfer_close
Diffstat (limited to 'examples/host/hid_controller/src/main.c')
| -rw-r--r-- | examples/host/hid_controller/src/main.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/examples/host/hid_controller/src/main.c b/examples/host/hid_controller/src/main.c index ba12774bd..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"); @@ -58,23 +55,13 @@ int main(void) }; tusb_init(BOARD_TUH_RHPORT, &host_init); - if (board_init_after_tusb) { - board_init_after_tusb(); - } + 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 } } @@ -85,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; |
