aboutsummaryrefslogtreecommitdiffstats
path: root/src/stm32
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2023-10-04 18:49:46 -0400
committerKevin O'Connor <kevin@koconnor.net>2023-10-04 18:49:46 -0400
commit615db729e7f35949860f0c9791d6124e1a8fb725 (patch)
tree9f68781cccca3aa394950db0e18c7ab94c553fad /src/stm32
parent6adff3954b149877c8a587893b18b291e34856b2 (diff)
downloadkutter-615db729e7f35949860f0c9791d6124e1a8fb725.tar.gz
kutter-615db729e7f35949860f0c9791d6124e1a8fb725.tar.xz
kutter-615db729e7f35949860f0c9791d6124e1a8fb725.zip
stm32: Only enable one direction on usbfs double buffered end points
The bulk out endpoint should not be enabled in tx mode, and the bulk in endpoint should not be enabled in rx mode. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32')
-rw-r--r--src/stm32/usbfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stm32/usbfs.c b/src/stm32/usbfs.c
index d166fbb7..4349b6af 100644
--- a/src/stm32/usbfs.c
+++ b/src/stm32/usbfs.c
@@ -342,12 +342,12 @@ usb_reset(void)
ep = USB_CDC_EP_BULK_OUT;
USB_EPR[ep] = (USB_CDC_EP_BULK_OUT | USB_EP_BULK | USB_EP_KIND
- | USB_EP_RX_VALID | USB_EP_TX_NAK | USB_EP_DTOG_TX);
+ | USB_EP_RX_NAK | USB_EP_DTOG_TX);
bulk_out_push_flag = USB_EP_DTOG_TX;
ep = USB_CDC_EP_BULK_IN;
USB_EPR[ep] = (USB_CDC_EP_BULK_IN | USB_EP_BULK | USB_EP_KIND
- | USB_EP_RX_NAK | USB_EP_TX_NAK);
+ | USB_EP_TX_NAK);
bulk_in_pop_flag = USB_EP_DTOG_RX;
USB->CNTR = USB_CNTR_CTRM | USB_CNTR_RESETM;