pub async fn receiver_task<R: SerialRead>(
reader: &mut SerialReader<R>,
serial_tx: Sender<SerialEvent>,
ack_tracker: AckTracker,
ack_tx: Sender<u8>,
session_id: u32,
data_tx: Sender<Vec<u8>>,
) -> Result<()>Expand description
Reads frames from reader, validates session_id, tracks ResendSP sequence
numbers via ack_tracker, and dispatches in-order SerialEvents and ACKs.
ยงErrors
Returns TargetDriverError::ResetRequested if the host sends a reset frame,
TargetDriverError::SessionIdChanged if a new handshake arrives with a
different session ID, or propagates serial read and channel send errors.