VSF Documented
|
Go to the source code of this file.
Data Structures | |
struct | vsf_i2s_status_t |
struct | vsf_i2s_capability_t |
struct | vsf_i2s_isr_t |
i2s interrupt configuration More... | |
struct | vsf_i2s_cfg_t |
i2s configuration More... | |
struct | vsf_i2s_op_t |
struct | vsf_i2s_t |
Macros | |
#define | VSF_I2S_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability.. | |
#define | VSF_I2S_CFG_PREFIX vsf |
Define I2S hardware mask if count is defined. | |
#define | VSF_I2S_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_I2S_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_i2s_init()). | |
#define | VSF_I2S_CFG_REIMPLEMENT_TYPE_MODE DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_MODE to redefine enum vsf_i2s_mode_t. | |
#define | VSF_I2S_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_IRQ_MASK to redefine enum vsf_i2s_irq_mask_t. | |
#define | VSF_I2S_CFG_REIMPLEMENT_TYPE_STATUS DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_STATUS to redefine struct vsf_i2s_status_t. | |
#define | VSF_I2S_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_TYPE_CFG to redefine struct vsf_i2s_cfg_t. For compatibility, members should not be deleted when redefining. | |
#define | VSF_I2S_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_TYPE_CAPABILITY to redefine struct vsf_i2s_capability_t. For compatibility, members should not be deleted when struct vsf_i2s_capability_t redefining. | |
#define | VSF_I2S_CFG_INHERIT_HAL_CAPABILITY ENABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_INHERIT_HAL_CAPABILITY to inherit structure vsf_peripheral_capability_t. | |
#define | VSF_I2S_APIS(__prefix_name) |
I2S API template, used to generate I2S type, specific prefix function declarations, etc. | |
Typedefs | |
typedef enum vsf_i2s_mode_t | vsf_i2s_mode_t |
typedef enum vsf_i2s_irq_mask_t | vsf_i2s_irq_mask_t |
typedef struct vsf_i2s_status_t | vsf_i2s_status_t |
typedef struct vsf_i2s_capability_t | vsf_i2s_capability_t |
typedef struct vsf_i2s_t | vsf_i2s_t |
typedef void | vsf_i2s_isr_handler_t(void *target_ptr, vsf_i2s_t *i2s_ptr, vsf_i2s_irq_mask_t irq_mask) |
i2s interrupt callback function prototype. | |
typedef struct vsf_i2s_isr_t | vsf_i2s_isr_t |
i2s interrupt configuration | |
typedef struct vsf_i2s_cfg_t | vsf_i2s_cfg_t |
i2s configuration | |
typedef struct vsf_i2s_op_t | vsf_i2s_op_t |
Enumerations | |
enum | vsf_i2s_mode_t { VSF_I2S_MODE_MASTER = (0x01ul << 0) , VSF_I2S_MODE_SLAVE = (0x00ul << 0) , VSF_I2S_DATA_BITLEN_16 = (0x01ul << 1) , VSF_I2S_DATA_BITLEN_24 = (0x02ul << 1) , VSF_I2S_DATA_BITLEN_32 = (0x03ul << 1) , VSF_I2S_FRAME_BITLEN_16 = (0x01ul << 3) , VSF_I2S_FRAME_BITLEN_24 = (0x02ul << 3) , VSF_I2S_FRAME_BITLEN_32 = (0x03ul << 3) , VSF_I2S_STANDARD_PHILIPS = (0x01ul << 5) , VSF_I2S_STANDARD_MSB = (0x02ul << 5) , VSF_I2S_STANDARD_LSB = (0x03ul << 5) , VSF_I2S_LRCK_POL = (0x01ul << 7) , VSF_I2S_BCK_POL = (0x01ul << 8) , VSF_I2S_MCLK_OUTPUT = (0x01ul << 9) } |
enum | { VSF_I2S_MODE_COUNT = 0 , VSF_I2S_MODE_MASK , VSF_I2S_DATA_BITLEN_COUNT = 0 , VSF_I2S_DATA_BITLEN_MASK , VSF_I2S_FRAME_BITLEN_COUNT = 0 , VSF_I2S_FRAME_BITLEN_MASK , VSF_I2S_STANDARD_COUNT = 0 , VSF_I2S_STANDARD_MASK , VSF_I2S_MODE_ALL_BITS_MASK } |
enum | vsf_i2s_irq_mask_t { VSF_I2S_IRQ_MASK_TX_TGL_BUFFER = (0x1ul << 0) , VSF_I2S_IRQ_MASK_RX_TGL_BUFFER = (0x1ul << 1) } |
enum | { VSF_I2S_IRQ_ALL_BITS_MASK } |
Functions | |
vsf_err_t | vsf_i2s_init (vsf_i2s_t *i2s_ptr, vsf_i2s_cfg_t *i2s_cfg) |
Initialize an I2S instance. | |
vsf_err_t | vsf_i2s_tx_init (vsf_i2s_t *i2s_ptr, vsf_i2s_cfg_t *i2s_cfg) |
Initialize i2s tx channel. | |
void | vsf_i2s_tx_fini (vsf_i2s_t *i2s_ptr) |
Finalize i2s tx channel. | |
vsf_err_t | vsf_i2s_tx_start (vsf_i2s_t *i2s_ptr) |
Start i2s tx channel. | |
vsf_err_t | vsf_i2s_rx_init (vsf_i2s_t *i2s_ptr, vsf_i2s_cfg_t *i2s_cfg) |
Initialize i2s rx channel. | |
void | vsf_i2s_rx_fini (vsf_i2s_t *i2s_ptr) |
Finalize i2s rx channel. | |
vsf_err_t | vsf_i2s_rx_start (vsf_i2s_t *i2s_ptr) |
Start i2s rx channel. | |
void | vsf_i2s_fini (vsf_i2s_t *i2s_ptr) |
Finalize a i2s instance. | |
fsm_rt_t | vsf_i2s_enable (vsf_i2s_t *i2s_ptr) |
Enable I2S instance. | |
fsm_rt_t | vsf_i2s_disable (vsf_i2s_t *i2s_ptr) |
Disable i2s instance. | |
vsf_i2s_status_t | vsf_i2s_status (vsf_i2s_t *i2s_ptr) |
Get the status of i2s instance. | |
vsf_i2s_capability_t | vsf_i2s_capability (vsf_i2s_t *i2s_ptr) |
Get the capability of i2s instance. | |
#define VSF_I2S_CFG_MULTI_CLASS ENABLED |
Enable multi-class support by default for maximum availability..
#define VSF_I2S_CFG_PREFIX vsf |
Define I2S hardware mask if count is defined.
Define I2S hardware count if mask is defined.
We can redefine macro VSF_I2S_CFG_PREFIX to specify a prefix to call a specific driver directly in the application code.
#define VSF_I2S_CFG_FUNCTION_RENAME ENABLED |
Disable VSF_I2S_CFG_FUNCTION_RENAME to use the original function names (e.g., vsf_i2s_init()).
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_MODE DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_MODE to redefine enum vsf_i2s_mode_t.
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_IRQ_MASK to redefine enum vsf_i2s_irq_mask_t.
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_STATUS DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_STATUS to redefine struct vsf_i2s_status_t.
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_TYPE_CFG to redefine struct vsf_i2s_cfg_t. For compatibility, members should not be deleted when redefining.
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_REIMPLEMENT_TYPE_CAPABILITY to redefine struct vsf_i2s_capability_t. For compatibility, members should not be deleted when struct vsf_i2s_capability_t redefining.
#define VSF_I2S_CFG_INHERIT_HAL_CAPABILITY ENABLED |
In specific hardware driver, we can enable macro VSF_I2S_CFG_INHERIT_HAL_CAPABILITY to inherit structure vsf_peripheral_capability_t.
#define VSF_I2S_APIS | ( | __prefix_name | ) |
I2S API template, used to generate I2S type, specific prefix function declarations, etc.
[in] | __prefix_name | The prefix used for generating I2S functions. |
typedef enum vsf_i2s_mode_t vsf_i2s_mode_t |
typedef enum vsf_i2s_irq_mask_t vsf_i2s_irq_mask_t |
typedef struct vsf_i2s_status_t vsf_i2s_status_t |
typedef struct vsf_i2s_capability_t vsf_i2s_capability_t |
typedef void vsf_i2s_isr_handler_t(void *target_ptr, vsf_i2s_t *i2s_ptr, vsf_i2s_irq_mask_t irq_mask) |
i2s interrupt callback function prototype.
target_ptr | pointer of user. |
i2s_ptr | pointer of i2s instance. |
irq_mask | one or more value of enum vsf_i2s_irq_mask_t |
typedef struct vsf_i2s_isr_t vsf_i2s_isr_t |
i2s interrupt configuration
typedef struct vsf_i2s_cfg_t vsf_i2s_cfg_t |
i2s configuration
typedef struct vsf_i2s_op_t vsf_i2s_op_t |
enum vsf_i2s_mode_t |
anonymous enum |
enum vsf_i2s_irq_mask_t |
|
extern |
Initialize an I2S instance.
[in] | i2s_ptr | pointer to structure vsf_i2s_t |
[in] | cfg_ptr | pointer to configuration structure vsf_i2s_cfg_t |
|
extern |
Initialize i2s tx channel.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
[in] | cfg_ptr | a pointer to structure vsf_i2s_cfg_t |
|
extern |
Start i2s tx channel.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
|
extern |
Initialize i2s rx channel.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
[in] | cfg_ptr | a pointer to structure vsf_i2s_cfg_t |
|
extern |
Start i2s rx channel.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
|
extern |
Enable I2S instance.
[in] | i2s_ptr | pointer to structure vsf_i2s_t |
Disable i2s instance.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
|
extern |
Get the status of i2s instance.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
|
extern |
Get the capability of i2s instance.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |