summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-05-09 13:55:18 +0200
committerHiFiPhile <[email protected]>2024-05-09 13:55:18 +0200
commit1cab553f4bcb6633face4f50f03192928a68f751 (patch)
tree3ec7840e56cb9a59309e8d3e0c27e0a565a12ff6 /src
parentfd1cde9b894e5312e6c6f9da63cfea5aa05d83d2 (diff)
Format.
Diffstat (limited to 'src')
-rw-r--r--src/portable/wch/dcd_ch32_usbhs.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/portable/wch/dcd_ch32_usbhs.c b/src/portable/wch/dcd_ch32_usbhs.c
index 41c1d8c7c..68e2179e9 100644
--- a/src/portable/wch/dcd_ch32_usbhs.c
+++ b/src/portable/wch/dcd_ch32_usbhs.c
@@ -135,15 +135,12 @@ void dcd_remote_wakeup(uint8_t rhport)
(void) rhport;
}
-void dcd_sof_enable(uint8_t rhport, bool en)
+void dcd_sof_enable(uint8_t rhport, bool en)
{
(void) rhport;
- if (en)
- {
+ if (en) {
USBHSD->INT_EN |= USBHS_SOF_ACT_EN;
- }
- else
- {
+ } else {
USBHSD->INT_EN &= ~(USBHS_SOF_ACT_EN);
}
}
@@ -347,6 +344,7 @@ void dcd_int_handler(uint8_t rhport) {
if (rx_token == PID_SOF) {
dcd_event_sof(rhport, USBHSD->FRAME_NO, true);
+
} else if (rx_token == PID_OUT) {
uint16_t rx_len = USBHSD->RX_LEN;