change the tusb_rhport_init_t struct, exclude the rhport to make API more consistent

This commit is contained in:
hathach
2024-10-14 18:27:52 +07:00
parent 1587d48e89
commit 1f18be93db
89 changed files with 174 additions and 213 deletions

View File

@@ -650,10 +650,10 @@ static bool check_dwc2(dwc2_regs_t* dwc2) {
return true;
}
void dcd_init(const tusb_rhport_init_t* rh_init) {
void dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
(void) rhport; (void) rh_init;
// Programming model begins in the last section of the chapter on the USB
// peripheral in each Reference Manual.
const uint8_t rhport = rh_init->rhport;
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
// Check Synopsys ID register, failed if controller clock/power is not enabled