change tusb_init(), tusb_rhport_init() to use init struct for expandability
This commit is contained in:
@@ -78,7 +78,12 @@ int main(void) {
|
||||
printf("TinyUSB Host MassStorage Explorer Example\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();
|
||||
|
Reference in New Issue
Block a user