class Uart16550

Defined at line 42 of file ../../src/devices/serial/drivers/uart16550/uart16550.h

Driver implementing the fuchsia.hardware.serialimpl protocol for 16550-compatible UART devices.

Provides interrupt-driven serial communication on x86 platforms and the Fuchsia emulator (QEMU).

To prevent character loss and framing errors when incoming data arrives without an active client

FIDL Read request, this driver maintains an internal software RX buffer (up to 16KB).

Incoming bytes from the hardware FIFO are buffered asynchronously during RX interrupts; when the

buffer reaches capacity, RX interrupts are temporarily masked until client Read requests drain

the backlog.

Public Members

static const size_t kMaxRxBufferSize

Public Methods

void Uart16550 ()

Defined at line 35 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

void Uart16550 (zx_device_t * parent, acpi::Client acpi)

Defined at line 39 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

size_t RxBufferSize ()

Returns the current number of buffered RX bytes waiting in the software queue.

Thread-safe: acquires `device_mutex_`.

Defined at line 67 of file ../../src/devices/serial/drivers/uart16550/uart16550.h

size_t FifoDepth ()

Defined at line 85 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

bool Enabled ()

Defined at line 87 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

zx_status_t Create (void * ctx, zx_device_t * parent)

Defined at line 42 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

zx_status_t Init ()

Create RX and TX FIFOs, obtain interrupt and port handles from the ACPI

device, obtain port permissions, set up default configuration, and start the

interrupt handler thread.

Defined at line 95 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

zx_status_t Init (zx::interrupt interrupt, hwreg::Mock::RegisterIo port_mock)

test-use only

Defined at line 165 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

zx::unowned_interrupt InterruptHandle ()

test-use only

Defined at line 185 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

void DdkRelease ()

ddk::Releasable

Defined at line 457 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc

fidl::ProtocolHandler<fuchsia_hardware_serialimpl::Device> GetHandler ()

Defined at line 466 of file ../../src/devices/serial/drivers/uart16550/uart16550.cc