18#ifndef __HAL_DRIVER_DW_APB_I2C_H__
19#define __HAL_DRIVER_DW_APB_I2C_H__
25#if VSF_HAL_USE_I2C == ENABLED
29#if defined(__VSF_HAL_DW_APB_I2C_CLASS_IMPLEMENT)
30# define __VSF_CLASS_IMPLEMENT__
31#elif defined(__VSF_HAL_DW_APB_I2C_CLASS_INHERIT__)
32# define __VSF_CLASS_INHERIT__
43#ifndef VSF_DW_APB_I2C_CFG_MULTI_CLASS
44# define VSF_DW_APB_I2C_CFG_MULTI_CLASS VSF_I2C_CFG_MULTI_CLASS
47#define VSF_I2C_CFG_REIMPLEMENT_TYPE_MODE ENABLED
48#define VSF_I2C_CFG_REIMPLEMENT_TYPE_CMD ENABLED
49#define VSF_I2C_CFG_REIMPLEMENT_TYPE_IRQ_MASK ENABLED
136#if VSF_DW_APB_I2C_CFG_MULTI_CLASS == ENABLED
vsf_err_t
Definition __type.h:42
Definition vsf_dw_apb_i2c.h:135
vsf_i2c_cmd_t
Definition i2c.h:32
unsigned short uint16_t
Definition lvgl.h:41
unsigned char uint8_t
Definition lvgl.h:40
#define vsf_class(__name)
Definition ooc_class.h:48
const i_spi_t vsf_spi_irq_mask_t irq_mask
Definition spi_interface.h:38
unsigned int uint_fast32_t
Definition stdint.h:27
Definition vsf_dw_apb_i2c_reg.h:62
Definition vsf_template_i2c.h:231
i2c configuration
Definition vsf_template_i2c.h:314
i2c interrupt configuration
Definition vsf_template_i2c.h:298
Definition vsf_template_i2c.h:222
Definition vsf_template_i2c.h:334
vsf_adc_isr_t isr
Definition adc.h:83
fsm_rt_t vsf_dw_apb_i2c_enable(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
fsm_rt_t vsf_dw_apb_i2c_disable(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
vsf_i2c_mode_t
Definition vsf_dw_apb_i2c.h:54
@ __VSF_DW_APB_I2C_MODE_MASK
Definition vsf_dw_apb_i2c.h:67
@ VSF_I2C_MODE_MASTER
Definition vsf_dw_apb_i2c.h:55
@ VSF_I2C_SPEED_HIGH_SPEED_MODE
Definition vsf_dw_apb_i2c.h:62
@ VSF_I2C_MODE_SLAVE
Definition vsf_dw_apb_i2c.h:56
@ VSF_I2C_SPEED_STANDARD_MODE
Definition vsf_dw_apb_i2c.h:59
@ VSF_I2C_ADDR_7_BITS
Definition vsf_dw_apb_i2c.h:64
@ VSF_I2C_SPEED_FAST_MODE_PLUS
Definition vsf_dw_apb_i2c.h:61
@ VSF_I2C_SPEED_FAST_MODE
Definition vsf_dw_apb_i2c.h:60
@ VSF_I2C_ADDR_10_BITS
Definition vsf_dw_apb_i2c.h:65
vsf_i2c_capability_t vsf_dw_apb_i2c_capability(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
vsf_err_t vsf_dw_apb_i2c_master_request(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr, uint16_t address, vsf_i2c_cmd_t cmd, uint16_t count, uint8_t *buffer)
vsf_i2c_irq_mask_t vsf_dw_apb_i2c_irq_enable(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr, vsf_i2c_irq_mask_t irq_mask)
vsf_i2c_status_t vsf_dw_apb_i2c_status(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
vsf_err_t vsf_dw_apb_i2c_init(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr, vsf_i2c_cfg_t *cfg_ptr, uint_fast32_t ic_clk_hz)
vsf_i2c_irq_mask_t vsf_dw_apb_i2c_irq_disable(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr, vsf_i2c_irq_mask_t irq_mask)
void vsf_dw_apb_i2c_irqhandler(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
vsf_i2c_cmd_t
Definition vsf_dw_apb_i2c.h:72
@ VSF_I2C_CMD_10_BITS
Definition vsf_dw_apb_i2c.h:81
@ VSF_I2C_CMD_7_BITS
Definition vsf_dw_apb_i2c.h:80
@ VSF_I2C_CMD_NO_START
Definition vsf_dw_apb_i2c.h:88
@ VSF_I2C_CMD_STOP
Definition vsf_dw_apb_i2c.h:78
@ VSF_I2C_CMD_NO_STOP_RESTART
Definition vsf_dw_apb_i2c.h:89
@ __VSF_DW_APB_I2C_CMD_MASK
Definition vsf_dw_apb_i2c.h:83
@ VSF_I2C_CMD_RESTART
Definition vsf_dw_apb_i2c.h:77
@ VSF_I2C_CMD_WRITE
Definition vsf_dw_apb_i2c.h:73
@ VSF_I2C_CMD_READ
Definition vsf_dw_apb_i2c.h:74
@ VSF_I2C_CMD_START
Definition vsf_dw_apb_i2c.h:76
vsf_i2c_irq_mask_t
Definition vsf_dw_apb_i2c.h:92
@ VSF_I2C_IRQ_MASK_MASTER_STOP_DETECT
Definition vsf_dw_apb_i2c.h:96
@ VSF_I2C_IRQ_MASK_MASTER_ERROR
Definition vsf_dw_apb_i2c.h:101
@ VSF_DW_APB_I2C_IRQ_MASK_ALL
Definition vsf_dw_apb_i2c.h:107
@ VSF_I2C_IRQ_MASK_MASTER_TRANSFER_COMPLETE
Definition vsf_dw_apb_i2c.h:103
@ __VSF_DW_APB_I2C_ERROR_MASK
Definition vsf_dw_apb_i2c.h:121
@ VSF_I2C_IRQ_MASK_MASTER_TX_EMPTY
Definition vsf_dw_apb_i2c.h:98
@ __VSF_DW_APB_I2C_ABRT_MASK
Definition vsf_dw_apb_i2c.h:117
@ VSF_I2C_IRQ_MASK_MASTER_NACK_DETECT
Definition vsf_dw_apb_i2c.h:97
@ __VSF_DW_APB_I2C_IRQ_MASK
Definition vsf_dw_apb_i2c.h:115
@ VSF_I2C_IRQ_MASK_MASTER_STOPPED
Definition vsf_dw_apb_i2c.h:95
@ VSF_I2C_IRQ_MASK_MASTER_ADDRESS_NACK
Definition vsf_dw_apb_i2c.h:104
@ VSF_I2C_IRQ_MASK_MASTER_ARBITRATION_LOST
Definition vsf_dw_apb_i2c.h:100
@ VSF_I2C_IRQ_MASK_MASTER_STARTED
Definition vsf_dw_apb_i2c.h:94
void vsf_dw_apb_i2c_isrhandler(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
uint_fast32_t vsf_dw_apb_i2c_get_transferred_count(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
void vsf_dw_apb_i2c_fini(vsf_dw_apb_i2c_t *dw_apb_i2c_ptr)
fsm_rt_t
Definition vsf_fsm.h:315
vsf_i2c_mode_t
Definition vsf_template_i2c.h:116
vsf_i2c_irq_mask_t
Definition vsf_template_i2c.h:194