Struct rstubs::device::serial::LineCtl

source ·
#[repr(transparent)]
struct LineCtl(u8);
Expand description

Line Control Register

Tuple Fields§

§0: u8

Implementations§

source§

impl LineCtl

source

const fn new() -> Self

Creates a new default initialized bitfield.

source

const WORD_LENGTH_BITS: usize = 2usize

source

const WORD_LENGTH_OFFSET: usize = 0usize

source

const fn with_word_length(self, value: u8) -> Self

bits per character5678
word length value0123

Bits: 0..2

source

const fn word_length(&self) -> u8

bits per character5678
word length value0123

Bits: 0..2

source

fn set_word_length(&mut self, value: u8)

bits per character5678
word length value0123

Bits: 0..2

source

const STOP_BITS_BITS: usize = 1usize

source

const STOP_BITS_OFFSET: usize = 2usize

source

const fn with_stop_bits(self, value: bool) -> Self

0 = one stop bit, 1 = 1.5/2 stop bits

Bits: 2..3

source

const fn stop_bits(&self) -> bool

0 = one stop bit, 1 = 1.5/2 stop bits

Bits: 2..3

source

fn set_stop_bits(&mut self, value: bool)

0 = one stop bit, 1 = 1.5/2 stop bits

Bits: 2..3

source

const PARITY_BITS: usize = 1usize

source

const PARITY_OFFSET: usize = 3usize

source

const fn with_parity(self, value: bool) -> Self

Bits: 3..4

source

const fn parity(&self) -> bool

Bits: 3..4

source

fn set_parity(&mut self, value: bool)

Bits: 3..4

source

const EVEN_PARITY_BITS: usize = 1usize

source

const EVEN_PARITY_OFFSET: usize = 4usize

source

const fn with_even_parity(self, value: bool) -> Self

Bits: 4..5

source

const fn even_parity(&self) -> bool

Bits: 4..5

source

fn set_even_parity(&mut self, value: bool)

Bits: 4..5

source

const STICK_PARITY_BITS: usize = 1usize

source

const STICK_PARITY_OFFSET: usize = 5usize

source

const fn with_stick_parity(self, value: bool) -> Self

Bits: 5..6

source

const fn stick_parity(&self) -> bool

Bits: 5..6

source

fn set_stick_parity(&mut self, value: bool)

Bits: 5..6

source

const SET_BREAK_BITS: usize = 1usize

source

const SET_BREAK_OFFSET: usize = 6usize

source

const fn with_set_break(self, value: bool) -> Self

Bits: 6..7

source

const fn set_break(&self) -> bool

Bits: 6..7

source

fn set_set_break(&mut self, value: bool)

Bits: 6..7

source

const DIVISOR_LATCH_ACCESS_BITS: usize = 1usize

source

const DIVISOR_LATCH_ACCESS_OFFSET: usize = 7usize

source

const fn with_divisor_latch_access(self, value: bool) -> Self

Bits: 7..8

source

const fn divisor_latch_access(&self) -> bool

Bits: 7..8

source

fn set_divisor_latch_access(&mut self, value: bool)

Bits: 7..8

Trait Implementations§

source§

impl Clone for LineCtl

source§

fn clone(&self) -> LineCtl

Returns a copy of the value. Read more
1.0.0§

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

Performs copy-assignment from source. Read more
source§

impl Debug for LineCtl

source§

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

Formats the value using the given formatter. Read more
source§

impl Default for LineCtl

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl From<LineCtl> for u8

source§

fn from(v: LineCtl) -> u8

Converts to this type from the input type.
source§

impl From<u8> for LineCtl

source§

fn from(v: u8) -> Self

Converts to this type from the input type.
source§

impl PortValue for LineCtl

§

type I = u8

The underlying raw integer type, which can be [u8], [u16], or [u32].
source§

impl Copy for LineCtl

Auto Trait Implementations§

§

impl RefUnwindSafe for LineCtl

§

impl Send for LineCtl

§

impl Sync for LineCtl

§

impl Unpin for LineCtl

§

impl UnwindSafe for LineCtl

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.