#[repr(transparent)]struct LineCtl(u8);
Expand description
Line Control Register
Tuple Fields§
§0: u8
Implementations§
source§impl LineCtl
impl LineCtl
const WORD_LENGTH_BITS: usize = 2usize
const WORD_LENGTH_OFFSET: usize = 0usize
const STOP_BITS_BITS: usize = 1usize
const STOP_BITS_OFFSET: usize = 2usize
const PARITY_BITS: usize = 1usize
const PARITY_OFFSET: usize = 3usize
const EVEN_PARITY_BITS: usize = 1usize
const EVEN_PARITY_OFFSET: usize = 4usize
const STICK_PARITY_BITS: usize = 1usize
const STICK_PARITY_OFFSET: usize = 5usize
const SET_BREAK_BITS: usize = 1usize
const SET_BREAK_OFFSET: usize = 6usize
const DIVISOR_LATCH_ACCESS_BITS: usize = 1usize
const DIVISOR_LATCH_ACCESS_OFFSET: usize = 7usize
sourceconst fn word_length(&self) -> u8
const fn word_length(&self) -> u8
bits per character | 5 | 6 | 7 | 8 |
---|---|---|---|---|
word length value | 0 | 1 | 2 | 3 |
Bits: 0..2
sourceconst fn with_word_length_checked(self, value: u8) -> Result<Self, ()>
const fn with_word_length_checked(self, value: u8) -> Result<Self, ()>
bits per character | 5 | 6 | 7 | 8 |
---|---|---|---|---|
word length value | 0 | 1 | 2 | 3 |
Bits: 0..2
sourceconst fn with_word_length(self, value: u8) -> Self
const fn with_word_length(self, value: u8) -> Self
bits per character | 5 | 6 | 7 | 8 |
---|---|---|---|---|
word length value | 0 | 1 | 2 | 3 |
Bits: 0..2
sourcefn set_word_length(&mut self, value: u8)
fn set_word_length(&mut self, value: u8)
bits per character | 5 | 6 | 7 | 8 |
---|---|---|---|---|
word length value | 0 | 1 | 2 | 3 |
Bits: 0..2
sourcefn set_word_length_checked(&mut self, value: u8) -> Result<(), ()>
fn set_word_length_checked(&mut self, value: u8) -> Result<(), ()>
bits per character | 5 | 6 | 7 | 8 |
---|---|---|---|---|
word length value | 0 | 1 | 2 | 3 |
Bits: 0..2
sourceconst fn with_stop_bits_checked(self, value: bool) -> Result<Self, ()>
const fn with_stop_bits_checked(self, value: bool) -> Result<Self, ()>
false = one stop bit, true = 1.5/2 stop bits
Bits: 2..3
sourceconst fn with_stop_bits(self, value: bool) -> Self
const fn with_stop_bits(self, value: bool) -> Self
false = one stop bit, true = 1.5/2 stop bits
Bits: 2..3
sourcefn set_stop_bits(&mut self, value: bool)
fn set_stop_bits(&mut self, value: bool)
false = one stop bit, true = 1.5/2 stop bits
Bits: 2..3
sourcefn set_stop_bits_checked(&mut self, value: bool) -> Result<(), ()>
fn set_stop_bits_checked(&mut self, value: bool) -> Result<(), ()>
false = one stop bit, true = 1.5/2 stop bits
Bits: 2..3
sourceconst fn with_parity_checked(self, value: bool) -> Result<Self, ()>
const fn with_parity_checked(self, value: bool) -> Result<Self, ()>
If enabled, add a parity bit
Bits: 3..4
sourceconst fn with_parity(self, value: bool) -> Self
const fn with_parity(self, value: bool) -> Self
If enabled, add a parity bit
Bits: 3..4
sourcefn set_parity(&mut self, value: bool)
fn set_parity(&mut self, value: bool)
If enabled, add a parity bit
Bits: 3..4
sourcefn set_parity_checked(&mut self, value: bool) -> Result<(), ()>
fn set_parity_checked(&mut self, value: bool) -> Result<(), ()>
If enabled, add a parity bit
Bits: 3..4
sourceconst fn even_parity(&self) -> bool
const fn even_parity(&self) -> bool
Bits: 4..5
sourceconst fn with_even_parity_checked(self, value: bool) -> Result<Self, ()>
const fn with_even_parity_checked(self, value: bool) -> Result<Self, ()>
Bits: 4..5
sourceconst fn with_even_parity(self, value: bool) -> Self
const fn with_even_parity(self, value: bool) -> Self
Bits: 4..5
sourcefn set_even_parity(&mut self, value: bool)
fn set_even_parity(&mut self, value: bool)
Bits: 4..5
sourcefn set_even_parity_checked(&mut self, value: bool) -> Result<(), ()>
fn set_even_parity_checked(&mut self, value: bool) -> Result<(), ()>
Bits: 4..5
sourceconst fn stick_parity(&self) -> bool
const fn stick_parity(&self) -> bool
Bits: 5..6
sourceconst fn with_stick_parity_checked(self, value: bool) -> Result<Self, ()>
const fn with_stick_parity_checked(self, value: bool) -> Result<Self, ()>
Bits: 5..6
sourceconst fn with_stick_parity(self, value: bool) -> Self
const fn with_stick_parity(self, value: bool) -> Self
Bits: 5..6
sourcefn set_stick_parity(&mut self, value: bool)
fn set_stick_parity(&mut self, value: bool)
Bits: 5..6
sourcefn set_stick_parity_checked(&mut self, value: bool) -> Result<(), ()>
fn set_stick_parity_checked(&mut self, value: bool) -> Result<(), ()>
Bits: 5..6
sourceconst fn with_set_break_checked(self, value: bool) -> Result<Self, ()>
const fn with_set_break_checked(self, value: bool) -> Result<Self, ()>
Bits: 6..7
sourceconst fn with_set_break(self, value: bool) -> Self
const fn with_set_break(self, value: bool) -> Self
Bits: 6..7
sourcefn set_set_break(&mut self, value: bool)
fn set_set_break(&mut self, value: bool)
Bits: 6..7
sourcefn set_set_break_checked(&mut self, value: bool) -> Result<(), ()>
fn set_set_break_checked(&mut self, value: bool) -> Result<(), ()>
Bits: 6..7
sourceconst fn divisor_latch_access(&self) -> bool
const fn divisor_latch_access(&self) -> bool
If enabled, the Serial::data and Serial::int_en registers set the divisor (baud rate) instead of their normal function
Bits: 7..8
sourceconst fn with_divisor_latch_access_checked(
self,
value: bool,
) -> Result<Self, ()>
const fn with_divisor_latch_access_checked( self, value: bool, ) -> Result<Self, ()>
If enabled, the Serial::data and Serial::int_en registers set the divisor (baud rate) instead of their normal function
Bits: 7..8
sourceconst fn with_divisor_latch_access(self, value: bool) -> Self
const fn with_divisor_latch_access(self, value: bool) -> Self
If enabled, the Serial::data and Serial::int_en registers set the divisor (baud rate) instead of their normal function
Bits: 7..8
sourcefn set_divisor_latch_access(&mut self, value: bool)
fn set_divisor_latch_access(&mut self, value: bool)
If enabled, the Serial::data and Serial::int_en registers set the divisor (baud rate) instead of their normal function
Bits: 7..8
sourcefn set_divisor_latch_access_checked(&mut self, value: bool) -> Result<(), ()>
fn set_divisor_latch_access_checked(&mut self, value: bool) -> Result<(), ()>
If enabled, the Serial::data and Serial::int_en registers set the divisor (baud rate) instead of their normal function
Bits: 7..8
Trait Implementations§
impl Copy for LineCtl
Auto Trait Implementations§
impl Freeze for LineCtl
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 Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)