Struct aw_soc::uart::RegisterBlock

source ·
#[repr(C)]
pub struct RegisterBlock { /* private fields */ }
Expand description

Universal Asynchronous Receiver-Transmitter registers.

Methods from Deref<Target = Uart16550<u32>>§

source

pub fn rbr_thr(&self) -> &RBR_THR<R>

取出接收缓冲和发送保持寄存器。

source

pub fn ier(&self) -> &IER<R>

取出中断使能寄存器。

source

pub fn iir_fcr(&self) -> &IIR_FCR<R>

取出中断识别和队列控制寄存器。

source

pub fn lcr(&self) -> &LCR<R>

取出线路控制寄存器。

source

pub fn mcr(&self) -> &MCR<R>

取出调制解调器控制寄存器。

source

pub fn lsr(&self) -> &LSR<R>

取出线路状态寄存器。

source

pub fn msr(&self) -> &MSR<R>

取出调制解调器状态寄存器。

source

pub fn write_divisor(&self, divisor: u16)

将分频系数写入锁存器。

source

pub fn read(&self, buf: &mut [u8]) -> usize

从接收队列读取字符到 buf,返回读取的字符数。

source

pub fn write(&self, buf: &[u8]) -> usize

buf 写入字符到发送队列,返回写入的字符数。

Trait Implementations§

source§

impl Deref for RegisterBlock

§

type Target = Uart16550<u32>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.