Add a simple HID device
It currently has a hard-coded report of 4 2-byte joystick values
plus 8 buttons.
Also fix a few things I noticed in the CDC code while working on the HID
code.
Change-Id: Icce6c6ad686fdf974924daab6cb40b7b7d0f7996
diff --git a/motors/usb/cdc.h b/motors/usb/cdc.h
index f7c7437..4f5aa33 100644
--- a/motors/usb/cdc.h
+++ b/motors/usb/cdc.h
@@ -63,9 +63,6 @@
// for it.
static constexpr uint16_t kStatusMaxPacketSize = 1;
- ::std::array<::std::array<char, kDataMaxPacketSize>, 2> tx_buffers_,
- rx_buffers_;
-
void Initialize() override;
SetupResponse HandleEndpoint0SetupPacket(
@@ -99,6 +96,9 @@
void EnqueueTxData(const DisableInterrupts &);
+ ::std::array<::std::array<char, kDataMaxPacketSize>, 2> tx_buffers_,
+ rx_buffers_;
+
// In theory, we could sent notifications over this about things like the line
// state, but we don't have anything to report so we pretty much just ignore
// this.