pub type R = R<CR1rs>;
Expand description
Register CR1
reader
Aliased Type§
pub struct R { /* private fields */ }
Implementations§
Source§impl R
impl R
Sourcepub fn cpha(&self) -> CPHA_R
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.
Sourcepub fn cpol(&self) -> CPOL_R
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.
Sourcepub fn mstr(&self) -> MSTR_R
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.
Sourcepub fn br(&self) -> BR_R
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.
Sourcepub fn spe(&self) -> SPE_R
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.
Sourcepub fn lsbfirst(&self) -> LSBFIRST_R
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.
Sourcepub fn ssi(&self) -> SSI_R
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.
Sourcepub fn ssm(&self) -> SSM_R
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.
Sourcepub fn rxonly(&self) -> RXONLY_R
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.
Sourcepub fn crcl(&self) -> CRCL_R
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.
Sourcepub fn crcnext(&self) -> CRCNEXT_R
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.
Sourcepub fn crcen(&self) -> CRCEN_R
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.
Sourcepub fn bidioe(&self) -> BIDIOE_R
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.
Sourcepub fn bidimode(&self) -> BIDIMODE_R
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.