Skip to main content

handle_one_request

Function handle_one_request 

Source
async fn handle_one_request<H, C>(
    service: &mut CryptoService<H, C>,
    rx_buf: &[u8],
    tx_buf: &mut [u8],
) -> usize
where H: AteccHal, C: Clock, H::Error: Debug,
Expand description

Process one incoming report, write the response into tx_buf, return the number of bytes used.

Always writes exactly REPORT_SIZE bytes (a HID report is fixed-size) so the return value is currently always REPORT_SIZE. The signature keeps it explicit in case a future variant needs to send less.