summaryrefslogtreecommitdiff
path: root/src/portable/synopsys
diff options
context:
space:
mode:
authorhathach <[email protected]>2024-10-14 19:42:22 +0700
committerhathach <[email protected]>2024-10-14 19:42:22 +0700
commite83e08343afca86b2bacf26822ef9032571e6f56 (patch)
treef7c11374731a6aa9352464f065169d30d28d16c2 /src/portable/synopsys
parent1f18be93db39dbc57bbf34f982dbe07e209a2ae3 (diff)
change dcd_init() return from void to bool
Diffstat (limited to 'src/portable/synopsys')
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index e44ca96d1..f30ec5ee3 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -650,14 +650,15 @@ static bool check_dwc2(dwc2_regs_t* dwc2) {
return true;
}
-void dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
- (void) rhport; (void) rh_init;
+bool 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.
dwc2_regs_t* dwc2 = DWC2_REG(rhport);
// Check Synopsys ID register, failed if controller clock/power is not enabled
- TU_ASSERT(check_dwc2(dwc2), );
+ TU_ASSERT(check_dwc2(dwc2));
dcd_disconnect(rhport);
if (phy_hs_supported(dwc2)) {
@@ -726,6 +727,8 @@ void dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
// TU_LOG_HEX(DWC2_DEBUG, dwc2->gahbcfg);
dcd_connect(rhport);
+
+ return true;
}
void dcd_int_enable(uint8_t rhport) {