summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZixun LI <[email protected]>2026-02-22 13:33:29 +0100
committerGitHub <[email protected]>2026-02-22 13:33:29 +0100
commite947af26c62fe8717f754e072a18e9e24f33ca96 (patch)
treed5d17d57994d3ec2a3a2a18a71141f792c31063f /src
parentb585df168a3489845cda3cb732560d4fe260e609 (diff)
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/host/usbh.h2
-rw-r--r--src/portable/synopsys/dwc2/hcd_dwc2.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/host/usbh.h b/src/host/usbh.h
index 2f332b442..143d36f8c 100644
--- a/src/host/usbh.h
+++ b/src/host/usbh.h
@@ -110,7 +110,7 @@ typedef struct {
} tuh_configure_fsdev_t;
typedef struct {
- bool use_hs_phy; // Always use high-speed ULPI/UTMI phy even working at full-speed
+ bool use_hs_phy; // Always use high-speed ULPI/UTMI phy even when working at full-speed
} tuh_configure_dwc2_t;
typedef union {
diff --git a/src/portable/synopsys/dwc2/hcd_dwc2.c b/src/portable/synopsys/dwc2/hcd_dwc2.c
index c9ea144c8..ac6fcceb1 100644
--- a/src/portable/synopsys/dwc2/hcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/hcd_dwc2.c
@@ -395,7 +395,8 @@ static void dfifo_host_init(uint8_t rhport) {
bool hcd_configure(uint8_t rhport, uint32_t cfg_id, const void* cfg_param) {
(void) rhport;
TU_VERIFY(cfg_id == TUH_CFGID_DWC2 && cfg_param != NULL);
- _tuh_cfg = *(const tuh_configure_dwc2_t *)cfg_param;
+ tuh_configure_param_t const* cfg = (tuh_configure_param_t const*) cfg_param;
+ _tuh_cfg = cfg->dwc2;
return true;
}