change the tusb_rhport_init_t struct, exclude the rhport to make API more consistent

This commit is contained in:
hathach
2024-10-14 18:27:52 +07:00
parent 1587d48e89
commit 1f18be93db
89 changed files with 174 additions and 213 deletions

View File

@@ -127,12 +127,11 @@ static void usb_host_task(void *param) {
// init host stack on configured roothub port
tusb_rhport_init_t host_init = {
.rhport = BOARD_TUH_RHPORT,
.role = TUSB_ROLE_HOST,
.speed = TUSB_SPEED_AUTO
};
if (!tusb_init(&host_init)) {
if (!tusb_init(BOARD_TUH_RHPORT, &host_init)) {
printf("Failed to init USB Host Stack\r\n");
vTaskSuspend(NULL);
}