38#define IOT_I2S_SUCCESS ( 0 )
39#define IOT_I2S_INVALID_VALUE ( 1 )
40#define IOT_I2S_NOT_INITIALIZED ( 2 )
41#define IOT_I2S_BUSY ( 3 )
42#define IOT_I2S_WRITE_FAILED ( 4 )
43#define IOT_I2S_READ_FAILED ( 5 )
44#define IOT_I2S_NOTHING_TO_CANCEL ( 7 )
45#define IOT_I2S_FUNCTION_NOT_SUPPORTED ( 8 )
53 eI2SBusBusy = IOT_I2S_BUSY,
61 eI2SCompleted = IOT_I2S_SUCCESS,
62 eI2SLastWriteFailed = IOT_I2S_WRITE_FAILED,
63 eI2SLastReadFailed = IOT_I2S_READ_FAILED,
64} IotI2SOperationStatus_t;
76} IotI2SIoctlRequest_t;
84 eI2SLeftJustifiedMode,
85 eI2SRightJustifiedMode,
106} IotI2SClkPolarity_t;
125struct IotI2SDescriptor;
130typedef struct IotI2SDescriptor * IotI2SHandle_t;
141typedef void ( * IotI2SCallback_t )( IotI2SOperationStatus_t xOpStatus,
142 void * pvUserContext );
155IotI2SHandle_t iot_i2s_open( int32_t lI2SInstance );
169void iot_i2s_set_callback( IotI2SHandle_t
const pxI2SPeripheral,
170 IotI2SCallback_t xCallback,
171 void * pvUserContext );
189int32_t iot_i2s_read_async( IotI2SHandle_t
const pxI2SPeripheral,
190 uint8_t *
const pvBuffer,
209int32_t iot_i2s_write_async( IotI2SHandle_t
const pxI2SPeripheral,
210 uint8_t *
const pvBuffer,
229int32_t iot_i2s_read_sync( IotI2SHandle_t
const pxI2SPeripheral,
230 uint8_t *
const pvBuffer,
249int32_t iot_i2s_write_sync( IotI2SHandle_t
const pxI2SPeripheral,
250 uint8_t *
const pvBuffer,
264int32_t iot_i2s_close( IotI2SHandle_t
const pxI2SPeripheral );
294int32_t iot_i2s_ioctl( IotI2SHandle_t
const pxI2SPeripheral,
295 IotI2SIoctlRequest_t xI2SRequest,
296 void *
const pvBuffer );
309int32_t iot_i2s_cancel( IotI2SHandle_t
const pxI2SPeripheral );
I2S configuration.
Definition: iot_i2s.h:112
IotI2SChannel_t xI2SChannel
Definition: iot_i2s.h:114
IotI2SClkPolarity_t xI2SWsPolarity
Definition: iot_i2s.h:116
uint32_t ulI2SDataLength
Definition: iot_i2s.h:118
IotI2SClkPolarity_t xI2SSckPolarity
Definition: iot_i2s.h:115
IotI2SMode_t xI2SMode
Definition: iot_i2s.h:113
uint32_t ulI2SFrameLength
Definition: iot_i2s.h:119
uint32_t ulI2SFrequency
Definition: iot_i2s.h:117