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/microchip | |
| parent | 92602b9de3675c2d3e240bcd0838082e1a07b13b (diff) | |
change dcd_init() to take rhport struct
Diffstat (limited to 'src/portable/microchip')
| -rw-r--r-- | src/portable/microchip/pic/dcd_pic.c | 4 | ||||
| -rw-r--r-- | src/portable/microchip/pic32mz/dcd_pic32mz.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/microchip/pic/dcd_pic.c b/src/portable/microchip/pic/dcd_pic.c index ccc27c3c9..3ee0ab6d5 100644 --- a/src/portable/microchip/pic/dcd_pic.c +++ b/src/portable/microchip/pic/dcd_pic.c @@ -470,8 +470,8 @@ static void process_bus_resume(uint8_t rhport) /*------------------------------------------------------------------*/ /* Device API *------------------------------------------------------------------*/ -void dcd_init(uint8_t rhport) -{ +void dcd_init(const tusb_rhport_init_t* rh_init) { + const uint8_t rhport = rh_init->rhport; intr_disable(rhport); intr_clear(rhport); diff --git a/src/portable/microchip/pic32mz/dcd_pic32mz.c b/src/portable/microchip/pic32mz/dcd_pic32mz.c index 9ad755670..004990046 100644 --- a/src/portable/microchip/pic32mz/dcd_pic32mz.c +++ b/src/portable/microchip/pic32mz/dcd_pic32mz.c @@ -120,8 +120,8 @@ static ep0_stage_t ep0_get_stage(void) /*------------------------------------------------------------------*/ /* Controller API *------------------------------------------------------------------*/ -void dcd_init(uint8_t rhport) -{ +void dcd_init(const tusb_rhport_init_t* rh_init) { + const uint8_t rhport = rh_init->rhport; // Disable endpoint interrupts for now USB_REGS->INTRRXEbits.w = 0; USB_REGS->INTRTXEbits.w = 0; |
