diff options
| author | HiFiPhile <[email protected]> | 2024-10-30 19:36:05 +0100 |
|---|---|---|
| committer | HiFiPhile <[email protected]> | 2024-10-30 19:47:03 +0100 |
| commit | 85ff529a310b7e6ec2e4234e3e292fef6432882b (patch) | |
| tree | 41218fce4db7c23df1073dfdd42fb017c3cf0158 /examples/host/bare_api/src | |
| parent | 418b8b2f133d695362c735f271c966af10b5d251 (diff) | |
| parent | 8b1e40c3e2447de5b4a86bbcdcc0344946a4793d (diff) | |
Merge branch 'master' into dcd_notif
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'examples/host/bare_api/src')
| -rw-r--r-- | examples/host/bare_api/src/main.c | 11 | ||||
| -rw-r--r-- | examples/host/bare_api/src/tusb_config.h | 6 |
2 files changed, 9 insertions, 8 deletions
diff --git a/examples/host/bare_api/src/main.c b/examples/host/bare_api/src/main.c index 940840a30..f582f4f5a 100644 --- a/examples/host/bare_api/src/main.c +++ b/examples/host/bare_api/src/main.c @@ -23,10 +23,6 @@ * */ -/* This example current worked and tested with following controller - * - Sony DualShock 4 [CUH-ZCT2x] VID = 0x054c, PID = 0x09cc - */ - #include <stdlib.h> #include <stdio.h> @@ -34,6 +30,7 @@ #include "bsp/board_api.h" #include "tusb.h" +#include "class/hid/hid.h" // English #define LANGUAGE_ID 0x0409 @@ -65,7 +62,11 @@ int main(void) printf("TinyUSB Bare API Example\r\n"); // init host stack on configured roothub port - tuh_init(BOARD_TUH_RHPORT); + tusb_rhport_init_t host_init = { + .role = TUSB_ROLE_HOST, + .speed = TUSB_SPEED_AUTO + }; + tusb_init(BOARD_TUH_RHPORT, &host_init); if (board_init_after_tusb) { board_init_after_tusb(); diff --git a/examples/host/bare_api/src/tusb_config.h b/examples/host/bare_api/src/tusb_config.h index 432446e94..fab233be0 100644 --- a/examples/host/bare_api/src/tusb_config.h +++ b/examples/host/bare_api/src/tusb_config.h @@ -23,8 +23,8 @@ * */ -#ifndef _TUSB_CONFIG_H_ -#define _TUSB_CONFIG_H_ +#ifndef TUSB_CONFIG_H_ +#define TUSB_CONFIG_H_ #ifdef __cplusplus extern "C" { @@ -118,4 +118,4 @@ } #endif -#endif /* _TUSB_CONFIG_H_ */ +#endif |
