[][src]Struct tm4c129x_hal::serial::Serial

pub struct Serial<UART, TX, RX, RTS, CTS> { /* fields omitted */ }

Serial abstraction

Implementations

impl<TX, RX, RTS, CTS> Serial<UART0, TX, RX, RTS, CTS>[src]

pub fn uart0(
    uart: UART0,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART0>,
    RX: RxPin<UART0>,
    CTS: CtsPin<UART0>,
    RTS: RtsPin<UART0>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART0, TX, RTS>, Rx<UART0, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART0, TX, RTS>,
    rx: Rx<UART0, RX, CTS>
) -> Serial<UART0, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART0, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART1, TX, RX, RTS, CTS>[src]

pub fn uart1(
    uart: UART1,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART1>,
    RX: RxPin<UART1>,
    CTS: CtsPin<UART1>,
    RTS: RtsPin<UART1>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART1, TX, RTS>, Rx<UART1, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART1, TX, RTS>,
    rx: Rx<UART1, RX, CTS>
) -> Serial<UART1, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART1, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART2, TX, RX, RTS, CTS>[src]

pub fn uart2(
    uart: UART2,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART2>,
    RX: RxPin<UART2>,
    CTS: CtsPin<UART2>,
    RTS: RtsPin<UART2>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART2, TX, RTS>, Rx<UART2, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART2, TX, RTS>,
    rx: Rx<UART2, RX, CTS>
) -> Serial<UART2, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART2, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART3, TX, RX, RTS, CTS>[src]

pub fn uart3(
    uart: UART3,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART3>,
    RX: RxPin<UART3>,
    CTS: CtsPin<UART3>,
    RTS: RtsPin<UART3>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART3, TX, RTS>, Rx<UART3, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART3, TX, RTS>,
    rx: Rx<UART3, RX, CTS>
) -> Serial<UART3, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART3, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART4, TX, RX, RTS, CTS>[src]

pub fn uart4(
    uart: UART4,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART4>,
    RX: RxPin<UART4>,
    CTS: CtsPin<UART4>,
    RTS: RtsPin<UART4>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART4, TX, RTS>, Rx<UART4, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART4, TX, RTS>,
    rx: Rx<UART4, RX, CTS>
) -> Serial<UART4, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART4, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART5, TX, RX, RTS, CTS>[src]

pub fn uart5(
    uart: UART5,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART5>,
    RX: RxPin<UART5>,
    CTS: CtsPin<UART5>,
    RTS: RtsPin<UART5>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART5, TX, RTS>, Rx<UART5, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART5, TX, RTS>,
    rx: Rx<UART5, RX, CTS>
) -> Serial<UART5, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART5, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART6, TX, RX, RTS, CTS>[src]

pub fn uart6(
    uart: UART6,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART6>,
    RX: RxPin<UART6>,
    CTS: CtsPin<UART6>,
    RTS: RtsPin<UART6>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART6, TX, RTS>, Rx<UART6, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART6, TX, RTS>,
    rx: Rx<UART6, RX, CTS>
) -> Serial<UART6, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART6, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

impl<TX, RX, RTS, CTS> Serial<UART7, TX, RX, RTS, CTS>[src]

pub fn uart7(
    uart: UART7,
    tx_pin: TX,
    rx_pin: RX,
    rts_pin: RTS,
    cts_pin: CTS,
    baud_rate: Bps,
    nl_mode: NewlineMode,
    clocks: &Clocks,
    pc: &PowerControl
) -> Self where
    TX: TxPin<UART7>,
    RX: RxPin<UART7>,
    CTS: CtsPin<UART7>,
    RTS: RtsPin<UART7>, 
[src]

Configures a UART peripheral to provide serial communication

pub fn change_baud_rate(&mut self, baud_rate: Bps, clocks: &Clocks)[src]

Change the current baud rate for the UART. We need the clocks object in order to calculate the magic baud rate register values.

pub fn split(self) -> (Tx<UART7, TX, RTS>, Rx<UART7, RX, CTS>)[src]

Splits the Serial abstraction into a transmitter and a receiver half. If you do this you can transmit and receive in different threads.

pub fn write_all<I: ?Sized>(&mut self, data: &I) where
    I: AsRef<[u8]>, 
[src]

Write a complete string to the UART.

pub fn combine(
    tx: Tx<UART7, TX, RTS>,
    rx: Rx<UART7, RX, CTS>
) -> Serial<UART7, TX, RX, RTS, CTS>
[src]

Re-combine a split UART

pub fn free(self) -> (UART7, TX, RX, RTS, CTS)[src]

Releases the UART peripheral and associated pins

Trait Implementations

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART0, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART1, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART2, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART3, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART4, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART5, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART6, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Read<u8> for Serial<UART7, TX, RX, RTS, CTS>[src]

type Error = Void

Read error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART0, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART1, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART2, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART3, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART4, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART5, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART6, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write<u8> for Serial<UART7, TX, RX, RTS, CTS>[src]

type Error = Void

Write error

impl<TX, RX, RTS, CTS> Write for Serial<UART0, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART1, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART2, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART3, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART4, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART5, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART6, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

impl<TX, RX, RTS, CTS> Write for Serial<UART7, TX, RX, RTS, CTS>[src]

Allows the Uart to be passed to 'write!()' and friends.

Auto Trait Implementations

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

impl<UART, TX, RX, RTS, CTS> Sync for Serial<UART, TX, RX, RTS, CTS> where
    CTS: Sync,
    RTS: Sync,
    RX: Sync,
    TX: Sync,
    UART: Sync

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

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.