diff options
| author | hathach <[email protected]> | 2024-10-11 15:21:32 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2024-10-11 15:31:49 +0700 |
| commit | d997f0071ea5d2d07e340d183fffb97e09526773 (patch) | |
| tree | d796bbf0db3b860f506554029f4fe019ed892936 /src/portable/ti | |
| parent | 92602b9de3675c2d3e240bcd0838082e1a07b13b (diff) | |
change dcd_init() to take rhport struct
Diffstat (limited to 'src/portable/ti')
| -rw-r--r-- | src/portable/ti/msp430x5xx/dcd_msp430x5xx.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c index 6b60bc657..120d5c4b9 100644 --- a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c +++ b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c @@ -130,9 +130,8 @@ static void enable_functional_reset(const bool enable) /*------------------------------------------------------------------*/ /* Controller API *------------------------------------------------------------------*/ -void dcd_init (uint8_t rhport) -{ - (void) rhport; +void dcd_init(const tusb_rhport_init_t* rh_init) { + (void) rh_init; USBKEYPID = USBKEY; @@ -699,7 +698,12 @@ static void handle_bus_power_event(void *param) { // A successful lock is indicated by all PLL-related interrupt flags being cleared. if(!USBPLLIR) { - dcd_init(0); // Re-initialize the USB module. + const tusb_rhport_init_t rhport_init = { + .rhport = 0, + .role = TUSB_ROLE_DEVICE, + .speed = TUSB_SPEED_FULL + }; + dcd_init(&rhport_init); // Re-initialize the USB module. } } else { // Event caused by removal of bus power. USBPWRCTL |= VBONIE; // Enable bus-power-applied interrupt. |
