diff options
| author | Damien George <damien@micropython.org> | 2025-09-29 11:26:39 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2025-10-06 11:56:29 +1100 |
| commit | ac4649da6e8328d8e80f4a95156f47d9258a29bf (patch) | |
| tree | b5f10fa70e721df808aa6e2fe2864eff71809d57 | |
| parent | aacad2dd652c6aa7cae5510fad30e341b39c61b2 (diff) | |
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>
| -rw-r--r-- | ports/alif/tinyusb_port/tusb_alif_dcd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ports/alif/tinyusb_port/tusb_alif_dcd.c b/ports/alif/tinyusb_port/tusb_alif_dcd.c index cae0be8d8..c8f86082d 100644 --- a/ports/alif/tinyusb_port/tusb_alif_dcd.c +++ b/ports/alif/tinyusb_port/tusb_alif_dcd.c @@ -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; } |
