pub struct Serial<USART> { /* private fields */ }
Expand description

Serial abstraction

Implementations§

source§

impl Serial<USART1>

Configures a USART peripheral to provide serial communication

source

pub fn usart1( usart: USART1, config: impl Into<Config>, prec: Usart1, clocks: &CoreClocks, synchronous: bool ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>, synchronous: bool)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<USART1>, Rx<USART1>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<USART1>, rx: Rx<USART1>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> USART1

Releases the USART peripheral

source

pub fn inner(&self) -> &USART1

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut USART1

Returns a mutable reference to the inner peripheral

source§

impl Serial<USART2>

Configures a USART peripheral to provide serial communication

source

pub fn usart2( usart: USART2, config: impl Into<Config>, prec: Usart2, clocks: &CoreClocks, synchronous: bool ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>, synchronous: bool)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<USART2>, Rx<USART2>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<USART2>, rx: Rx<USART2>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> USART2

Releases the USART peripheral

source

pub fn inner(&self) -> &USART2

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut USART2

Returns a mutable reference to the inner peripheral

source§

impl Serial<USART3>

Configures a USART peripheral to provide serial communication

source

pub fn usart3( usart: USART3, config: impl Into<Config>, prec: Usart3, clocks: &CoreClocks, synchronous: bool ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>, synchronous: bool)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<USART3>, Rx<USART3>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<USART3>, rx: Rx<USART3>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> USART3

Releases the USART peripheral

source

pub fn inner(&self) -> &USART3

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut USART3

Returns a mutable reference to the inner peripheral

source§

impl Serial<USART6>

Configures a USART peripheral to provide serial communication

source

pub fn usart6( usart: USART6, config: impl Into<Config>, prec: Usart6, clocks: &CoreClocks, synchronous: bool ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>, synchronous: bool)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<USART6>, Rx<USART6>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<USART6>, rx: Rx<USART6>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> USART6

Releases the USART peripheral

source

pub fn inner(&self) -> &USART6

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut USART6

Returns a mutable reference to the inner peripheral

source§

impl Serial<UART4>

Configures a USART peripheral to provide serial communication

source

