diff options
| author | hathach <[email protected]> | 2018-12-21 12:46:20 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-12-21 12:46:20 +0700 |
| commit | 6f17b4e01973185beb2876f827a76e4200ee0ef3 (patch) | |
| tree | 83259383dfcbe984b846309e2757e0581677b539 /src/portable/microchip | |
| parent | 426064201a2a28bf9c21f2cb05f9bd0fe2213ac7 (diff) | |
change to dcd_get_frame_number
Diffstat (limited to 'src/portable/microchip')
| -rw-r--r-- | src/portable/microchip/samd21/dcd_samd21.c | 4 | ||||
| -rw-r--r-- | src/portable/microchip/samd51/dcd_samd51.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/microchip/samd21/dcd_samd21.c b/src/portable/microchip/samd21/dcd_samd21.c index be1f4495c..7b2a57eeb 100644 --- a/src/portable/microchip/samd21/dcd_samd21.c +++ b/src/portable/microchip/samd21/dcd_samd21.c @@ -124,10 +124,10 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num) // Nothing to do } -uint32_t dcd_get_microframe(uint8_t rhport) +uint32_t dcd_get_frame_number(uint8_t rhport) { (void) rhport; - return USB->DEVICE.FNUM.reg & (TU_BIT(14) - 1); + return USB->DEVICE.FNUM.bit.FNUM; } /*------------------------------------------------------------------*/ diff --git a/src/portable/microchip/samd51/dcd_samd51.c b/src/portable/microchip/samd51/dcd_samd51.c index 3dd6c88d0..1de3fadb2 100644 --- a/src/portable/microchip/samd51/dcd_samd51.c +++ b/src/portable/microchip/samd51/dcd_samd51.c @@ -129,10 +129,10 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num) // Nothing to do } -uint32_t dcd_get_microframe(uint8_t rhport) +uint32_t dcd_get_frame_number(uint8_t rhport) { (void) rhport; - return USB->DEVICE.FNUM.reg & (TU_BIT(14) - 1); + return USB->DEVICE.FNUM.bit.FNUM; } /*------------------------------------------------------------------*/ |
