summaryrefslogtreecommitdiff
path: root/examples/host/bare_api
diff options
context:
space:
mode:
Diffstat (limited to 'examples/host/bare_api')
-rw-r--r--examples/host/bare_api/src/main.c11
-rw-r--r--examples/host/bare_api/src/tusb_config.h6
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