summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-05-06 21:09:22 -0700
committerKeith Packard <keithp@keithp.com>2018-05-07 09:21:56 -0700
commitb15549d8c5277ba3aa425e232473a17dc136e5a4 (patch)
tree0287aabf870f45cfe9afa5a848ae101494218d8e /src
parent8efe0d40deded973f08f63eb650a036f9e24d2fb (diff)
altos/stmf0: Toggle IN2 SW_BUF bit when sending data
This tells the hardware we're done writing data to the second input buffer and allows it to be switched from NAK to VALID. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/stmf0/ao_usb_stm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/stmf0/ao_usb_stm.c b/src/stmf0/ao_usb_stm.c
index 483d2419..3d227f20 100644
--- a/src/stmf0/ao_usb_stm.c
+++ b/src/stmf0/ao_usb_stm.c
@@ -1132,6 +1132,9 @@ _ao_usb_in2_send(void)
/* Toggle our usage */
ao_usb_in_tx2_which = 1 - ao_usb_in_tx2_which;
+ /* Toggle the SW_BUF flag */
+ _ao_usb_toggle_dtog(AO_USB_IN2_EPR, 1, 0);
+
/* Mark the outgoing buffer as valid */
_ao_usb_set_stat_tx(AO_USB_IN2_EPR, STM_USB_EPR_STAT_TX_VALID);