Disabled

Struct Disabled 

Source
pub struct Disabled<'a, const N: u8> { /* private fields */ }
Expand description

A temporarily-disabled LPUART peripheral.

The disabled peripheral lets you changed settings that require a disabled peripheral.

Implementations§

Source§

impl<'a, const N: u8> Disabled<'a, N>

Source

pub fn set_baud(&mut self, baud: &Baud)

Set baud-specific timing values for this UART peripheral.

The timing values are used to set a baud rate. To compute a baud rate, see Baud::compute. Or, you may compute your own timing values.

Source

pub fn set_parity(&mut self, parity: Option<Parity>)

Specify parity bit settings. If there is no parity, use None.

Source

pub fn set_inversion(&mut self, direction: Direction, inverted: bool)

Reverse the polarity of data, affecting all data bits, start and stop bits, and polarity bits.

The default inversion state is false.

Source

pub fn disable_fifo(&mut self, direction: Direction)

Disable the FIFO for the given direction.

Source

pub fn enable_fifo(&mut self, watermark: Watermark) -> u32

Enable the FIFO, and set the FIFO watermark.

watermark describes the serial direction, and the point at which the hardware signals a full or empty FIFO. Use Watermark::tx to enable the transfer FIFO, and Watermark::rx to enable the receive FIFO.

The actual watermark value is limited by the hardware. enable_fifo returns the actual watermark value.

Source

pub fn set_interrupts(&mut self, interrupts: Interrupts)

Set the interrupt flags for this LPUART peripheral.

Use set_interrupts to enable or disable interrupt generation for this peripheral.

Trait Implementations§

Source§

impl<const N: u8> Drop for Disabled<'_, N>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<'a, const N: u8> Freeze for Disabled<'a, N>

§

impl<'a, const N: u8> !RefUnwindSafe for Disabled<'a, N>

§

impl<'a, const N: u8> !Send for Disabled<'a, N>

§

impl<'a, const N: u8> !Sync for Disabled<'a, N>

§

impl<'a, const N: u8> Unpin for Disabled<'a, N>

§

impl<'a, const N: u8> !UnwindSafe for Disabled<'a, N>

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> 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.