Skip to main content

LineStatus

Struct LineStatus 

Source
pub struct LineStatus { /* private fields */ }
Expand description

Line Status Register

Implementations§

Source§

impl LineStatus

Source

pub const ZERO: Self

Creates a new instance with a raw value of 0. Equivalent to [Self::new_with_raw_value(0)].

Source

pub const fn raw_value(&self) -> u32

Returns the underlying raw value of this bitfield

Source

pub const fn new_with_raw_value(value: u32) -> LineStatus

Creates a new instance of this bitfield with the given raw value.

No checks are performed on the value, so it is possible to set bits that don’t have any accessors specified.

Source

pub const fn error_in_rx_fifo(&self) -> bool

Error in RX FIFO.

Source

pub const fn with_error_in_rx_fifo(&self, field_value: bool) -> Self

Error in RX FIFO.

Source

pub fn set_error_in_rx_fifo(&mut self, field_value: bool)

Error in RX FIFO.

Source

pub const fn tx_empty(&self) -> bool

In the FIFO mode, this is set to 1 when the TX FIFO and shift register are both empty.

Source

pub const fn with_tx_empty(&self, field_value: bool) -> Self

In the FIFO mode, this is set to 1 when the TX FIFO and shift register are both empty.

Source

pub fn set_tx_empty(&mut self, field_value: bool)

In the FIFO mode, this is set to 1 when the TX FIFO and shift register are both empty.

Source

pub const fn thr_empty(&self) -> bool

In the FIFO mode, this is set to 1 when the TX FIFO is empty. There might still be a byte in the TX shift register.

Source

pub const fn with_thr_empty(&self, field_value: bool) -> Self

In the FIFO mode, this is set to 1 when the TX FIFO is empty. There might still be a byte in the TX shift register.

Source

pub fn set_thr_empty(&mut self, field_value: bool)

In the FIFO mode, this is set to 1 when the TX FIFO is empty. There might still be a byte in the TX shift register.

Source

pub const fn break_interrupt(&self) -> bool

Break interrupt.

Source

pub const fn with_break_interrupt(&self, field_value: bool) -> Self

Break interrupt.

Source

pub fn set_break_interrupt(&mut self, field_value: bool)

Break interrupt.

Source

pub const fn framing_error(&self) -> bool

Framing error.

Source

pub const fn with_framing_error(&self, field_value: bool) -> Self

Framing error.

Source

pub fn set_framing_error(&mut self, field_value: bool)

Framing error.

Source

pub const fn parity_error(&self) -> bool

Parity error.

Source

pub const fn with_parity_error(&self, field_value: bool) -> Self

Parity error.

Source

pub fn set_parity_error(&mut self, field_value: bool)

Parity error.

Source

pub const fn overrun_error(&self) -> bool

Overrun error.

Source

pub const fn with_overrun_error(&self, field_value: bool) -> Self

Overrun error.

Source

pub fn set_overrun_error(&mut self, field_value: bool)

Overrun error.

Source

pub const fn data_ready(&self) -> bool

Data ready.

Source

pub const fn with_data_ready(&self, field_value: bool) -> Self

Data ready.

Source

pub fn set_data_ready(&mut self, field_value: bool)

Data ready.

Trait Implementations§

Source§

impl Clone for LineStatus

Source§

fn clone(&self) -> LineStatus

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for LineStatus

Source§

impl Debug for LineStatus

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

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 T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.
Source§

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

Source§

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

The type returned in the event of a conversion error.
Source§

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

Performs the conversion.