summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2020-07-23 06:36:20 +0700
committerGitHub <[email protected]>2020-07-23 06:36:20 +0700
commit72c5167fa5a57e57aa1047c7046a3d2354a1b610 (patch)
treef081ff213fcc5763534bf2633bab2b4ec511624f /src
parent7d2fc124452d6ec2d5d45bdacc4fc8b38d03d0d0 (diff)
parent0407cfe16c7b9736da2ff36c69232e7c3f470864 (diff)
Merge pull request #470 from hathach/fix-samd21-missing-setup
fix samd21 race condition with setup packet
Diffstat (limited to 'src')
-rw-r--r--src/portable/microchip/samd/dcd_samd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/portable/microchip/samd/dcd_samd.c b/src/portable/microchip/samd/dcd_samd.c
index 45bff2511..d0cc8560a 100644
--- a/src/portable/microchip/samd/dcd_samd.c
+++ b/src/portable/microchip/samd/dcd_samd.c
@@ -43,6 +43,8 @@ static inline void prepare_setup(void)
{
// Only make sure the EP0 OUT buffer is ready
sram_registers[0][0].ADDR.reg = (uint32_t) _setup_packet;
+ sram_registers[0][0].PCKSIZE.bit.MULTI_PACKET_SIZE = sizeof(_setup_packet);
+ sram_registers[0][0].PCKSIZE.bit.BYTE_COUNT = 0;
}
// Setup the control endpoint 0.