PMSIS API
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
i2s.h File Reference

Data Structures

struct  pi_i2s_conf
 Interface configuration options. More...
 

Macros

#define PI_I2S_FMT_DATA_FORMAT_I2S
 Standard I2S Data Format. More...
 
#define PI_I2S_FMT_DATA_FORMAT_PDM
 Pulse-Density Modulation Format. More...
 
#define PI_I2S_CH_FMT_DATA_ORDER_MSB
 Data order MSB. More...
 
#define PI_I2S_CH_FMT_DATA_ORDER_LSB
 Data order LSB. More...
 
#define PI_I2S_CH_FMT_DATA_ALIGN_LEFT
 Data alignment left. More...
 
#define PI_I2S_CH_FMT_DATA_ALIGN_RIGHT
 Data alignment right. More...
 
#define PI_I2S_CH_FMT_DATA_SIGN_NO_EXTEND
 Data sign extension disabled. More...
 
#define PI_I2S_CH_FMT_DATA_SIGN_EXTEND
 Data sign extension enabled. More...
 
#define PI_I2S_OPT_PINGPONG
 Ping pong mode. More...
 
#define PI_I2S_OPT_MEM_SLAB
 Mem slab mode. More...
 
#define PI_I2S_OPT_FULL_DUPLEX
 Full duplex mode. More...
 
#define PI_I2S_OPT_DISABLED
 Disable the channel. More...
 
#define PI_I2S_OPT_ENABLED
 Enable the channel. More...
 
#define PI_I2S_OPT_IS_TX
 Configure TX channel. More...
 
#define PI_I2S_OPT_IS_RX
 Configure RX channel. More...
 
#define PI_I2S_OPT_LOOPBACK
 TX loopback. More...
 
#define PI_I2S_OPT_TDM
 TDM mode. More...
 
#define PI_I2S_OPT_INT_CLK
 Use internal clock. More...
 
#define PI_I2S_OPT_EXT_CLK
 Use external clock. More...
 
#define PI_I2S_OPT_INT_WS
 Use internal word strobe. More...
 
#define PI_I2S_OPT_EXT_WS
 Use external word strobe. More...
 

Typedefs

typedef uint8_t pi_i2s_fmt_t
 
typedef uint16_t pi_i2s_opt_t
 

Enumerations

enum  pi_i2s_ioctl_cmd_e
 IOCTL command. More...
 

Functions

void pi_i2s_setup (uint32_t flags)
 Setup specific I2S aspects. More...
 
void pi_i2s_conf_init (struct pi_i2s_conf *conf)
 Initialize an I2S configuration with default values. More...
 
int pi_i2s_open (struct pi_device *device)
 Open an I2S device. More...
 
void pi_i2s_close (struct pi_device *device)
 Close an opened I2S device. More...
 
int pi_i2s_ioctl (struct pi_device *device, uint32_t cmd, void *arg)
 Dynamically change the device configuration. More...
 
int pi_i2s_read (struct pi_device *dev, void **mem_block, size_t *size)
 Read data from the RX queue. More...
 
int pi_i2s_read_async (struct pi_device *dev, pi_task_t *task)
 Read data asynchronously from the RX queue. More...
 
int pi_i2s_write (struct pi_device *dev, void *mem_block, size_t size)
 Write data to the TX queue of a channel. More...
 
int pi_i2s_write_async (struct pi_device *dev, void *mem_block, size_t size, pi_task_t *task)
 Write data asynchronously to the TX queue of a channel. More...
 
int pi_i2s_channel_read (struct pi_device *dev, int channel, void **mem_block, size_t *size)
 Read data from the RX queue of a channel in TDM mode. More...
 
int pi_i2s_channel_read_async (struct pi_device *dev, int channel, pi_task_t *task)
 Read data asynchronously from the RX queue of a channel in TDM mode. More...
 
int pi_i2s_read_status (pi_task_t *task, void **mem_block, size_t *size)
 Read the status of an asynchronous read. More...
 
int pi_i2s_channel_write (struct pi_device *dev, int channel, void *mem_block, size_t size)
 Write data to the TX queue of a channel in TDM mode. More...
 
int pi_i2s_channel_write_async (struct pi_device *dev, int channel, void *mem_block, size_t size, pi_task_t *task)
 Write data asynchronously to the TX queue of a channel in TDM mode. More...
 
int pi_i2s_write_status (pi_task_t *task)
 Read the status of an asynchronous write. More...