Classes | Macros | Typedefs | Enumerations | Functions
fsl_codec_i2c.h File Reference
#include "fsl_common.h"
#include "i2c.h"
Include dependency graph for fsl_codec_i2c.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _codec_i2c_config
 CODEC I2C configurations structure. More...
 

Macros

#define CODEC_I2C_MASTER_HANDLER_SIZE   HAL_I2C_MASTER_HANDLE_SIZE
 codec i2c handler More...
 

Typedefs

typedef struct _codec_i2c_config codec_i2c_config_t
 CODEC I2C configurations structure. More...
 
typedef enum _codec_reg_addr codec_reg_addr_t
 CODEC device register address type. More...
 
typedef enum _codec_reg_width codec_reg_width_t
 CODEC device register width. More...
 

Enumerations

enum  _codec_reg_addr { kCODEC_RegAddr8Bit = 1U, kCODEC_RegAddr16Bit = 2U }
 CODEC device register address type. More...
 
enum  _codec_reg_width { kCODEC_RegWidth8Bit = 1U, kCODEC_RegWidth16Bit = 2U, kCODEC_RegWidth32Bit = 4U }
 CODEC device register width. More...
 

Functions

status_t CODEC_I2C_Deinit (void *handle)
 Codec i2c de-initilization. More...
 
status_t CODEC_I2C_Init (void *handle, uint32_t i2cInstance, uint32_t i2cBaudrate, uint32_t i2cSourceClockHz)
 Codec i2c bus initilization. More...
 
status_t CODEC_I2C_Receive (void *handle, uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *rxBuff, uint8_t rxBuffSize)
 codec i2c receive function. More...
 
status_t CODEC_I2C_Send (void *handle, uint8_t deviceAddress, uint32_t subAddress, uint8_t subaddressSize, uint8_t *txBuff, uint8_t txBuffSize)
 codec i2c send function. More...
 

Macro Definition Documentation

◆ CODEC_I2C_MASTER_HANDLER_SIZE

#define CODEC_I2C_MASTER_HANDLER_SIZE   HAL_I2C_MASTER_HANDLE_SIZE

codec i2c handler

Definition at line 20 of file fsl_codec_i2c.h.

Typedef Documentation

◆ codec_i2c_config_t

CODEC I2C configurations structure.

◆ codec_reg_addr_t

CODEC device register address type.

◆ codec_reg_width_t

CODEC device register width.

Enumeration Type Documentation

◆ _codec_reg_addr

CODEC device register address type.

Enumerator
kCODEC_RegAddr8Bit 

8-bit register address.

kCODEC_RegAddr16Bit 

16-bit register address.

Definition at line 24 of file fsl_codec_i2c.h.

◆ _codec_reg_width

CODEC device register width.

Enumerator
kCODEC_RegWidth8Bit 

8-bit register width.

kCODEC_RegWidth16Bit 

16-bit register width.

kCODEC_RegWidth32Bit 

32-bit register width.

Definition at line 31 of file fsl_codec_i2c.h.

Function Documentation

◆ CODEC_I2C_Deinit()

status_t CODEC_I2C_Deinit ( void *  handle)

Codec i2c de-initilization.

Parameters
handlei2c master handle.
Returns
kStatus_HAL_I2cSuccess is success, else deinitial failed.

brief Codec i2c de-initilization.

param handle i2c master handle. return kStatus_HAL_I2cSuccess is success, else deinitial failed.

Definition at line 48 of file fsl_codec_i2c.c.

◆ CODEC_I2C_Init()

status_t CODEC_I2C_Init ( void *  handle,
uint32_t  i2cInstance,
uint32_t  i2cBaudrate,
uint32_t  i2cSourceClockHz 
)

Codec i2c bus initilization.

Parameters
handlei2c master handle.
i2cInstanceinstance number of the i2c bus, such as 0 is corresponding to I2C0.
i2cBaudratei2c baudrate.
i2cSourceClockHzi2c source clock frequency.
Returns
kStatus_HAL_I2cSuccess is success, else initial failed.

brief Codec i2c bus initilization.

param handle i2c master handle. param i2CInstance instance number of the i2c bus, such as 0 is corresponding to I2C0. param i2cBaudrate i2c baudrate. param i2cSourceClockHz i2c source clock frequency. return kStatus_HAL_I2cSuccess is success, else initial failed.

Definition at line 30 of file fsl_codec_i2c.c.

◆ CODEC_I2C_Receive()

status_t CODEC_I2C_Receive ( void *  handle,
uint8_t  deviceAddress,
uint32_t  subAddress,
uint8_t  subaddressSize,
uint8_t *  rxBuff,
uint8_t  rxBuffSize 
)

codec i2c receive function.

Parameters
handlei2c master handle.
deviceAddresscodec device address.
subAddressregister address.
subaddressSizeregister address width.
rxBuffrx buffer pointer.
rxBuffSizerx buffer size.
Returns
kStatus_HAL_I2cSuccess is success, else receive failed.

brief codec i2c receive function.

param handle i2c master handle. param deviceAddress codec device address. param subAddress register address. param subaddressSize register address width. param rxBuff rx buffer pointer. param rxBuffSize rx buffer size. return kStatus_HAL_I2cSuccess is success, else receive failed.

Definition at line 95 of file fsl_codec_i2c.c.

◆ CODEC_I2C_Send()

status_t CODEC_I2C_Send ( void *  handle,
uint8_t  deviceAddress,
uint32_t  subAddress,
uint8_t  subaddressSize,
uint8_t *  txBuff,
uint8_t  txBuffSize 
)

codec i2c send function.

Parameters
handlei2c master handle.
deviceAddresscodec device address.
subAddressregister address.
subaddressSizeregister address width.
txBufftx buffer pointer.
txBuffSizetx buffer size.
Returns
kStatus_HAL_I2cSuccess is success, else send failed.

brief codec i2c send function.

param handle i2c master handle. param deviceAddress codec device address. param subAddress register address. param subaddressSize register address width. param txBuff tx buffer pointer. param txBuffSize tx buffer size. return kStatus_HAL_I2cSuccess is success, else send failed.

Definition at line 64 of file fsl_codec_i2c.c.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57