• Angus Gratton's avatar
    shared/tinyusb: Schedule TinyUSB task function from dcd_event_handler. · 2d363a23
    Angus Gratton authored
    dcd_event_handler() is called from the IRQ when a new DCD event is queued
    for processing by the TinyUSB thread mode task.  This lets us queue the
    handler to run immediately when MicroPython resumes.
    
    Currently this relies on a linker --wrap hack to work, but a PR has been
    submitted to TinyUSB to allow the function to be called inline from
    dcd_event_handler() itself.
    
    This work was funded through GitHub Sponsors.
    Signed-off-by: default avatarAngus Gratton <angus@redyak.com.au>
    2d363a23
mp_usbd.c 2.35 KB