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,
65 } IotI2SOperationStatus_t;
77 } IotI2SIoctlRequest_t;
85 eI2SLeftJustifiedMode,
86 eI2SRightJustifiedMode,
107 } IotI2SClkPolarity_t;
126 struct IotI2SDescriptor;
131 typedef struct IotI2SDescriptor * IotI2SHandle_t;
142 typedef void ( * IotI2SCallback_t )( IotI2SOperationStatus_t xOpStatus,
void * pvUserContext );
155 IotI2SHandle_t iot_i2s_open( int32_t lI2SInstance );
169 void iot_i2s_set_callback( IotI2SHandle_t
const pxI2SPeripheral,
170 IotI2SCallback_t xCallback,
171 void * pvUserContext );
189 int32_t iot_i2s_read_async( IotI2SHandle_t
const pxI2SPeripheral,
190 uint8_t *
const pvBuffer,
209 int32_t iot_i2s_write_async( IotI2SHandle_t
const pxI2SPeripheral,
210 uint8_t *
const pvBuffer,
229 int32_t iot_i2s_read_sync( IotI2SHandle_t
const pxI2SPeripheral,
230 uint8_t *
const pvBuffer,
249 int32_t iot_i2s_write_sync( IotI2SHandle_t
const pxI2SPeripheral,
250 uint8_t *
const pvBuffer,
264 int32_t iot_i2s_close( IotI2SHandle_t
const pxI2SPeripheral);
294 int32_t iot_i2s_ioctl( IotI2SHandle_t
const pxI2SPeripheral,
295 IotI2SIoctlRequest_t xI2SRequest,
296 void *
const pvBuffer );
309 int32_t iot_i2s_cancel( IotI2SHandle_t
const pxI2SPeripheral);
IotI2SClkPolarity_t xI2SWsPolarity
Definition: iot_i2s.h:117
IotI2SMode_t xI2SMode
Definition: iot_i2s.h:114
IotI2SChannel_t xI2SChannel
Definition: iot_i2s.h:115
I2S configuration.
Definition: iot_i2s.h:112
uint32_t ulI2SFrameLength
Definition: iot_i2s.h:120
uint32_t ulI2SFrequency
Definition: iot_i2s.h:118
IotI2SClkPolarity_t xI2SSckPolarity
Definition: iot_i2s.h:116
uint32_t ulI2SDataLength
Definition: iot_i2s.h:119