Skip to main content

i2s_chan_info_t

Struct i2s_chan_info_t 

Source
#[repr(C)]
pub struct i2s_chan_info_t { pub id: i2s_port_t, pub role: i2s_role_t, pub dir: i2s_dir_t, pub mode: i2s_comm_mode_t, pub is_enabled: bool, pub pair_chan: i2s_chan_handle_t, pub total_dma_buf_size: u32, pub clk_src: i2s_clock_src_t, pub sclk_hz: u32, pub mclk_hz: u32, pub bclk_hz: u32, pub mode_cfg: *const c_void, }
Expand description

@brief I2S channel information

Fields§

§id: i2s_port_t

< I2S port id

§role: i2s_role_t

< I2S role, I2S_ROLE_MASTER or I2S_ROLE_SLAVE

§dir: i2s_dir_t

< I2S channel direction

§mode: i2s_comm_mode_t

< I2S channel communication mode

§is_enabled: bool

< I2S channel is enabled or not

§pair_chan: i2s_chan_handle_t

< I2S pair channel handle in duplex mode, always NULL in simplex mode

§total_dma_buf_size: u32

< Total size of all the allocated DMA buffers

  • 0 if the channel has not been initialized
  • non-zero if the channel has been initialized
§clk_src: i2s_clock_src_t

< Clock source of I2S

§sclk_hz: u32

< Source clock frequency

§mclk_hz: u32

< MCLK frequency

§bclk_hz: u32

< BCLK frequency

§mode_cfg: *const c_void

< Mode configuration, it need to be casted to the corresponding type according to the communication mode

  • I2S_COMM_MODE_STD: i2s_std_config_t*
  • I2S_COMM_MODE_TDM: i2s_tdm_config_t*
  • I2S_COMM_MODE_PDM + I2S_DIR_RX: i2s_pdm_rx_config_t*
  • I2S_COMM_MODE_PDM + I2S_DIR_TX: i2s_pdm_tx_config_t*

Trait Implementations§

Source§

impl Clone for i2s_chan_info_t

Source§

fn clone(&self) -> i2s_chan_info_t

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for i2s_chan_info_t

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for i2s_chan_info_t

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Copy for i2s_chan_info_t

Auto Trait Implementations§

§

impl Freeze for i2s_chan_info_t

§

impl RefUnwindSafe for i2s_chan_info_t

§

impl !Send for i2s_chan_info_t

§

impl !Sync for i2s_chan_info_t

§

impl Unpin for i2s_chan_info_t

§

impl UnsafeUnpin for i2s_chan_info_t

§

impl UnwindSafe for i2s_chan_info_t

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.