summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-11-21 15:00:36 +0700
committerhathach <[email protected]>2018-11-21 15:00:36 +0700
commit3cad1d11341bb70612ce94559bd93c21bc43b498 (patch)
treed93c4d5f288ec743d1ae1cb4f1ca994c2b4f195d /src
parenta30dfa33244c3db1a3987dc9f75e4aae9b192d63 (diff)
samd21 work well with cdc
Diffstat (limited to 'src')
-rw-r--r--src/portable/microchip/samd21/dcd_samd21.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/portable/microchip/samd21/dcd_samd21.c b/src/portable/microchip/samd21/dcd_samd21.c
index 81e37abcc..0102685d2 100644
--- a/src/portable/microchip/samd21/dcd_samd21.c
+++ b/src/portable/microchip/samd21/dcd_samd21.c
@@ -56,11 +56,9 @@ enum
MAX_PACKET_SIZE = 64,
};
-static UsbDeviceDescBank sram_registers[8][2];
+static ATTR_ALIGNED(4) UsbDeviceDescBank sram_registers[8][2];
static ATTR_ALIGNED(4) uint8_t _setup_packet[8];
-volatile uint32_t setup_count = 0;
-
// Setup the control endpoint 0.
static void bus_reset(void) {
// Max size of packets is 64 bytes.
@@ -75,7 +73,6 @@ static void bus_reset(void) {
// Prepare for setup packet
dcd_edpt_xfer(0, 0, _setup_packet, sizeof(_setup_packet));
- setup_count = 0;
}
@@ -255,7 +252,6 @@ static bool maybe_handle_setup_packet(void) {
// This copies the data elsewhere so we can reuse the buffer.
dcd_event_setup_received(0, (uint8_t*) sram_registers[0][0].ADDR.reg, true);
- setup_count += 1;
return true;
}
return false;