Struct stm32_i2s_v12x::driver::Status
source · pub struct Status<MS, DIR, STD> { /* private fields */ }
Expand description
Content of the status register.
MS
:Master
orSlave
DIR
: communication direction,Transmit
orReceive
STD
: I2S standard, egPhilips
Implementations§
source§impl<MS, DIR, STD> Status<MS, DIR, STD>where
STD: ChannelFlag,
impl<MS, DIR, STD> Status<MS, DIR, STD>where
STD: ChannelFlag,
sourcepub fn chside(&self) -> Channel
pub fn chside(&self) -> Channel
Get the CHSIDE flag. It indicate the channel that has been received or will be transmitted.
This flag is updated when TXE or RXNE flags are set. This flag is meaningless and therefore not reliable in case of an error. This flag is not meaningful when using the PCM standard.
source§impl<DIR, STD> Status<Slave, DIR, STD>
impl<DIR, STD> Status<Slave, DIR, STD>
sourcepub fn fre(&self) -> bool
pub fn fre(&self) -> bool
Get the FRE flag. If true
, a frame error occurred.
This flag is set by hardware when the WS line changes at an unexpected moment. Usually, this indicates a synchronisation issue. This flag can only be set in Slave mode and therefore can only be read in this mode.
This flag is cleared when reading the status register.
source§impl<MS, STD> Status<MS, Receive, STD>
impl<MS, STD> Status<MS, Receive, STD>
sourcepub fn ovr(&self) -> bool
pub fn ovr(&self) -> bool
Get the OVR flag. If true
an overrun error occurred.
This flag is set when data are received and the previous data have not yet been read. As a result, the incoming data are lost. Since this flag can happen only in Receive mode, it can only be read in this mode.
This flag is cleared by a read operation on the data register followed by a read to the status register.
source§impl<MS, STD> Status<MS, Transmit, STD>
impl<MS, STD> Status<MS, Transmit, STD>
sourcepub fn txe(&self) -> bool
pub fn txe(&self) -> bool
Get the TXE flag. If true
the Tx buffer is empty and the next sample can be loaded into it.
This flag can only happen in transmission mode and therefore can only be read in this mode.
This flag is cleared by writing into the data register or by disabling the I2s peripheral.
source§impl<STD> Status<Slave, Transmit, STD>
impl<STD> Status<Slave, Transmit, STD>
sourcepub fn udr(&self) -> bool
pub fn udr(&self) -> bool
Get the UDR flag. If true
an underrun error occurred.
This flag is set when the first clock for data transmission appears while the software has not yet loaded any value into the data register. This flag can only be set in Slave Transmit mode and therefore can only be read in this mode.
This flag is cleared by reading the status register.