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>
This commit is contained in:
Damien George
2025-09-29 11:26:39 +10:00
parent aacad2dd65
commit ac4649da6e

View File

@@ -75,7 +75,7 @@ void dcd_uninit(void);
// Initializes the USB peripheral for device mode and enables it.
// This function should enable internal D+/D- pull-up for enumeration.
void dcd_init(uint8_t rhport)
bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init)
{
// enable 20mhz clock
enable_cgu_clk20m();
@@ -172,6 +172,8 @@ void dcd_init(uint8_t rhport)
NVIC_SetPriority(USB_IRQ_IRQn, 5);
#endif
dcd_int_enable(rhport);
return true;
}