summaryrefslogtreecommitdiff
path: root/src/portable/ti
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-10-14 18:27:52 +0700
committerhathach <[email protected]>2024-10-14 18:27:52 +0700
commit1f18be93db39dbc57bbf34f982dbe07e209a2ae3 (patch)
tree4da021608772f07fba9105da956112e495d9eeb9 /src/portable/ti
parent1587d48e89cbaa8d0d1c870809bc40c3c8d1056f (diff)
change the tusb_rhport_init_t struct, exclude the rhport to make API more consistent
Diffstat (limited to 'src/portable/ti')
-rw-r--r--src/portable/ti/msp430x5xx/dcd_msp430x5xx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
index 120d5c4b9..6150c254f 100644
--- a/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
+++ b/src/portable/ti/msp430x5xx/dcd_msp430x5xx.c
@@ -130,8 +130,8 @@ static void enable_functional_reset(const bool enable)
/*------------------------------------------------------------------*/
/* Controller API
*------------------------------------------------------------------*/
-void dcd_init(const tusb_rhport_init_t* rh_init) {
- (void) rh_init;
+void dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
+ (void) rhport; (void) rh_init;
USBKEYPID = USBKEY;
@@ -699,11 +699,10 @@ static void handle_bus_power_event(void *param) {
// A successful lock is indicated by all PLL-related interrupt flags being cleared.
if(!USBPLLIR) {
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.
+ dcd_init(0, &rhport_init); // Re-initialize the USB module.
}
} else { // Event caused by removal of bus power.
USBPWRCTL |= VBONIE; // Enable bus-power-applied interrupt.