Struct uart_pl011::Pl011
source · pub struct Pl011 { /* private fields */ }
Expand description
A Pl011 Single-Serial-Port Controller.
Implementations§
source§impl Pl011
impl Pl011
Generic methods
sourcepub fn enable_rx_interrupt(&mut self, enable: bool)
pub fn enable_rx_interrupt(&mut self, enable: bool)
Enable on-receive interrupt
pub fn acknowledge_rx_interrupt(&mut self)
sourcepub fn set_fifo_mode(&mut self, enable: bool)
pub fn set_fifo_mode(&mut self, enable: bool)
Set FIFO mode
sourcepub fn log_status(&self)
pub fn log_status(&self)
Outputs a summary of the state of the controller using log::info!()
sourcepub fn has_incoming_data(&self) -> bool
pub fn has_incoming_data(&self) -> bool
Returns true if the receive-buffer-empty flag is clear.
sourcepub fn read_byte(&self) -> u8
pub fn read_byte(&self) -> u8
Reads a single byte out the uart
Spins until a byte is available in the fifo.
sourcepub fn read_bytes(&self, bytes: &mut [u8]) -> usize
pub fn read_bytes(&self, bytes: &mut [u8]) -> usize
Reads bytes into a slice until there is none available.
sourcepub fn is_writeable(&self) -> bool
pub fn is_writeable(&self) -> bool
Returns true if the transmit-buffer-full flag is clear.
sourcepub fn write_byte(&mut self, data: u8)
pub fn write_byte(&mut self, data: u8)
Writes a single byte out the uart.
Spins until space is available in the fifo.
sourcepub fn write_bytes(&mut self, bytes: &[u8])
pub fn write_bytes(&mut self, bytes: &[u8])
Writes a byte slice out the uart.
Spins until space is available in the fifo.
Trait Implementations§
Auto Trait Implementations§
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