Skip to content

Commit d116874

Browse files
dpgeorgeiabdalkader
authored andcommitted
alif/tinyusb_port: Update dcd_init function to match TinyUSB v0.18.0.
These changes correspond to the following TinyUSB commits: - d997f0071ea5d2d07e340d183fffb97e09526773 change dcd_init() to take rhport struct - 1f18be93db39dbc57bbf34f982dbe07e209a2ae3 change the tusb_rhport_init_t struct, exclude the rhport to make API more consistent - e83e08343afca86b2bacf26822ef9032571e6f56 change dcd_init() return from void to bool Signed-off-by: Damien George <damien@micropython.org>
1 parent ee66172 commit d116874

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ports/alif/tinyusb_port/tusb_alif_dcd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ void dcd_uninit(void);
7575

7676
// Initializes the USB peripheral for device mode and enables it.
7777
// This function should enable internal D+/D- pull-up for enumeration.
78-
void dcd_init(uint8_t rhport)
78+
bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init)
7979
{
8080
// enable 20mhz clock
8181
enable_cgu_clk20m();
@@ -172,6 +172,8 @@ void dcd_init(uint8_t rhport)
172172
NVIC_SetPriority(USB_IRQ_IRQn, 5);
173173
#endif
174174
dcd_int_enable(rhport);
175+
176+
return true;
175177
}
176178

177179

0 commit comments

Comments
 (0)