struct Driver
Defined at line 267 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
This provides the actual driver logic common to MMIO and PIO variants.
Public Members
static basic_string_view kConfigName
static const auto kDevicetreeBindings
Protected Members
uint32_t fifo_depth_
bool thre_mode_
bool fifo_stat_
bool has_fractional_divisor_
uint32_t saved_ier_
uint32_t saved_mcr_
uint32_t saved_lcr_
uint16_t saved_divisor_
uint8_t saved_fractional_divisor_
bool has_saved_divisor_
bool prepared_for_suspend_
Public Methods
template <typename... Args>
void Driver (Args &&... args)
Defined at line 278 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
bool TrySelect (const devicetree::PropertyDecoder & decoder)
Defined at line 280 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
void Init (IoProvider & io)
Defined at line 296 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
void SetLineControl (IoProvider &io,std::optional<DataBits>data_bits,std::optional<Parity>parity,std::optional<StopBits>stop_bits)
Defined at line 376 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
void SetLineControl (IoProvider &io,std::optional<DataBits>data_bits,std::optional<Parity>parity,std::optional<StopBits>stop_bits)
Defined at line 376 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
bool TxReady (IoProvider & io)
Defined at line 453 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider,typename It1,typename It2>
auto Write (IoProvider &io,bool,It1it,const It2 &end)
Defined at line 469 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
std::optional<uint8_t> Read (IoProvider & io)
Defined at line 496 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
std::optional<uint8_t> Read (IoProvider & io)
Defined at line 496 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
void EnableTxInterrupt (IoProvider & io, bool enable)
Defined at line 504 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
void EnableRxInterrupt (IoProvider & io, bool enable)
Defined at line 510 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <typename IoProvider, typename IrqProvider>
void InitInterrupt (IoProvider & io, IrqProvider & irq)
Defined at line 516 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider,typename Lock,typename Waiter,typename Tx,typename Rx>
void Interrupt (IoProvider &io,Lock &lock,Waiter &waiter,Tx &&tx,Rx &&rx)
Defined at line 527 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
bool WaitDuringBusy (IoProvider & io)
Defined at line 585 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <class IoProvider>
bool TxDrained (IoProvider & io)
Returns true if all previously written output has been transmitted, i.e.
both the TX FIFO and the transmit shift register are empty (LSR.TEMT).
Defined at line 599 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <typename IoProvider, typename IrqProvider>
void PrepareForSuspend (IoProvider & io, IrqProvider & irq)
Prepare the UART for having its power and/or clocks removed. All register
state is assumed to be lost while suspended.
Saves the register state needed to restore the UART's configuration and
disables all UART interrupt sources. This does not wait for queued output
to be transmitted; callers which care should first wait for TxDrained() to
return true. Any output (and input) still queued when power is removed
will be lost, and WakeupFromSuspend resets the FIFOs.
This never waits for long: it performs a small, bounded number of register
accesses, so it is suitable for calling with interrupts disabled.
Defined at line 615 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h
template <typename IoProvider, typename IrqProvider>
void WakeupFromSuspend (IoProvider & io, IrqProvider & irq)
Restore the UART's configuration after power and clocks have been
restored, following a previous call to PrepareForSuspend.
Like PrepareForSuspend, this performs a small, bounded number of register
accesses.
Defined at line 643 of file ../../zircon/system/ulib/uart/include/lib/uart/dw8250.h