diff --git a/src/portable/microchip/samd21/dcd_samd21.c b/src/portable/microchip/samd21/dcd_samd21.c index 0865f2bd..be1f4495 100644 --- a/src/portable/microchip/samd21/dcd_samd21.c +++ b/src/portable/microchip/samd21/dcd_samd21.c @@ -127,7 +127,7 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num) uint32_t dcd_get_microframe(uint8_t rhport) { (void) rhport; - return USB->DEVICE.FNUM & (TU_BIT(14) - 1); + return USB->DEVICE.FNUM.reg & (TU_BIT(14) - 1); } /*------------------------------------------------------------------*/ diff --git a/src/portable/microchip/samd51/dcd_samd51.c b/src/portable/microchip/samd51/dcd_samd51.c index fc3d31de..3dd6c88d 100644 --- a/src/portable/microchip/samd51/dcd_samd51.c +++ b/src/portable/microchip/samd51/dcd_samd51.c @@ -132,7 +132,7 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num) uint32_t dcd_get_microframe(uint8_t rhport) { (void) rhport; - return USB->DEVICE.FNUM & (TU_BIT(14) - 1); + return USB->DEVICE.FNUM.reg & (TU_BIT(14) - 1); } /*------------------------------------------------------------------*/