template <template <typename, IoRegisterType> class IoProvider, typename Sync, class IrqProvider, typename UartDriver = Driver>

class KernelDriver

Defined at line 268 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

uart::all::KernelDriver is a variant across all the KernelDriver types.

Public Methods

void KernelDriver<IoProvider, Sync, IrqProvider, UartDriver> ()

In default-constructed state, it's the null driver.

Defined at line 273 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

template <typename T>
void KernelDriver<IoProvider, Sync, IrqProvider, UartDriver> (const T & uart)

It can be copy-constructed from one of the supported uart::xyz::Driver

types to hand off the hardware state from a different instantiation.

Defined at line 278 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

void KernelDriver<IoProvider, Sync, IrqProvider, UartDriver> (const uart_type & uart)

...or from another all::KernelDriver::uart() result.

Defined at line 281 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

void KernelDriver<IoProvider, Sync, IrqProvider, UartDriver> (const Config<UartDriver> & config)

Defined at line 283 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

KernelDriver<IoProvider, Sync, IrqProvider, UartDriver> & operator= (const uart_type & uart)

Assignment is another way to reinitialize the configuration.

Defined at line 290 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

Config<UartDriver> config ()

Defined at line 300 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

std::optional<MmioRange> maybe_mmio_range ()

Defined at line 306 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

void Unparse (FILE * out)

Write out a string that Parse() can read back to recreate the driver

state. This doesn't preserve the driver state, only the configuration.

Defined at line 314 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

void Unparse (FILE * out)

Write out a string that Parse() can read back to recreate the driver

state. This doesn't preserve the driver state, only the configuration.

Defined at line 314 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

template <typename T, typename... Args>
void Visit (T && f, Args... args)

Apply f to selected driver.

Defined at line 320 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

template <typename T, typename... Args>
void Visit (T && f, Args... args)

Apply f to selected driver.

Defined at line 326 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

uart_type TakeUart ()

Takes ownership of the underlying hardware management and state. This object will be left

in an invalid state, and should be reinitialized before interacting with it.

Defined at line 332 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

template <typename TargetUartDriver>
bool holds_alternative ()

Returns true if the active `uart::KernelDriver

<

...>` is backed by `TargetUartDriver`.

Defined at line 342 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

bool operator bool ()

Returns true if a valid non-null driver variant is active.

Defined at line 347 of file ../../zircon/system/ulib/uart/include/lib/uart/all.h

Records