Skip to main content

dispatch_loop

Function dispatch_loop 

Source
pub(crate) async fn dispatch_loop<H, C>(
    rx: HidReader<'static, Driver<'static, USB>, REPORT_SIZE>,
    tx: HidWriter<'static, Driver<'static, USB>, REPORT_SIZE>,
    service: CryptoService<H, C>,
) -> !
where H: AteccHal, C: Clock, H::Error: Debug,
Expand description

Main request/response loop: read a HID report, dispatch on the opcode, write the response.

This task owns the [CryptoService] and therefore runs sequentially. Concurrent requests are not supported; the protocol does not need them.