Actually use the TTY's RX buffers...
It would've ended poorly if we tried sending and receiving data at the
same time otherwise.
Change-Id: Iaf873f3ded88b8d63eda2970b2c456eb62e534dc
diff --git a/motors/usb/cdc.cc b/motors/usb/cdc.cc
index 0b59aef..5289b78 100644
--- a/motors/usb/cdc.cc
+++ b/motors/usb/cdc.cc
@@ -373,13 +373,13 @@
next_rx_toggle_ = Data01::kData0;
device()->SetBdtEntry(
data_rx_endpoint_, Direction::kRx, EvenOdd::kEven,
- {M_USB_BD_OWN | M_USB_BD_DTS | V_USB_BD_BC(tx_buffers_[0].size()),
- tx_buffers_[0].data()});
+ {M_USB_BD_OWN | M_USB_BD_DTS | V_USB_BD_BC(rx_buffers_[0].size()),
+ rx_buffers_[0].data()});
device()->SetBdtEntry(
data_rx_endpoint_, Direction::kRx, EvenOdd::kOdd,
- {M_USB_BD_OWN | M_USB_BD_DTS | V_USB_BD_BC(tx_buffers_[1].size()) |
+ {M_USB_BD_OWN | M_USB_BD_DTS | V_USB_BD_BC(rx_buffers_[1].size()) |
M_USB_BD_DATA1,
- tx_buffers_[1].data()});
+ rx_buffers_[1].data()});
}
}