Skip to main content

UART4

Struct UART4 

Source
pub struct UART4<RX, TX, RTS, CTS> { /* private fields */ }
๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Expand description

UARTX represents the corresponding SERCOMX instance configured to act in the role of a UART Master. Objects of this type implement the HAL serial::Read, serial::Write traits.

This type is generic over any valid pad mapping where there is a defined โ€œreceive pin out transmit pin outโ€ implementation.

Implementationsยง

Sourceยง

impl<RX, TX, RTS, CTS> UART4<RX, TX, RTS, CTS>

Source

pub fn new<F, T>( clock: &Sercom4CoreClock, freq: F, sercom: SERCOM4, mclk: &mut MCLK, padout: T, ) -> UART4<RX, TX, RTS, CTS>
where F: Into<Hertz>, T: Into<Padout<SERCOM4, RX, TX, RTS, CTS>>, Padout<SERCOM4, RX, TX, RTS, CTS>: RxpoTxpo,

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Source

pub fn free(self) -> (Padout<SERCOM4, RX, TX, RTS, CTS>, SERCOM4)

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Source

pub fn split(self) -> (UART4Tx<TX, RTS>, UART4Rx<RX, CTS>)

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Splits the UART into transmit and receive halves

Source

pub fn join( tx: UART4Tx<TX, RTS>, rx: UART4Rx<RX, CTS>, ) -> UART4<RX, TX, RTS, CTS>

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Combines transmit and receive halves back into a duplex UART

Source

pub fn intenset<F>(&mut self, f: F)
where F: FnOnce(&mut W<u8, Reg<u8, _INTENSET>>),

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Source

pub fn intenclr<F>(&mut self, f: F)
where F: FnOnce(&mut W<u8, Reg<u8, _INTENCLR>>),

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Source

pub fn flags(&self) -> R<u16, Reg<u16, _STATUS>>

๐Ÿ‘ŽDeprecated since 0.13.0:

The sercom::v1::uart module is deprecated, and will be removed in a subsequent release. Please use the sercom::v2::uart module instead.

Trait Implementationsยง

Sourceยง

impl<RX, TX, RTS, CTS> Default<u8> for UART4<RX, TX, RTS, CTS>

Sourceยง

impl<RX, TX, RTS, CTS> Read<u8> for UART4<RX, TX, RTS, CTS>

Sourceยง

type Error = ()

Read error
Sourceยง

fn read( &mut self, ) -> Result<u8, Error<<UART4<RX, TX, RTS, CTS> as Read<u8>>::Error>>

Reads a single word from the serial interface
Sourceยง

impl<RX, TX, RTS, CTS> Write for UART4<RX, TX, RTS, CTS>

Sourceยง

fn write_str(&mut self, s: &str) -> Result<(), Error>

Writes a string slice into this writer, returning whether the write succeeded. Read more
1.1.0 ยท Sourceยง

fn write_char(&mut self, c: char) -> Result<(), Error>

Writes a char into this writer, returning whether the write succeeded. Read more
1.0.0 ยท Sourceยง

