Struct Cr2
#[repr(transparent)]pub struct Cr2(pub u32);
Expand description
Configuration register 2
Tuple Fields§
§0: u32
Implementations§
§impl Cr2
impl Cr2
pub const fn fflush(&self) -> bool
pub const fn fflush(&self) -> bool
FIFO flush. This bit is set by software. It is always read as 0. This bit should be configured when the SAI is disabled.
pub fn set_fflush(&mut self, val: bool)
pub fn set_fflush(&mut self, val: bool)
FIFO flush. This bit is set by software. It is always read as 0. This bit should be configured when the SAI is disabled.
pub const fn tris(&self) -> bool
pub const fn tris(&self) -> bool
Tristate management on data line. This bit is set and cleared by software. It is meaningful only if the audio block is configured as a transmitter. This bit is not used when the audio block is configured in SPDIF mode. It should be configured when SAI is disabled. Refer to Section: Output data line management on an inactive slot for more details.
pub fn set_tris(&mut self, val: bool)
pub fn set_tris(&mut self, val: bool)
Tristate management on data line. This bit is set and cleared by software. It is meaningful only if the audio block is configured as a transmitter. This bit is not used when the audio block is configured in SPDIF mode. It should be configured when SAI is disabled. Refer to Section: Output data line management on an inactive slot for more details.
pub const fn mute(&self) -> bool
pub const fn mute(&self) -> bool
Mute. This bit is set and cleared by software. It is meaningful only when the audio block operates as a transmitter. The MUTE value is linked to value of MUTEVAL if the number of slots is lower or equal to 2, or equal to 0 if it is greater than 2. Refer to Section: Mute mode for more details. Note: This bit is meaningless and should not be used for SPDIF audio blocks.
pub fn set_mute(&mut self, val: bool)
pub fn set_mute(&mut self, val: bool)
Mute. This bit is set and cleared by software. It is meaningful only when the audio block operates as a transmitter. The MUTE value is linked to value of MUTEVAL if the number of slots is lower or equal to 2, or equal to 0 if it is greater than 2. Refer to Section: Mute mode for more details. Note: This bit is meaningless and should not be used for SPDIF audio blocks.
pub const fn muteval(&self) -> Muteval
pub const fn muteval(&self) -> Muteval
Mute value. This bit is set and cleared by software.It must be written before enabling the audio block: SAIXEN. This bit is meaningful only when the audio block operates as a transmitter, the number of slots is lower or equal to 2 and the MUTE bit is set. If more slots are declared, the bit value sent during the transmission in mute mode is equal to 0, whatever the value of MUTEVAL. if the number of slot is lower or equal to 2 and MUTEVAL = 1, the MUTE value transmitted for each slot is the one sent during the previous frame. Refer to Section: Mute mode for more details. Note: This bit is meaningless and should not be used for SPDIF audio blocks.
pub fn set_muteval(&mut self, val: Muteval)
pub fn set_muteval(&mut self, val: Muteval)
Mute value. This bit is set and cleared by software.It must be written before enabling the audio block: SAIXEN. This bit is meaningful only when the audio block operates as a transmitter, the number of slots is lower or equal to 2 and the MUTE bit is set. If more slots are declared, the bit value sent during the transmission in mute mode is equal to 0, whatever the value of MUTEVAL. if the number of slot is lower or equal to 2 and MUTEVAL = 1, the MUTE value transmitted for each slot is the one sent during the previous frame. Refer to Section: Mute mode for more details. Note: This bit is meaningless and should not be used for SPDIF audio blocks.
pub const fn mutecnt(&self) -> u8
pub const fn mutecnt(&self) -> u8
Mute counter. These bits are set and cleared by software. They are used only in reception mode. The value set in these bits is compared to the number of consecutive mute frames detected in reception. When the number of mute frames is equal to this value, the flag MUTEDET will be set and an interrupt will be generated if bit MUTEDETIE is set. Refer to Section: Mute mode for more details.
pub fn set_mutecnt(&mut self, val: u8)
pub fn set_mutecnt(&mut self, val: u8)
Mute counter. These bits are set and cleared by software. They are used only in reception mode. The value set in these bits is compared to the number of consecutive mute frames detected in reception. When the number of mute frames is equal to this value, the flag MUTEDET will be set and an interrupt will be generated if bit MUTEDETIE is set. Refer to Section: Mute mode for more details.
pub const fn cpl(&self) -> Cpl
pub const fn cpl(&self) -> Cpl
Complement bit. This bit is set and cleared by software. It defines the type of complement to be used for companding mode Note: This bit has effect only when the companding mode is -Law algorithm or A-Law algorithm.
pub fn set_cpl(&mut self, val: Cpl)
pub fn set_cpl(&mut self, val: Cpl)
Complement bit. This bit is set and cleared by software. It defines the type of complement to be used for companding mode Note: This bit has effect only when the companding mode is -Law algorithm or A-Law algorithm.
pub const fn comp(&self) -> Comp
pub const fn comp(&self) -> Comp
Companding mode. These bits are set and cleared by software. The -Law and the A-Law log are a part of the CCITT G.711 recommendation, the type of complement that will be used depends on CPL bit. The data expansion or data compression are determined by the state of bit MODE[0]. The data compression is applied if the audio block is configured as a transmitter. The data expansion is automatically applied when the audio block is configured as a receiver. Refer to Section: Companding mode for more details. Note: Companding mode is applicable only when TDM is selected.
pub fn set_comp(&mut self, val: Comp)
pub fn set_comp(&mut self, val: Comp)
Companding mode. These bits are set and cleared by software. The -Law and the A-Law log are a part of the CCITT G.711 recommendation, the type of complement that will be used depends on CPL bit. The data expansion or data compression are determined by the state of bit MODE[0]. The data compression is applied if the audio block is configured as a transmitter. The data expansion is automatically applied when the audio block is configured as a receiver. Refer to Section: Companding mode for more details. Note: Companding mode is applicable only when TDM is selected.
Trait Implementations§
impl Copy for Cr2
impl Eq for Cr2
impl StructuralPartialEq for Cr2
Auto Trait Implementations§
impl Freeze for Cr2
impl RefUnwindSafe for Cr2
impl Send for Cr2
impl Sync for Cr2
impl Unpin for Cr2
impl UnwindSafe for Cr2
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)