18#ifndef __HAL_ADS7830_ADC_H__
19#define __HAL_ADS7830_ADC_H__
25#if VSF_HAL_USE_ADC == ENABLED && VSF_HAL_USE_ADS7830_ADC == ENABLED
37#if defined(__VSF_HAL_ADS7830_ADC_CLASS_IMPLEMENT)
38# define __VSF_CLASS_IMPLEMENT__
39#elif defined(__VSF_HAL_ADS7830_ADC_CLASS_INHERIT__)
40# define __VSF_CLASS_INHERIT__
52#if VSF_HAL_USE_I2C != ENABLED
53# error ADS7830 uses I2C, please enable VSF_HAL_USE_I2C
61#ifndef VSF_ADS7830_ADC_CFG_MULTI_CLASS
62# define VSF_ADS7830_ADC_CFG_MULTI_CLASS VSF_ADC_CFG_MULTI_CLASS
68#if VSF_ADS7830_ADC_CFG_MULTI_CLASS == ENABLED
69# define __VSF_ADS7830_ADC_HALOP .vsf_adc.op = &vsf_ads7830_adc_op,
71# define __VSF_ADS7830_ADC_HALOP
74#define __VSF_ADS7830_ADC_INIT(__I2C, __I2C_ADDR) \
75 __VSF_ADS7830_ADC_HALOP \
77 .i2c_addr = (__I2C_ADDR),
78#define VSF_ADS7830_ADC_INIT(__I2C, __I2C_ADDR) \
79 __VSF_ADS7830_ADC_INIT((__I2C), (__I2C_ADDR))
81#define __describe_ads7830_adc(__name, __i2c, __i2c_addr) \
82 vsf_ads7830_adc_t __name = { \
83 __VSF_ADS7830_ADC_INIT((__i2c), (__i2c_addr)) \
86#define describe_ads7830_adc(__name, __i2c, __i2c_addr) \
87 __describe_ads7830_adc(__name, (__i2c), (__i2c_addr))
111 uint8_t is_continuous_mode : 1;
125#define VSF_ADC_CFG_DEC_PREFIX vsf_ads7830
126#define VSF_ADC_CFG_DEC_UPCASE_PREFIX VSF_ADS7830
127#define VSF_ADC_CFG_DEC_EXTERN_OP ENABLED
135#undef __VSF_HAL_ADS7830_ADC_CLASS_IMPLEMENT
136#undef __VSF_HAL_ADS7830_ADC_CLASS_INHERIT__
#define ENABLED
Definition __type.h:28
Definition vsf_ads7830.h:92
unsigned int uint32_t
Definition lvgl.h:43
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
Definition vsf_template_adc.h:223
Definition vsf_template_adc.h:267
Definition vsf_template_i2c.h:334
vsf_adc_isr_t isr
Definition adc.h:83
#define VSF_ADS7830_ADC_CFG_MULTI_CLASS
Definition vsf_ads7830.h:62
vsf_adc_irq_mask_t
Definition vsf_template_adc.h:199