summaryrefslogtreecommitdiff
path: root/src/portable/synopsys
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-10-26 01:44:04 +0700
committerGitHub <[email protected]>2025-10-26 01:44:04 +0700
commit96d510978eafb1b43344acf0ba52260c3bdb9f81 (patch)
tree88e1c0a8b33dd136f96486a88aaebb98cdc84c9f /src/portable/synopsys
parentac37176cec68a26a308c67b238cbf8901b3f1f29 (diff)
parent42f000df8e52cfe0a46867a5e1fa5817cd58bc8a (diff)
Merge pull request #3318 from hathach/static-analysis
Static analysis
Diffstat (limited to 'src/portable/synopsys')
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index f1e4dbd77..8560b2109 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -379,7 +379,7 @@ static void edpt_schedule_packets(uint8_t rhport, const uint8_t epnum, const uin
// Enable tx fifo empty interrupt only if there is data. Note must after depctl enable
if (dir == TUSB_DIR_IN && total_bytes != 0) {
- dwc2->diepempmsk |= (1 << epnum);
+ dwc2->diepempmsk |= (1u << epnum);
}
}
}
@@ -402,7 +402,7 @@ bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
// Set device max speed
uint32_t dcfg = dwc2->dcfg & ~DCFG_DSPD_Msk;
if (is_highspeed) {
- dcfg |= DCFG_DSPD_HS << DCFG_DSPD_Pos;
+ // dcfg Highspeed's mask is 0
// XCVRDLY: transceiver delay between xcvr_sel and txvalid during device chirp is required
// when using with some PHYs such as USB334x (USB3341, USB3343, USB3346, USB3347)
@@ -914,7 +914,7 @@ static void handle_epin_slave(uint8_t rhport, uint8_t epnum, dwc2_diepint_t diep
// Turn off TXFE if all bytes are written.
tsiz.value = epin->tsiz;
if (tsiz.xfer_size == 0) {
- dwc2->diepempmsk &= ~(1 << epnum);
+ dwc2->diepempmsk &= ~(1u << epnum);
}
}
}