Skip to main content

Crate fdomain_uart_driver_lib

Crate fdomain_uart_driver_lib 

Source
Expand description

Target-side FDomain UART driver daemon for Fuchsia devices.

This component acts as the target-side transport bridge between a physical or virtual serial device (/dev/class/serial) and the Remote Control Service (fuchsia.developer.remotecontrol.connector.Connector).

§Architecture

  1. Boot Argument Check: Checks fuchsia.boot.Arguments for dev.fdomain.uart (defaults to disabled; opt-in via dev.fdomain.uart=true) and dev.fdomain.uart.baud (defaults to 1000000).
  2. Device Discovery: Scans /dev/class/serial, preferring Class::Generic ports over Class::Console ports, and configures 8N1 at the target baud rate.
  3. Handshake: Runs TargetHandshake supporting ProtocolId::ResendSP (Go-Back-N sliding-window framing) and preserves any trailing bytes read past the handshake frame.
  4. Bridge Tasks: Spawns four concurrent tasks (writer_task, receiver_task, sender_task, and coordinator_task) that multiplex FDomain channels over UART frames and connect each channel to RCS via fdomain_toolbox_socket.

Re-exports§

pub use error::Result;

Modules§

coordinator
Multiplexed FDomain channel coordinator and RCS socket bridge tasks.
error
Error types for the target-side FDomain UART driver.
receiver
Target-side ResendSP frame receiver task and session validation.
sender
Target-side ResendSP Go-Back-N sender task and retransmission management.
serial
Low-level serial I/O traits, device discovery, handshake, frame reader, and writer task.

Functions§

run_driver
Runs the target-side FDomain UART driver daemon.