54 int16_t high_threshold;
55 int16_t low_threshold;
227 for (i = 0; i < times; i++)
257 for (i = 0; i < times; i++)
driver ads1115 read test 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
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_info_s ads1115_info_t
ads1115 information structure definition
uint8_t ads1115_single_read(ads1115_handle_t *handle, int16_t *raw, float *v)
read data from the chip once
struct ads1115_handle_s ads1115_handle_t
ads1115 handle structure definition
uint8_t ads1115_info(ads1115_info_t *info)
get chip's information
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
@ ADS1115_CHANNEL_AIN0_GND
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_COMPARATOR_QUEUE_NONE_CONV
@ ADS1115_COMPARE_THRESHOLD
#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
uint8_t ads1115_read_test(ads1115_address_t addr, uint32_t times)
read test
float supply_voltage_max_v
char manufacturer_name[32]
float supply_voltage_min_v