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 |
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 a 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 |
#define VSF_I2S_CFG_PREFIX vsf |
#define VSF_I2S_CFG_FUNCTION_RENAME ENABLED |
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_MODE DISABLED |
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_IRQ_MASK DISABLED |
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_STATUS DISABLED |
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_CFG DISABLED |
Redefine struct vsf_i2s_cfg_t. The vsf_i2s_isr_handler_t type also needs to be redefined For compatibility, members should not be deleted when struct vsf_i2s_cfg_t redefining.
#define VSF_I2S_CFG_REIMPLEMENT_TYPE_CAPABILITY DISABLED |
Redefine struct vsf_i2s_capability_t. For compatibility, members should not be deleted when struct vsf_i2s_capability_t redefining.
#define VSF_I2S_CFG_INHERT_HAL_CAPABILITY ENABLED |
#define VSF_I2S_APIS | ( | __prefix_name | ) |
#define __VSF_HAL_TEMPLATE_API VSF_HAL_TEMPLATE_API_FP |
#define __vsf_i2s_t VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_t) |
#define vsf_i2s_init | ( | __i2s, | |
... | |||
) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_init) ((__vsf_i2s_t *)(__i2s), ##__VA_ARGS__) |
#define vsf_i2s_enable | ( | __i2s | ) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_enable) ((__vsf_i2s_t *)(__i2s)) |
#define vsf_i2s_disable | ( | __i2s | ) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_disable) ((__vsf_i2s_t *)(__i2s)) |
#define vsf_i2s_status | ( | __i2s | ) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_status) ((__vsf_i2s_t *)(__i2s)) |
#define vsf_i2s_capability | ( | __i2s | ) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_capability) ((__vsf_i2s_t *)(__i2s)) |
#define vsf_i2s_tx_init | ( | __i2s, | |
... | |||
) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_tx_init) ((__vsf_i2s_t *)(__i2s), ##__VA_ARGS__) |
#define vsf_i2s_tx_fini | ( | __i2s, | |
... | |||
) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_tx_fini) ((__vsf_i2s_t *)(__i2s), ##__VA_ARGS__) |
#define vsf_i2s_tx_start | ( | __i2s | ) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_tx_start) ((__vsf_i2s_t *)(__i2s)) |
#define vsf_i2s_rx_init | ( | __i2s, | |
... | |||
) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_rx_init) ((__vsf_i2s_t *)(__i2s), ##__VA_ARGS__) |
#define vsf_i2s_rx_fini | ( | __i2s, | |
... | |||
) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_rx_fini) ((__vsf_i2s_t *)(__i2s), ##__VA_ARGS__) |
#define vsf_i2s_rx_start | ( | __i2s | ) | VSF_MCONNECT(VSF_I2S_CFG_PREFIX, _i2s_rx_start) ((__vsf_i2s_t *)(__i2s)) |
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 a i2s instance.
[in] | i2s_ptr | a pointer to structure vsf_i2s_t |
[in] | cfg_ptr | a pointer to 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 | a 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 |