class DwApbUart

Defined at line 105 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.h

Public Members

static const size_t kRxBufferSize
static const size_t kMaxIrqLoopIterations
static duration kYieldWarningInterval

Public Methods

void DwApbUart (const fuchsia_hardware_serial::wire::SerialPortInfo & serial_port_info, fdf::MmioBuffer mmio, zx::interrupt irq, fidl::ClientEnd<fuchsia_hardware_clock::Clock> baud_clock)

Defined at line 46 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void ~DwApbUart ()

DwApbUart destructor cancels any pending read/write operations and disables the baud clock.

Defined at line 57 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

const fuchsia_hardware_serial::wire::SerialPortInfo & serial_port_info ()

Defined at line 131 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.h

void Bind (fdf_dispatcher_t * dispatcher, fdf::ServerEnd<fuchsia_hardware_serialimpl::Device> server_end)

Defined at line 551 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

zx_status_t Config (uint32_t baud_rate, uint32_t flags)

Config configures UART line settings (data bits, parity, stop bits) and baud rate.

It maps FIDL configuration flags to the internal driver representations.

Defined at line 79 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

zx_status_t Enable (bool enable)

Enable manages the driver lifecycle state. On enable, it obtains the IRQ,

binds the IRQ handler, and starts the hardware. On disable, it stops the

hardware and cancels the IRQ handler.

Defined at line 267 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void GetInfo (fdf::Arena & arena, GetInfoCompleter::Sync & completer)

fuchsia_hardware_serialimpl::Device FIDL implementation.

Defined at line 73 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void Config (ConfigRequestView request, fdf::Arena & arena, ConfigCompleter::Sync & completer)

Defined at line 384 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void Enable (EnableRequestView request, fdf::Arena & arena, EnableCompleter::Sync & completer)

Defined at line 394 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void Read (fdf::Arena & arena, ReadCompleter::Sync & completer)

Read initiates an asynchronous read operation. We only support one active read

operation at a time.

Defined at line 406 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void Write (WriteRequestView request, fdf::Arena & arena, WriteCompleter::Sync & completer)

Write initiates an asynchronous write operation. We only support one active write

operation at a time.

Defined at line 418 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void CancelAll (fdf::Arena & arena, CancelAllCompleter::Sync & completer)

CancelAll aborts all pending asynchronous read and write transactions,

completing them with ZX_ERR_CANCELED.

Defined at line 295 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc

void handle_unknown_method (fidl::UnknownMethodMetadata<fuchsia_hardware_serialimpl::Device> metadata, fidl::UnknownMethodCompleter::Sync & completer)

Defined at line 431 of file ../../src/devices/serial/drivers/dw-apb-uart/dw-apb-uart.cc