Skip to content

Commit b8a9cdf

Browse files
committed
alif/tinyusb_port: Implement SOF event.
Signed-off-by: Damien George <damien@micropython.org>
1 parent ebecd6d commit b8a9cdf

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

ports/alif/tinyusb_port/tusb_alif_dcd.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,8 @@ void dcd_disconnect(uint8_t rhport)
281281
void dcd_sof_enable(uint8_t rhport, bool en)
282282
{
283283
LOG("%010u >%s", DWT->CYCCNT, __func__);
284+
285+
udev->devten_b.softevten = en;
284286
}
285287

286288

@@ -656,6 +658,9 @@ static void _dcd_handle_devt(uint8_t evt, uint16_t info)
656658
// 0xE: reset
657659
// 0xF: resume
658660
} break;
661+
case DEVT_SOF: {
662+
dcd_event_bus_signal(TUD_OPT_RHPORT, DCD_EVENT_SOF, true);
663+
} break;
659664
case DEVT_ERRTICERR: {
660665
__BKPT(0);
661666
} break;

0 commit comments

Comments
 (0)