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/nordic/nrf5x | |
| parent | 455da57f9d66a342383334f3af82c27b57feb6cd (diff) | |
add dcd_get_microframe()
Diffstat (limited to 'src/portable/nordic/nrf5x')
| -rw-r--r-- | src/portable/nordic/nrf5x/dcd_nrf5x.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/portable/nordic/nrf5x/dcd_nrf5x.c b/src/portable/nordic/nrf5x/dcd_nrf5x.c index 7d13ef8c3..1e0c34743 100644 --- a/src/portable/nordic/nrf5x/dcd_nrf5x.c +++ b/src/portable/nordic/nrf5x/dcd_nrf5x.c @@ -187,7 +187,7 @@ static void xact_in_prepare(uint8_t epnum) } //--------------------------------------------------------------------+ -// Tinyusb DCD API +// Controller API //--------------------------------------------------------------------+ bool dcd_init (uint8_t rhport) { @@ -221,6 +221,15 @@ 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 NRF_USBD->FRAMECNTR << 3; +} + +//--------------------------------------------------------------------+ +// Endpoint API +//--------------------------------------------------------------------+ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt) { (void) rhport; |
