mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-31 16:20:57 +00:00
chipidea/mimxrt: Add support for dcd_sof_enable().
This commit is contained in:
parent
1f259b3ab0
commit
a2e5ea1882
@ -309,10 +309,12 @@ void dcd_disconnect(uint8_t rhport)
|
|||||||
|
|
||||||
void dcd_sof_enable(uint8_t rhport, bool en)
|
void dcd_sof_enable(uint8_t rhport, bool en)
|
||||||
{
|
{
|
||||||
(void) rhport;
|
ci_hs_regs_t* dcd_reg = CI_HS_REG(rhport);
|
||||||
(void) en;
|
if (en) {
|
||||||
|
dcd_reg->USBINTR |= INTR_SOF;
|
||||||
// TODO implement later
|
} else {
|
||||||
|
dcd_reg->USBINTR &= ~INTR_SOF;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
@ -679,7 +681,8 @@ void dcd_int_handler(uint8_t rhport)
|
|||||||
|
|
||||||
if (int_status & INTR_SOF)
|
if (int_status & INTR_SOF)
|
||||||
{
|
{
|
||||||
dcd_event_bus_signal(rhport, DCD_EVENT_SOF, true);
|
const uint32_t frame = dcd_reg->FRINDEX;
|
||||||
|
dcd_event_sof(rhport, frame, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user