pub struct UART3<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> UART3<RX, TX, RTS, CTS>
impl<RX, TX, RTS, CTS> UART3<RX, TX, RTS, CTS>
sourcepub fn new<F, T>(
clock: &Sercom3CoreClock,
freq: F,
sercom: SERCOM3,
pm: &mut PM,
padout: T
) -> UART3<RX, TX, RTS, CTS>where
F: Into<Hertz>,
T: Into<Padout<SERCOM3, RX, TX, RTS, CTS>>,
Padout<SERCOM3, 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.
pub fn new<F, T>( clock: &Sercom3CoreClock, freq: F, sercom: SERCOM3, pm: &mut PM, padout: T ) -> UART3<RX, TX, RTS, CTS>where F: Into<Hertz>, T: Into<Padout<SERCOM3, RX, TX, RTS, CTS>>, Padout<SERCOM3, RX, TX, RTS, CTS>: RxpoTxpo,
sercom::v1::uart
module is deprecated, and will be removed in a subsequent release.
Please use the sercom::v2::uart
module instead.Power on and configure SERCOMX to work as a UART Master operating with the specified frequency. The padout specifies which pins are bound to the RX, TX and optionally RTS and CTS functions.
You can use any tuple of two or four SercomXPadY instances for which there exists a From implementation for UARTXPadout.
pub fn free(self) -> (Padout<SERCOM3, RX, TX, RTS, CTS>, SERCOM3)
👎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.sourcepub fn split(self) -> (UART3Tx<TX, RTS>, UART3Rx<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.
pub fn split(self) -> (UART3Tx<TX, RTS>, UART3Rx<RX, CTS>)
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
sourcepub fn join(
tx: UART3Tx<TX, RTS>,
rx: UART3Rx<RX, CTS>
) -> UART3<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.
pub fn join( tx: UART3Tx<TX, RTS>, rx: UART3Rx<RX, CTS> ) -> UART3<RX, TX, RTS, CTS>
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
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.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.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> Write<u8> for UART3<RX, TX, RTS, CTS>
impl<RX, TX, RTS, CTS> Write<u8> for UART3<RX, TX, RTS, CTS>
source§impl<RX, TX, RTS, CTS> Write for UART3<RX, TX, RTS, CTS>
impl<RX, TX, RTS, CTS> Write for UART3<RX, TX, RTS, CTS>
impl<RX, TX, RTS, CTS> Default<u8> for UART3<RX, TX, RTS, CTS>
Auto Trait Implementations§
impl<RX, TX, RTS, CTS> RefUnwindSafe for UART3<RX, TX, RTS, CTS>where CTS: RefUnwindSafe, RTS: RefUnwindSafe, RX: RefUnwindSafe, TX: RefUnwindSafe,
impl<RX, TX, RTS, CTS> Send for UART3<RX, TX, RTS, CTS>where CTS: Send, RTS: Send, RX: Send, TX: Send,
impl<RX, TX, RTS, CTS> !Sync for UART3<RX, TX, RTS, CTS>
impl<RX, TX, RTS, CTS> Unpin for UART3<RX, TX, RTS, CTS>where CTS: Unpin, RTS: Unpin, RX: Unpin, TX: Unpin,
impl<RX, TX, RTS, CTS> UnwindSafe for UART3<RX, TX, RTS, CTS>where CTS: UnwindSafe, RTS: UnwindSafe, RX: UnwindSafe, TX: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more