fn write_fmt(&mut self, args: Arguments<'_>) -> Result<(), Error>

Glue for usage of the write! macro with implementors of this trait. Read more
Sourceยง

impl<RX, TX, RTS, CTS> Write<u8> for UART4<RX, TX, RTS, CTS>

Sourceยง

type Error = ()

Write error
Sourceยง

fn write( &mut self, word: u8, ) -> Result<(), Error<<UART4<RX, TX, RTS, CTS> as Write<u8>>::Error>>

Writes a single word to the serial interface
Sourceยง

fn flush( &mut self, ) -> Result<(), Error<<UART4<RX, TX, RTS, CTS> as Write<u8>>::Error>>

Ensures that none of the previously written words are still buffered

Auto Trait Implementationsยง

ยง

impl<RX, TX, RTS, CTS> !Sync for UART4<RX, TX, RTS, CTS>

ยง

impl<RX, TX, RTS, CTS> Freeze for UART4<RX, TX, RTS, CTS>
where RX: Freeze, TX: Freeze, RTS: Freeze, CTS: Freeze,

ยง

impl<RX, TX, RTS, CTS> RefUnwindSafe for UART4<RX, TX, RTS, CTS>

ยง

impl<RX, TX, RTS, CTS> Send for UART4<RX, TX, RTS, CTS>
where RX: Send, TX: Send, RTS: Send, CTS: Send,

ยง

impl<RX, TX, RTS, CTS> Unpin for UART4<RX, TX, RTS, CTS>
where RX: Unpin, TX: Unpin, RTS: Unpin, CTS: Unpin,

ยง

impl<RX, TX, RTS, CTS> UnsafeUnpin for UART4<RX, TX, RTS, CTS>
where RX: UnsafeUnpin, TX: UnsafeUnpin, RTS: UnsafeUnpin, CTS: UnsafeUnpin,

ยง

impl<RX, TX, RTS, CTS> UnwindSafe for UART4<RX, TX, RTS, CTS>
where RX: UnwindSafe, TX: UnwindSafe, RTS: UnwindSafe, CTS: UnwindSafe,

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> Az for T

Sourceยง

fn az<Dst>(self) -> Dst
where T: Cast<Dst>,

Casts the value.
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<Src, Dst> CastFrom<Src> for Dst
where Src: Cast<Dst>,

Sourceยง

fn cast_from(src: Src) -> Dst

Casts the value.
Sourceยง

impl<T> CheckedAs for T

Sourceยง

fn checked_as<Dst>(self) -> Option<Dst>
where T: CheckedCast<Dst>,

Casts the value.
Sourceยง

impl<Src, Dst> CheckedCastFrom<Src> for Dst
where Src: CheckedCast<Dst>,

Sourceยง

fn checked_cast_from(src: Src) -> Option<Dst>

Casts the value.
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> OverflowingAs for T

Sourceยง

fn overflowing_as<Dst>(self) -> (Dst, bool)
where T: OverflowingCast<Dst>,

Casts the value.
Sourceยง

impl<Src, Dst> OverflowingCastFrom<Src> for Dst
where Src: OverflowingCast<Dst>,

Sourceยง

fn overflowing_cast_from(src: Src) -> (Dst, bool)

Casts the value.
Sourceยง

impl<T> Same for T

Sourceยง

type Output = T

Should always be Self
Sourceยง

impl<T> SaturatingAs for T

Sourceยง

fn saturating_as<Dst>(self) -> Dst
where T: SaturatingCast<Dst>,

Casts the value.
Sourceยง

impl<Src, Dst> SaturatingCastFrom<Src> for Dst
where Src: SaturatingCast<Dst>,

Sourceยง

fn saturating_cast_from(src: Src) -> Dst

Casts the value.
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.
Sourceยง

impl<T> UnwrappedAs for T

Sourceยง

fn unwrapped_as<Dst>(self) -> Dst
where T: UnwrappedCast<Dst>,

Casts the value.
Sourceยง

impl<Src, Dst> UnwrappedCastFrom<Src> for Dst
where Src: UnwrappedCast<Dst>,

Sourceยง

fn unwrapped_cast_from(src: Src) -> Dst

Casts the value.
Sourceยง

impl<T> WrappingAs for T

Sourceยง

fn wrapping_as<Dst>(self) -> Dst
where T: WrappingCast<Dst>,

Casts the value.
Sourceยง

impl<Src, Dst> WrappingCastFrom<Src> for Dst
where Src: WrappingCast<Dst>,

Sourceยง

fn wrapping_cast_from(src: Src) -> Dst

Casts the value.
Sourceยง

impl<S, Word> Write<Word> for S
where S: Default<Word>, Word: Clone,

Sourceยง

type Error = <S as Write<Word>>::Error

The type of error that can occur when writing
Sourceยง

fn bwrite_all( &mut self, buffer: &[Word], ) -> Result<(), <S as Write<Word>>::Error>

Writes a slice, blocking until everything has been written Read more
Sourceยง

fn bflush(&mut self) -> Result<(), <S as Write<Word>>::Error>

Block until the serial interface has sent all buffered words