Pull the medium-specific pieces out of the common code
Change-Id: I9cd1824a6bf535e285553fbe5f79f6d72919f048
diff --git a/motors/usb/cdc.h b/motors/usb/cdc.h
index 4f5aa33..00eec4c 100644
--- a/motors/usb/cdc.h
+++ b/motors/usb/cdc.h
@@ -49,6 +49,8 @@
size_t Read(void *buffer, size_t buffer_size);
size_t Write(const void *buffer, size_t buffer_size);
+ bool write_queue_empty() const { return tx_queue_.empty(); }
+
private:
enum class NextEndpoint0Out {
kNone,
diff --git a/motors/usb/usb.cc b/motors/usb/usb.cc
index fb7fe9f..36c6456 100644
--- a/motors/usb/usb.cc
+++ b/motors/usb/usb.cc
@@ -91,6 +91,8 @@
} // namespace
+constexpr int UsbDevice::kEndpoint0MaxSize;
+
UsbDevice::UsbDevice(int index, uint16_t vendor_id, uint16_t product_id)
: index_(index) {
// TODO(Brian): Pass index_ into all the register access macros. Also sort out