Skip to main content

writer_task

Function writer_task 

Source
pub async fn writer_task<W: SerialWrite>(
    device: W,
    ack_tracker: AckTracker,
    data_rx: Receiver<Vec<u8>>,
) -> Result<()>
Expand description

Runs the serial frame writer loop, prioritizing pending ACKs from ack_tracker ahead of coalesced outgoing data frames from data_rx.

ยงErrors

Returns TargetDriverError::WriteRetriesExhausted if writing to device fails repeatedly, or TargetDriverError::Frame if encoding an ACK frame fails.