#[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
Sourceconst fn set_word_length(&mut self, value: u8)
const 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
Sourceconst fn set_word_length_checked(&mut self, value: u8) -> Result<(), ()>
const 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
Sourceconst fn set_stop_bits(&mut self, value: bool)
const fn set_stop_bits(&mut self, value: bool)
false = one stop bit, true = 1.5/2 stop bits
Bits: 2..3
Sourceconst fn set_stop_bits_checked(&mut self, value: bool) -> Result<(), ()>
const 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
Sourceconst fn set_parity(&mut self, value: bool)
const fn set_parity(&mut self, value: bool)
If enabled, add a parity bit
Bits: 3..4
Sourceconst fn set_parity_checked(&mut self, value: bool) -> Result<(), ()>
const 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
Sourceconst fn set_even_parity(&mut self, value: bool)
const fn set_even_parity(&mut self, value: bool)
Bits: 4..5
Sourceconst fn set_even_parity_checked(&mut self, value: bool) -> Result<(), ()>
const 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
Sourceconst fn set_stick_parity(&mut self, value: bool)
const fn set_stick_parity(&mut self, value: bool)
Bits: 5..6
Sourceconst fn set_stick_parity_checked(&mut self, value: bool) -> Result<(), ()>
const 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
Sourceconst fn set_set_break(&mut self, value: bool)
const fn set_set_break(&mut self, value: bool)
Bits: 6..7
Sourceconst fn set_set_break_checked(&mut self, value: bool) -> Result<(), ()>
const 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
Sourceconst fn set_divisor_latch_access(&mut self, value: bool)
const 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
Sourceconst fn set_divisor_latch_access_checked(
&mut self,
value: bool,
) -> Result<(), ()>
const 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 u8)
unsafe fn clone_to_uninit(&self, dst: *mut u8)
clone_to_uninit
)