Type Alias R

Source
pub type R = R<CR1rs>;
Expand description

Register CR1 reader

Aliased Type§

pub struct R { /* private fields */ }

Implementations§

Source§

impl R

Source

pub fn cpha(&self) -> CPHA_R

Bit 0 - Clock phase Note: This bit should not be changed when communication is ongoing. This bit is not used in I2S mode and SPI TI mode except the case when CRC is applied at TI mode.

Source

pub fn cpol(&self) -> CPOL_R

Bit 1 - Clock polarity Note: This bit should not be changed when communication is ongoing. This bit is not used in I2S mode and SPI TI mode except the case when CRC is applied at TI mode.

Source

pub fn mstr(&self) -> MSTR_R

Bit 2 - Master selection Note: This bit should not be changed when communication is ongoing. This bit is not used in I2S mode.

Source

pub fn br(&self) -> BR_R

Bits 3:5 - Baud rate control Note: These bits should not be changed when communication is ongoing. These bits are not used in I2S mode.

Source

pub fn spe(&self) -> SPE_R

Bit 6 - SPI enable Note: When disabling the SPI, follow the procedure described in SPI on page1020. This bit is not used in I2S mode.

Source

pub fn lsbfirst(&self) -> LSBFIRST_R

Bit 7 - Frame format Note: 1. This bit should not be changed when communication is ongoing. 2. This bit is not used in I2S mode and SPI TI mode.

Source

pub fn ssi(&self) -> SSI_R

Bit 8 - Internal slave select This bit has an effect only when the SSM bit is set. The value of this bit is forced onto the NSS pin and the I/O value of the NSS pin is ignored. Note: This bit is not used in I2S mode and SPI TI mode.

Source

pub fn ssm(&self) -> SSM_R

Bit 9 - Software slave management When the SSM bit is set, the NSS pin input is replaced with the value from the SSI bit. Note: This bit is not used in I2S mode and SPI TI mode.

Source

pub fn rxonly(&self) -> RXONLY_R

Bit 10 - Receive only mode enabled. This bit enables simplex communication using a single unidirectional line to receive data exclusively. Keep BIDIMODE bit clear when receive only mode is active.This bit is also useful in a multislave system in which this particular slave is not accessed, the output from the accessed slave is not corrupted. Note: This bit is not used in I2S mode.

Source

pub fn crcl(&self) -> CRCL_R

Bit 11 - CRC length This bit is set and cleared by software to select the CRC length. Note: This bit should be written only when SPI is disabled (SPE = ‘0’) for correct operation. This bit is not used in I2S mode.

Source

pub fn crcnext(&self) -> CRCNEXT_R

Bit 12 - Transmit CRC next Note: This bit has to be written as soon as the last data is written in the SPIx_DR register. This bit is not used in I2S mode.

Source

pub fn crcen(&self) -> CRCEN_R

Bit 13 - Hardware CRC calculation enable Note: This bit should be written only when SPI is disabled (SPE = ‘0’) for correct operation. This bit is not used in I2S mode.

Source

pub fn bidioe(&self) -> BIDIOE_R

Bit 14 - Output enable in bidirectional mode This bit combined with the BIDIMODE bit selects the direction of transfer in bidirectional mode. Note: In master mode, the MOSI pin is used and in slave mode, the MISO pin is used. This bit is not used in I2S mode.

Source

pub fn bidimode(&self) -> BIDIMODE_R

Bit 15 - Bidirectional data mode enable. This bit enables half-duplex communication using common single bidirectional data line. Keep RXONLY bit clear when bidirectional mode is active. Note: This bit is not used in I2S mode.

Trait Implementations§

Source§

impl Debug for R

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more