![]() |
LibDriver ADS1115
|
ads1115 base driver modules More...
Data Structures | |
| struct | ads1115_handle_s |
| ads1115 handle structure definition More... | |
| struct | ads1115_info_s |
| ads1115 information structure definition More... | |
Typedefs | |
| typedef struct ads1115_handle_s | ads1115_handle_t |
| ads1115 handle structure definition | |
| typedef struct ads1115_info_s | ads1115_info_t |
| ads1115 information structure definition | |
Functions | |
| uint8_t | ads1115_info (ads1115_info_t *info) |
| get chip's information | |
| uint8_t | ads1115_set_addr_pin (ads1115_handle_t *handle, ads1115_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | ads1115_get_addr_pin (ads1115_handle_t *handle, ads1115_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | ads1115_init (ads1115_handle_t *handle) |
| initialize the chip | |
| uint8_t | ads1115_deinit (ads1115_handle_t *handle) |
| close the chip | |
| uint8_t | ads1115_single_read (ads1115_handle_t *handle, int16_t *raw, float *v) |
| read data from the chip once | |
| uint8_t | ads1115_start_continuous_read (ads1115_handle_t *handle) |
| start the chip reading | |
| uint8_t | ads1115_stop_continuous_read (ads1115_handle_t *handle) |
| stop the chip reading | |
| uint8_t | ads1115_continuous_read (ads1115_handle_t *handle, int16_t *raw, float *v) |
| read data from the chip continuously | |
| uint8_t | ads1115_set_channel (ads1115_handle_t *handle, ads1115_channel_t channel) |
| set the adc channel | |
| uint8_t | ads1115_get_channel (ads1115_handle_t *handle, ads1115_channel_t *channel) |
| get the adc channel | |
| uint8_t | ads1115_set_range (ads1115_handle_t *handle, ads1115_range_t range) |
| set the adc range | |
| uint8_t | ads1115_get_range (ads1115_handle_t *handle, ads1115_range_t *range) |
| get the adc range | |
| uint8_t | ads1115_set_rate (ads1115_handle_t *handle, ads1115_rate_t rate) |
| set the sample rate | |
| uint8_t | ads1115_get_rate (ads1115_handle_t *handle, ads1115_rate_t *rate) |
| get the sample rate | |
ads1115 base driver modules
| typedef struct ads1115_handle_s ads1115_handle_t |
ads1115 handle structure definition
| typedef struct ads1115_info_s ads1115_info_t |
ads1115 information structure definition
| enum ads1115_address_t |
ads1115 address enumeration definition
| Enumerator | |
|---|---|
| ADS1115_ADDR_GND | ADDR pin connected to GND |
| ADS1115_ADDR_VCC | ADDR pin connected to VCC |
| ADS1115_ADDR_SDA | ADDR pin connected to SDA |
| ADS1115_ADDR_SCL | ADDR pin connected to SCL |
Definition at line 63 of file driver_ads1115.h.
| enum ads1115_bool_t |
ads1115 bool enumeration definition
| Enumerator | |
|---|---|
| ADS1115_BOOL_FALSE | disable function |
| ADS1115_BOOL_TRUE | enable function |
Definition at line 74 of file driver_ads1115.h.
| enum ads1115_channel_t |
ads1115 channel enumeration definition
Definition at line 111 of file driver_ads1115.h.
| enum ads1115_range_t |
ads1115 range enumeration definition
Definition at line 83 of file driver_ads1115.h.
| enum ads1115_rate_t |
ads1115 channel rate enumeration definition
Definition at line 96 of file driver_ads1115.h.
| uint8_t ads1115_continuous_read | ( | ads1115_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | v ) |
read data from the chip continuously
| [in] | *handle | pointer to an ads1115 handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *v | pointer to a converted adc buffer |
Definition at line 936 of file driver_ads1115.c.
| uint8_t ads1115_deinit | ( | ads1115_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an ads1115 handle structure |
Definition at line 194 of file driver_ads1115.c.
| uint8_t ads1115_get_addr_pin | ( | ads1115_handle_t * | handle, |
| ads1115_address_t * | addr_pin ) |
get the iic address pin
| [in] | *handle | pointer to an ads1115 handle structure |
| [out] | *addr_pin | pointer to a chip iic address pin buffer |
Definition at line 781 of file driver_ads1115.c.
| uint8_t ads1115_get_channel | ( | ads1115_handle_t * | handle, |
| ads1115_channel_t * | channel ) |
get the adc channel
| [in] | *handle | pointer to an ads1115 handle structure |
| [out] | *channel | pointer to a channel buffer |
Definition at line 292 of file driver_ads1115.c.
| uint8_t ads1115_get_range | ( | ads1115_handle_t * | handle, |
| ads1115_range_t * | range ) |
get the adc range
| [in] | *handle | pointer to an ads1115 handle structure |
| [out] | *range | pointer to a voltage range buffer |
Definition at line 374 of file driver_ads1115.c.
| uint8_t ads1115_get_rate | ( | ads1115_handle_t * | handle, |
| ads1115_rate_t * | rate ) |
get the sample rate
| [in] | *handle | pointer to an ads1115 handle structure |
| [out] | *rate | pointer to an adc sample rate buffer |
Definition at line 620 of file driver_ads1115.c.
| uint8_t ads1115_info | ( | ads1115_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an ads1115 info structure |
Definition at line 1445 of file driver_ads1115.c.
| uint8_t ads1115_init | ( | ads1115_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an ads1115 handle structure |
Definition at line 131 of file driver_ads1115.c.
| uint8_t ads1115_set_addr_pin | ( | ads1115_handle_t * | handle, |
| ads1115_address_t | addr_pin ) |
set the iic address pin
| [in] | *handle | pointer to an ads1115 handle structure |
| [in] | addr_pin | iic address pin |
Definition at line 738 of file driver_ads1115.c.
| uint8_t ads1115_set_channel | ( | ads1115_handle_t * | handle, |
| ads1115_channel_t | channel ) |
set the adc channel
| [in] | *handle | pointer to an ads1115 handle structure |
| [in] | channel | adc channel |
Definition at line 247 of file driver_ads1115.c.
| uint8_t ads1115_set_range | ( | ads1115_handle_t * | handle, |
| ads1115_range_t | range ) |
set the adc range
| [in] | *handle | pointer to an ads1115 handle structure |
| [in] | range | adc max voltage range |
Definition at line 329 of file driver_ads1115.c.
| uint8_t ads1115_set_rate | ( | ads1115_handle_t * | handle, |
| ads1115_rate_t | rate ) |
set the sample rate
| [in] | *handle | pointer to an ads1115 handle structure |
| [in] | rate | adc sample rate |
Definition at line 575 of file driver_ads1115.c.
| uint8_t ads1115_single_read | ( | ads1115_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | v ) |
read data from the chip once
| [in] | *handle | pointer to an ads1115 handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *v | pointer to a converted adc buffer |
Definition at line 826 of file driver_ads1115.c.
| uint8_t ads1115_start_continuous_read | ( | ads1115_handle_t * | handle | ) |
start the chip reading
| [in] | *handle | pointer to an ads1115 handle structure |
Definition at line 1010 of file driver_ads1115.c.
| uint8_t ads1115_stop_continuous_read | ( | ads1115_handle_t * | handle | ) |
stop the chip reading
| [in] | *handle | pointer to an ads1115 handle structure |
Definition at line 1053 of file driver_ads1115.c.