38#define ADS1115_I2C_PORT I2C_PORT_1
StatusCode ads1115_read_raw(ADS1115_Config *config, ADS1115_Channel channel, int16_t *reading)
Reads the raw ADC value from the specified channel.
Definition: ads1115.c:72
StatusCode ads1115_init(ADS1115_Config *config, ADS1115_Address i2c_addr, GpioAddress *ready_pin)
Initializes the ADS1115 on the I2C bus with an optional ALERT/RDY pin.
Definition: ads1115.c:21
ADS1115_Address
I2C Address selection based on ADDR pin connection.
Definition: ads1115.h:43
StatusCode ads1115_read_converted(ADS1115_Config *config, ADS1115_Channel channel, float *reading)
Reads and converts the ADC value from the specified channel into a voltage.
Definition: ads1115.c:79
StatusCode ads1115_select_channel(ADS1115_Config *config, ADS1115_Channel channel)
Selects the active ADC channel on the ADS1115.
Definition: ads1115.c:50
ADS1115_Channel
ADS1115 single-ended input channels.
Definition: ads1115.h:53
ADS1115_Reg
Register map for the ADS1115.
Definition: ads1115.h:63
@ ADS1115_ADDR_SDA
Definition: ads1115.h:46
@ ADS1115_ADDR_SCL
Definition: ads1115.h:47
@ ADS1115_ADDR_GND
Definition: ads1115.h:44
@ ADS1115_ADDR_VDD
Definition: ads1115.h:45
@ ADS1115_CHANNEL_3
Definition: ads1115.h:57
@ ADS1115_CHANNEL_2
Definition: ads1115.h:56
@ ADS1115_CHANNEL_1
Definition: ads1115.h:55
@ ADS1115_CHANNEL_0
Definition: ads1115.h:54
@ ADS1115_REG_CONVERSION
Definition: ads1115.h:64
@ ADS1115_REG_CONFIG
Definition: ads1115.h:65
@ ADS1115_REG_HI_THRESH
Definition: ads1115.h:67
@ ADS1115_REG_LO_THRESH
Definition: ads1115.h:66
uint8_t I2CAddress
I2C address type.
Definition: i2c.h:34
I2CPort
I2C Port selection.
Definition: i2c.h:37
StatusCode
StatusCodes for various errors.
Definition: status.h:27
Configuration structure for the ADS1115 driver.
Definition: ads1115.h:73
GpioAddress * ready_pin
Definition: ads1115.h:76
I2CPort i2c_port
Definition: ads1115.h:74
I2CAddress i2c_addr
Definition: ads1115.h:75
Port and pin data.
Definition: gpio.h:112