pub struct Pl011 { /* private fields */ }Expand description
PL011 UART 驱动结构体
Implementations§
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 Register for Pl011
impl Register for Pl011
fn write_byte(&mut self, byte: u8)
fn read_byte(&mut self) -> Result<u8, TransferError>
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)
Source§fn clean_interrupt_status(&mut self) -> InterruptMask
fn clean_interrupt_status(&mut self) -> InterruptMask
获取并清除所有中断状态
Source§fn line_status(&mut self) -> LineStatus
fn line_status(&mut self) -> LineStatus
获取线路状态
fn get_base(&self) -> usize
fn set_base(&mut self, base: usize)
fn clock_freq(&self) -> u32
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 read_buf(&mut self, buf: &mut [u8]) -> Result<usize, TransferError>
fn write_buf(&mut self, buf: &[u8]) -> usize
impl Send for Pl011
impl Sync for Pl011
Auto Trait Implementations§
impl Freeze for Pl011
impl !RefUnwindSafe 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