pub fn uart4( usart: UART4, config: impl Into<Config>, prec: Uart4, clocks: &CoreClocks ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<UART4>, Rx<UART4>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<UART4>, rx: Rx<UART4>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> UART4

Releases the USART peripheral

source

pub fn inner(&self) -> &UART4

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut UART4

Returns a mutable reference to the inner peripheral

source§

impl Serial<UART5>

Configures a USART peripheral to provide serial communication

source

pub fn uart5( usart: UART5, config: impl Into<Config>, prec: Uart5, clocks: &CoreClocks ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<UART5>, Rx<UART5>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<UART5>, rx: Rx<UART5>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> UART5

Releases the USART peripheral

source

pub fn inner(&self) -> &UART5

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut UART5

Returns a mutable reference to the inner peripheral

source§

impl Serial<UART7>

Configures a USART peripheral to provide serial communication

source

pub fn uart7( usart: UART7, config: impl Into<Config>, prec: Uart7, clocks: &CoreClocks ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<UART7>, Rx<UART7>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<UART7>, rx: Rx<UART7>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> UART7

Releases the USART peripheral

source

pub fn inner(&self) -> &UART7

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut UART7

Returns a mutable reference to the inner peripheral

source§

impl Serial<UART8>

Configures a USART peripheral to provide serial communication

source

pub fn uart8( usart: UART8, config: impl Into<Config>, prec: Uart8, clocks: &CoreClocks ) -> Result<Self, InvalidConfig>

source

pub fn reconfigure(&mut self, config: impl Into<Config>)

Applies the configuration to the serial port.

Ensure that the serial port is not transmitting data when calling this method.

§Panics

Panics if DMA Rx or Tx are enabled.

source

pub fn enable_dma_rx(&mut self)

Enables the Rx DMA stream.

source

pub fn disable_dma_rx(&mut self)

Disables the Rx DMA stream.

source

pub fn dma_rx_enabled(&self) -> bool

Returns true if the Rx DMA stream is enabled.

source

pub fn enable_dma_tx(&mut self)

Enables the Tx DMA stream.

source

pub fn disable_dma_tx(&mut self)

Disables the Tx DMA stream.

source

pub fn dma_tx_enabled(&self) -> bool

Returns true if the Tx DMA stream is enabled.

source

pub fn listen(&mut self, event: Event)

Starts listening for an interrupt event

source

pub fn unlisten(&mut self, event: Event)

Stop listening for an interrupt event

source

pub fn is_idle(&self) -> bool

Return true if the line idle status is set

The line idle status bit is set when the peripheral detects the receive line is idle. The bit is cleared by software, by calling clear_idle().

source

pub fn clear_idle(&mut self)

Clear the line idle status bit

source

pub fn is_busy(&self) -> bool

Return true if the line busy status is set

The busy status bit is set when there is communication active on the receive line, and reset at the end of reception.

source

pub fn is_txe(&self) -> bool

Return true if the tx register is empty (and can accept data)

source

pub fn is_rxne(&self) -> bool

Return true if the rx register is not empty (and can be read)

source

pub fn split(self) -> (Tx<UART8>, Rx<UART8>)

Splits the Serial struct into transmit (Tx) and receive (Rx) parts which can be used separately.

source

pub fn join(tx: Tx<UART8>, rx: Rx<UART8>) -> Self

Combines the Tx and Rx structs from Serial::split() into a Serial

source

pub fn release(self) -> UART8

Releases the USART peripheral

source

pub fn inner(&self) -> &UART8

Returns a reference to the inner peripheral

source

pub fn inner_mut(&mut self) -> &mut UART8

Returns a mutable reference to the inner peripheral

source§

impl Serial<USART1>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for USART1

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for USART1

§Panics

Panics if the kernel clock is not running

source§

impl Serial<USART6>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for USART6

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for USART6

§Panics

Panics if the kernel clock is not running

source§

impl Serial<USART2>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for USART2

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for USART2

§Panics

Panics if the kernel clock is not running

source§

impl Serial<USART3>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for USART3

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for USART3

§Panics

Panics if the kernel clock is not running

source§

impl Serial<UART4>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for UART4

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for UART4

§Panics

Panics if the kernel clock is not running

source§

impl Serial<UART5>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for UART5

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for UART5

§Panics

Panics if the kernel clock is not running

source§

impl Serial<UART8>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for UART8

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for UART8

§Panics

Panics if the kernel clock is not running

source§

impl Serial<UART7>

source

pub fn kernel_clk(clocks: &CoreClocks) -> Option<Hertz>

Returns the frequency of the current kernel clock for UART7

source

pub fn kernel_clk_unwrap(clocks: &CoreClocks) -> Hertz

Returns the frequency of the current kernel clock for UART7

§Panics

Panics if the kernel clock is not running

Trait Implementations§

source§

impl TargetAddress<MemoryToPeripheral> for Serial<UART4>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<UART5>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<UART7>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<UART8>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<USART1>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<USART2>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<USART3>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<MemoryToPeripheral> for Serial<USART6>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<UART4>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<UART5>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<UART7>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<UART8>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<USART1>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<USART2>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<USART3>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl TargetAddress<PeripheralToMemory> for Serial<USART6>

source§

fn address(&self) -> usize

The address to be used by the DMA stream
§

type MemSize = u8

Memory size of the target address
source§

const REQUEST_LINE: Option<u8> = _

An optional associated request line
source§

const TRBUFF: bool = true

Mark that the TRBUFF bit must be set for this target
source§

impl<USART> Write for Serial<USART>
where Serial<USART>: Write<u8>,

source§

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

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 Read<u8> for Serial<UART4>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<UART5>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<UART7>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<UART8>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<USART1>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<USART2>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<USART3>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Read<u8> for Serial<USART6>

§

type Error = Error

Read error
source§

fn read(&mut self) -> Result<u8, Error>

Reads a single word from the serial interface
source§

impl Write<u8> for Serial<UART4>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<UART5>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<UART7>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<UART8>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<USART1>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<USART2>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<USART3>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Write<u8> for Serial<USART6>

§

type Error = Infallible

Write error
source§

fn flush(&mut self) -> Result<(), Self::Error>

Ensures that none of the previously written words are still buffered
source§

fn write(&mut self, byte: u8) -> Result<(), Self::Error>

Writes a single word to the serial interface
source§

impl Default<u8> for Serial<UART4>

source§

impl Default<u8> for Serial<UART5>

source§

impl Default<u8> for Serial<UART7>

source§

impl Default<u8> for Serial<UART8>

source§

impl Default<u8> for Serial<USART1>

source§

impl Default<u8> for Serial<USART2>

source§

impl Default<u8> for Serial<USART3>

source§

impl Default<u8> for Serial<USART6>

Auto Trait Implementations§

§

impl<USART> Freeze for Serial<USART>
where USART: Freeze,

§

impl<USART> RefUnwindSafe for Serial<USART>
where USART: RefUnwindSafe,

§

impl<USART> Send for Serial<USART>
where USART: Send,

§

impl<USART> Sync for Serial<USART>
where USART: Sync,

§

impl<USART> Unpin for Serial<USART>
where USART: Unpin,

§

impl<USART> UnwindSafe for Serial<USART>
where USART: 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> 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>,

§

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

§

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<S, Word> Write<Word> for S
where S: Default<Word>, Word: Clone,

§

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