diff options
| author | hathach <[email protected]> | 2018-12-17 12:14:11 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2018-12-17 12:14:11 +0700 |
| commit | 902697ca079a179221da92f8cb9f873768a5d0d7 (patch) | |
| tree | 8bc9238d3aa66b4b02139a9e24005e1ce4c3630a /src/portable/microchip | |
| parent | 455da57f9d66a342383334f3af82c27b57feb6cd (diff) | |
add dcd_get_microframe()
Diffstat (limited to 'src/portable/microchip')
| -rw-r--r-- | src/portable/microchip/samd21/dcd_samd21.c | 6 | ||||
| -rw-r--r-- | src/portable/microchip/samd51/dcd_samd51.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/portable/microchip/samd21/dcd_samd21.c b/src/portable/microchip/samd21/dcd_samd21.c index af0721ec3..0865f2bda 100644 --- a/src/portable/microchip/samd21/dcd_samd21.c +++ b/src/portable/microchip/samd21/dcd_samd21.c @@ -124,6 +124,12 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num) // Nothing to do } +uint32_t dcd_get_microframe(uint8_t rhport) +{ + (void) rhport; + return USB->DEVICE.FNUM & (TU_BIT(14) - 1); +} + /*------------------------------------------------------------------*/ /* DCD Endpoint port *------------------------------------------------------------------*/ diff --git a/src/portable/microchip/samd51/dcd_samd51.c b/src/portable/microchip/samd51/dcd_samd51.c index ce66b8245..fc3d31dea 100644 --- a/src/portable/microchip/samd51/dcd_samd51.c +++ b/src/portable/microchip/samd51/dcd_samd51.c @@ -129,6 +129,12 @@ void dcd_set_config (uint8_t rhport, uint8_t config_num) // Nothing to do } +uint32_t dcd_get_microframe(uint8_t rhport) +{ + (void) rhport; + return USB->DEVICE.FNUM & (TU_BIT(14) - 1); +} + /*------------------------------------------------------------------*/ /* DCD Endpoint port *------------------------------------------------------------------*/ |
