Struct stm32_i2s_v12x::format::Data24Frame32 [−][src]
32 bits transferred for each audio sample, represented in memory with 24 bits per sample
Receiving
When receiving, the 8 least significant bits are ignored. Each received sample will be sign- extended to 32 bits.
Example (I2S, MSB justified, or PCM)
Bits on wire: 1000 1110 1010 1010 0011 0011 xxxx xxxx
Received 32-bit sample in memory: 1111 1111 1000 1110 1010 1010 0011 0011
(0xff8eaa33
)
Example (LSB justified)
Bits on wire: xxxx xxxx 1000 1110 1010 1010 0011 0011
Received 32-bit sample in memory: 1111 1111 1000 1110 1010 1010 0011 0011
(0xff8eaa33
)
Transmitting
When transmitting, the 8 most significant bits of each 32-bit sample are ignored. The final 8 bits sent on the wire will all be zero.
Example (I2S, MSB justified, or PCM)
32-bit sample in memory: xxxx xxxx 1000 1110 1010 1010 0011 0011
(8 most significant bits
can be anything, other 24 bits are 0x8eaa33)
Bits on wire: 1000 1110 1010 1010 0011 0011 0000 0000
Example (LSB justified)
32-bit sample in memory: xxxx xxxx 1000 1110 1010 1010 0011 0011
(8 most significant bits
can be anything, other 24 bits are 0x8eaa33)
Bits on wire: 0000 0000 1000 1110 1010 1010 0011 0011
Trait Implementations
impl Clone for Data24Frame32
[src]
fn clone(&self) -> Data24Frame32
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl DataFormat for Data24Frame32
[src]
impl DataFormatType for Data24Frame32
[src]
type Sample = i32
The type used to represent a sample in memory
impl Debug for Data24Frame32
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,