summaryrefslogtreecommitdiff
path: root/src/portable/microchip/samd
diff options
context:
space:
mode:
authorhathach <[email protected]>2021-10-24 13:11:21 +0700
committerhathach <[email protected]>2021-10-24 13:11:21 +0700
commit5af989384bd95dbf16f824bcc48e56f3ea283080 (patch)
tree6bf7c17387612edfb8ea1bd010472db291addc32 /src/portable/microchip/samd
parent6f5b197a98545c70efeeb4adcad0d41a3d30a57c (diff)
remove ep descriptor wMaxPacketSize bitfield due to endian issue
Diffstat (limited to 'src/portable/microchip/samd')
-rw-r--r--src/portable/microchip/samd/dcd_samd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/portable/microchip/samd/dcd_samd.c b/src/portable/microchip/samd/dcd_samd.c
index 526a6fb63..46aabc5aa 100644
--- a/src/portable/microchip/samd/dcd_samd.c
+++ b/src/portable/microchip/samd/dcd_samd.c
@@ -214,14 +214,14 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
UsbDeviceDescBank* bank = &sram_registers[epnum][dir];
uint32_t size_value = 0;
while (size_value < 7) {
- if (1 << (size_value + 3) == desc_edpt->wMaxPacketSize.size) {
+ if (1 << (size_value + 3) == tu_edpt_packet_size(desc_edpt)) {
break;
}
size_value++;
}
// unsupported endpoint size
- if ( size_value == 7 && desc_edpt->wMaxPacketSize.size != 1023 ) return false;
+ if ( size_value == 7 && tu_edpt_packet_size(desc_edpt) != 1023 ) return false;
bank->PCKSIZE.bit.SIZE = size_value;