55 float f_high_threshold,
float f_low_threshold)
58 int16_t high_threshold;
59 int16_t low_threshold;
driver ads1115 interrupt header file
uint8_t ads1115_set_addr_pin(ads1115_handle_t *handle, ads1115_address_t addr_pin)
set the iic address pin
uint8_t ads1115_start_continuous_read(ads1115_handle_t *handle)
start the chip reading
ads1115_channel_t
ads1115 channel enumeration definition
uint8_t ads1115_init(ads1115_handle_t *handle)
initialize the chip
uint8_t ads1115_set_rate(ads1115_handle_t *handle, ads1115_rate_t rate)
set the sample rate
ads1115_address_t
ads1115 address enumeration definition
uint8_t ads1115_deinit(ads1115_handle_t *handle)
close the chip
uint8_t ads1115_set_range(ads1115_handle_t *handle, ads1115_range_t range)
set the adc range
struct ads1115_handle_s ads1115_handle_t
ads1115 handle structure definition
uint8_t ads1115_stop_continuous_read(ads1115_handle_t *handle)
stop the chip reading
uint8_t ads1115_set_channel(ads1115_handle_t *handle, ads1115_channel_t channel)
set the adc channel
uint8_t ads1115_continuous_read(ads1115_handle_t *handle, int16_t *raw, float *v)
read data from the chip continuously
uint8_t ads1115_interrupt_init(ads1115_address_t addr, ads1115_channel_t channel, ads1115_compare_t compare, float f_high_threshold, float f_low_threshold)
interrupt example init
#define ADS1115_INTERRUPT_DEFAULT_RANGE
ads1115 interrupt example default definition
#define ADS1115_INTERRUPT_DEFAULT_COMPARATOR_QUEUE
uint8_t ads1115_interrupt_read(float *s)
interrupt example read
#define ADS1115_INTERRUPT_DEFAULT_ALERT_PIN
uint8_t ads1115_interrupt_deinit(void)
interrupt example deinit
#define ADS1115_INTERRUPT_DEFAULT_RATE
uint8_t ads1115_interface_iic_init(void)
interface iic bus init
void ads1115_interface_delay_ms(uint32_t ms)
interface delay ms
void ads1115_interface_debug_print(const char *const fmt,...)
interface print format data
uint8_t ads1115_interface_iic_deinit(void)
interface iic bus deinit
uint8_t ads1115_interface_iic_read(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus read
uint8_t ads1115_interface_iic_write(uint8_t addr, uint8_t reg, uint8_t *buf, uint16_t len)
interface iic bus write
uint8_t ads1115_set_alert_pin(ads1115_handle_t *handle, ads1115_pin_t pin)
set the alert pin active status
uint8_t ads1115_set_compare(ads1115_handle_t *handle, ads1115_bool_t enable)
enable or disable the interrupt compare
uint8_t ads1115_convert_to_register(ads1115_handle_t *handle, float s, int16_t *reg)
convert a adc value to a register raw data
uint8_t ads1115_set_compare_threshold(ads1115_handle_t *handle, int16_t high_threshold, int16_t low_threshold)
set the interrupt compare threshold
uint8_t ads1115_set_compare_mode(ads1115_handle_t *handle, ads1115_compare_t compare)
set the interrupt compare mode
uint8_t ads1115_set_comparator_queue(ads1115_handle_t *handle, ads1115_comparator_queue_t comparator_queue)
set the interrupt comparator queue
ads1115_compare_t
ads1115 compare mode enumeration definition
#define DRIVER_ADS1115_LINK_IIC_INIT(HANDLE, FUC)
link iic_init function
#define DRIVER_ADS1115_LINK_INIT(HANDLE, STRUCTURE)
initialize ads1115_handle_t structure
#define DRIVER_ADS1115_LINK_IIC_DEINIT(HANDLE, FUC)
link iic_deinit function
#define DRIVER_ADS1115_LINK_DELAY_MS(HANDLE, FUC)
link delay_ms function
#define DRIVER_ADS1115_LINK_DEBUG_PRINT(HANDLE, FUC)
link debug_print function
#define DRIVER_ADS1115_LINK_IIC_READ(HANDLE, FUC)
link iic_read function
#define DRIVER_ADS1115_LINK_IIC_WRITE(HANDLE, FUC)
link iic_write function