pub async fn send_line(args: Arguments<'_>)Expand description
Back-pressuring line sink — the R10 injection point. A control crate must
not depend on this BSP directly; instead it defines its own LineSink-style
trait and the binary injects a ~5-line newtype whose send_line forwards
here (the trait stays consumer-side, so neither BSP nor control crate depends
on the other). This is also the bulk-dump path for the HIL :cat CSV.
Bulk-dump emit (HIL :cat CSV read-back) — back-pressuring. AWAITS
until the ring has room for the whole line before writing, then signals the
drain, so a fast :cat dump self-paces to the TX drain rate instead of
overflowing the ~4 KB ring. Safe because the dump runs on a non-time-critical
task and can tolerate await latency; the log!() path does NOT use this.
Lossless against concurrent logging, but only because [Ring::write_line]
sheds a line that does not fit rather than overwriting the oldest. Reserving
space is not on its own enough: the reservation covers the moment of writing,
and these bytes are then the oldest in the ring, so an overwriting producer
destroys them first. That cut :cat lines in half on fire27, where 1 Mbaud
UART0 drains slower than the hot path fills. A panic still overwrites, by
design.