Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
i2s_driver_api Struct Reference

Driver Operations I2S driver operations More...

#include <zephyr/drivers/i2s.h>

Data Fields

int(* configure )(const struct device *dev, enum i2s_dir dir, const struct i2s_config *cfg)
  REQ Configure operation of a host I2S controller. See i2s_configure() for arguments description.
const struct i2s_config *(* config_get )(const struct device *dev, enum i2s_dir dir)
  REQ Fetch configuration information of a host I2S controller. See i2s_config_get() for arguments description.
int(* read )(const struct device *dev, void **mem_block, size_t *size)
  REQ Read data from the RX queue. See i2s_read() for arguments description.
int(* write )(const struct device *dev, void *mem_block, size_t size)
  REQ Write data to the TX queue. See i2s_write() for arguments description.
int(* trigger )(const struct device *dev, enum i2s_dir dir, enum i2s_trigger_cmd cmd)
  REQ Send a trigger command. See i2s_trigger() for arguments description.

Detailed Description

Driver Operations I2S driver operations

This is the driver API structure any I2S driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ config_get

const struct i2s_config *(* i2s_driver_api::config_get) (const struct device *dev, enum i2s_dir dir)

REQ Fetch configuration information of a host I2S controller. See i2s_config_get() for arguments description.

◆ configure

int(* i2s_driver_api::configure) (const struct device *dev, enum i2s_dir dir, const struct i2s_config *cfg)

REQ Configure operation of a host I2S controller. See i2s_configure() for arguments description.

◆ read

int(* i2s_driver_api::read) (const struct device *dev, void **mem_block, size_t *size)

REQ Read data from the RX queue. See i2s_read() for arguments description.

◆ trigger

int(* i2s_driver_api::trigger) (const struct device *dev, enum i2s_dir dir, enum i2s_trigger_cmd cmd)

REQ Send a trigger command. See i2s_trigger() for arguments description.

◆ write

int(* i2s_driver_api::write) (const struct device *dev, void *mem_block, size_t size)

REQ Write data to the TX queue. See i2s_write() for arguments description.


The documentation for this struct was generated from the following file: