pub struct Pl011 { /* private fields */ }Expand description
PL011 UART 驱动结构体
Implementations§
Source§impl Pl011
impl Pl011
Source§impl Pl011
impl Pl011
Sourcepub fn enable_fifo(&self, enable: bool)
pub fn enable_fifo(&self, enable: bool)
启用或禁用 FIFO
Sourcepub fn set_fifo_trigger_level(&self, rx_level: u8, tx_level: u8)
pub fn set_fifo_trigger_level(&self, rx_level: u8, tx_level: u8)
设置 FIFO 触发级别
Trait Implementations§
Source§impl InterfaceRaw for Pl011
impl InterfaceRaw for Pl011
type IrqHandler = Pl011IrqHandler
type Sender = Sender
type Reciever = Reciever
fn set_config(&mut self, config: &Config) -> Result<(), ConfigError>
fn baudrate(&self) -> u32
fn data_bits(&self) -> DataBits
fn stop_bits(&self) -> StopBits
fn parity(&self) -> Parity
fn open(&mut self)
fn close(&mut self)
fn clock_freq(&self) -> Option<NonZeroU32>
Source§fn enable_loopback(&mut self)
fn enable_loopback(&mut self)
启用回环模式
Source§fn disable_loopback(&mut self)
fn disable_loopback(&mut self)
禁用回环模式
Source§fn is_loopback_enabled(&self) -> bool
fn is_loopback_enabled(&self) -> bool
检查回环模式是否启用
Source§fn set_irq_mask(&mut self, mask: InterruptMask)
fn set_irq_mask(&mut self, mask: InterruptMask)
设置中断使能掩码
Source§fn get_irq_mask(&self) -> InterruptMask
fn get_irq_mask(&self) -> InterruptMask
获取当前中断使能掩码
fn base_addr(&self) -> usize
fn irq_handler(&mut self) -> Option<Self::IrqHandler>
fn take_tx(&mut self) -> Option<Self::Sender>
fn take_rx(&mut self) -> Option<Self::Reciever>
fn set_tx(&mut self, tx: Self::Sender) -> Result<(), SetBackError>
fn set_rx(&mut self, rx: Self::Reciever) -> Result<(), SetBackError>
Auto Trait Implementations§
impl Freeze for Pl011
impl !RefUnwindSafe for Pl011
impl Send for Pl011
impl !Sync for Pl011
impl Unpin for Pl011
impl !UnwindSafe for Pl011
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more