diff options
| author | hathach <[email protected]> | 2024-10-11 12:58:18 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-10-11 13:41:53 +0700 |
| commit | 92602b9de3675c2d3e240bcd0838082e1a07b13b (patch) | |
| tree | 69c07f1d49d9d37223a679f1956ba7c8588bdcb6 /examples/host/hid_controller | |
| parent | a4fb8354e41b2604f66e7da22afa292b1a44f0a2 (diff) | |
change tusb_init(), tusb_rhport_init() to use init struct for expandability
Diffstat (limited to 'examples/host/hid_controller')
| -rw-r--r-- | examples/host/hid_controller/src/main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/examples/host/hid_controller/src/main.c b/examples/host/hid_controller/src/main.c index 76b686683..6db47792c 100644 --- a/examples/host/hid_controller/src/main.c +++ b/examples/host/hid_controller/src/main.c @@ -52,7 +52,12 @@ int main(void) printf("Note: Events only displayed for explicit supported controllers\r\n"); // init host stack on configured roothub port - tusb_init(BOARD_TUH_RHPORT, TUSB_ROLE_HOST); + tusb_rhport_init_t host_init = { + .rhport = BOARD_TUH_RHPORT, + .role = TUSB_ROLE_HOST, + .speed = TUSB_SPEED_AUTO + }; + tusb_init(&host_init); if (board_init_after_tusb) { board_init_after_tusb(); |
