![]() |
LibDriver ADS1118
|
ads1118 basic driver modules More...
Data Structures | |
| struct | ads1118_handle_s |
| ads1118 handle structure definition More... | |
| struct | ads1118_info_s |
| ads1118 information structure definition More... | |
Typedefs | |
| typedef struct ads1118_handle_s | ads1118_handle_t |
| ads1118 handle structure definition | |
| typedef struct ads1118_info_s | ads1118_info_t |
| ads1118 information structure definition | |
Functions | |
| uint8_t | ads1118_info (ads1118_info_t *info) |
| get chip's information | |
| uint8_t | ads1118_init (ads1118_handle_t *handle) |
| initialize the chip | |
| uint8_t | ads1118_deinit (ads1118_handle_t *handle) |
| close the chip | |
| uint8_t | ads1118_single_read (ads1118_handle_t *handle, int16_t *raw, float *v) |
| read data from the chip once | |
| uint8_t | ads1118_continuous_read (ads1118_handle_t *handle, int16_t *raw, float *v) |
| read data from the chip continuously | |
| uint8_t | ads1118_start_continuous_read (ads1118_handle_t *handle) |
| start the chip reading | |
| uint8_t | ads1118_stop_continuous_read (ads1118_handle_t *handle) |
| stop the chip reading | |
| uint8_t | ads1118_temperature_convert (ads1118_handle_t *handle, int16_t raw, float *deg) |
| temperature convert | |
| uint8_t | ads1118_set_channel (ads1118_handle_t *handle, ads1118_channel_t channel) |
| set the adc channel | |
| uint8_t | ads1118_get_channel (ads1118_handle_t *handle, ads1118_channel_t *channel) |
| get the adc channel | |
| uint8_t | ads1118_set_range (ads1118_handle_t *handle, ads1118_range_t range) |
| set the adc range | |
| uint8_t | ads1118_get_range (ads1118_handle_t *handle, ads1118_range_t *range) |
| get the adc range | |
| uint8_t | ads1118_set_rate (ads1118_handle_t *handle, ads1118_rate_t rate) |
| set the sample rate | |
| uint8_t | ads1118_get_rate (ads1118_handle_t *handle, ads1118_rate_t *rate) |
| get the sample rate | |
| uint8_t | ads1118_set_mode (ads1118_handle_t *handle, ads1118_mode_t mode) |
| set the chip mode | |
| uint8_t | ads1118_get_mode (ads1118_handle_t *handle, ads1118_mode_t *mode) |
| get the chip mode | |
| uint8_t | ads1118_set_dout_pull_up (ads1118_handle_t *handle, ads1118_bool_t enable) |
| enable or disable dout pull up | |
| uint8_t | ads1118_get_dout_pull_up (ads1118_handle_t *handle, ads1118_bool_t *enable) |
| get dout pull up status | |
ads1118 basic driver modules
| typedef struct ads1118_handle_s ads1118_handle_t |
ads1118 handle structure definition
| typedef struct ads1118_info_s ads1118_info_t |
ads1118 information structure definition
| enum ads1118_bool_t |
ads1118 bool enumeration definition
| Enumerator | |
|---|---|
| ADS1118_BOOL_FALSE | disable function |
| ADS1118_BOOL_TRUE | enable function |
Definition at line 62 of file driver_ads1118.h.
| enum ads1118_channel_t |
ads1118 channel enumeration definition
Definition at line 99 of file driver_ads1118.h.
| enum ads1118_mode_t |
ads1118 mode enumeration definition
| Enumerator | |
|---|---|
| ADS1118_MODE_ADC | adc mode |
| ADS1118_MODE_TEMPERATURE | temperature mode |
Definition at line 114 of file driver_ads1118.h.
| enum ads1118_range_t |
ads1118 range enumeration definition
Definition at line 71 of file driver_ads1118.h.
| enum ads1118_rate_t |
ads1118 channel rate enumeration definition
Definition at line 84 of file driver_ads1118.h.
| uint8_t ads1118_continuous_read | ( | ads1118_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | v ) |
read data from the chip continuously
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *v | pointer to a converted adc buffer |
Definition at line 819 of file driver_ads1118.c.
| uint8_t ads1118_deinit | ( | ads1118_handle_t * | handle | ) |
close the chip
| [in] | *handle | pointer to an ads1118 handle structure |
Definition at line 199 of file driver_ads1118.c.
| uint8_t ads1118_get_channel | ( | ads1118_handle_t * | handle, |
| ads1118_channel_t * | channel ) |
get the adc channel
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *channel | pointer to a channel buffer |
Definition at line 299 of file driver_ads1118.c.
| uint8_t ads1118_get_dout_pull_up | ( | ads1118_handle_t * | handle, |
| ads1118_bool_t * | enable ) |
get dout pull up status
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *enable | pointer to a bool value buffer |
Definition at line 635 of file driver_ads1118.c.
| uint8_t ads1118_get_mode | ( | ads1118_handle_t * | handle, |
| ads1118_mode_t * | mode ) |
get the chip mode
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *mode | pointer to a mode buffer |
Definition at line 551 of file driver_ads1118.c.
| uint8_t ads1118_get_range | ( | ads1118_handle_t * | handle, |
| ads1118_range_t * | range ) |
get the adc range
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *range | pointer to a voltage range buffer |
Definition at line 383 of file driver_ads1118.c.
| uint8_t ads1118_get_rate | ( | ads1118_handle_t * | handle, |
| ads1118_rate_t * | rate ) |
get the sample rate
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *rate | pointer to an adc sample rate buffer |
Definition at line 467 of file driver_ads1118.c.
| uint8_t ads1118_info | ( | ads1118_info_t * | info | ) |
get chip's information
| [out] | *info | pointer to an ads1118 info structure |
Definition at line 1037 of file driver_ads1118.c.
| uint8_t ads1118_init | ( | ads1118_handle_t * | handle | ) |
initialize the chip
| [in] | *handle | pointer to an ads1118 handle structure |
Definition at line 142 of file driver_ads1118.c.
| uint8_t ads1118_set_channel | ( | ads1118_handle_t * | handle, |
| ads1118_channel_t | channel ) |
set the adc channel
| [in] | *handle | pointer to an ads1118 handle structure |
| [in] | channel | adc channel |
Definition at line 252 of file driver_ads1118.c.
| uint8_t ads1118_set_dout_pull_up | ( | ads1118_handle_t * | handle, |
| ads1118_bool_t | enable ) |
enable or disable dout pull up
| [in] | *handle | pointer to an ads1118 handle structure |
| [in] | enable | bool value |
Definition at line 588 of file driver_ads1118.c.
| uint8_t ads1118_set_mode | ( | ads1118_handle_t * | handle, |
| ads1118_mode_t | mode ) |
set the chip mode
| [in] | *handle | pointer to an ads1118 handle structure |
| [in] | mode | chip mode |
Definition at line 504 of file driver_ads1118.c.
| uint8_t ads1118_set_range | ( | ads1118_handle_t * | handle, |
| ads1118_range_t | range ) |
set the adc range
| [in] | *handle | pointer to an ads1118 handle structure |
| [in] | range | adc max voltage range |
Definition at line 336 of file driver_ads1118.c.
| uint8_t ads1118_set_rate | ( | ads1118_handle_t * | handle, |
| ads1118_rate_t | rate ) |
set the sample rate
| [in] | *handle | pointer to an ads1118 handle structure |
| [in] | rate | adc sample rate |
Definition at line 420 of file driver_ads1118.c.
| uint8_t ads1118_single_read | ( | ads1118_handle_t * | handle, |
| int16_t * | raw, | ||
| float * | v ) |
read data from the chip once
| [in] | *handle | pointer to an ads1118 handle structure |
| [out] | *raw | pointer to a raw adc buffer |
| [out] | *v | pointer to a converted adc buffer |
Definition at line 673 of file driver_ads1118.c.
| uint8_t ads1118_start_continuous_read | ( | ads1118_handle_t * | handle | ) |
start the chip reading
| [in] | *handle | pointer to an ads1118 handle structure |
Definition at line 893 of file driver_ads1118.c.
| uint8_t ads1118_stop_continuous_read | ( | ads1118_handle_t * | handle | ) |
stop the chip reading
| [in] | *handle | pointer to an ads1118 handle structure |
Definition at line 936 of file driver_ads1118.c.
| uint8_t ads1118_temperature_convert | ( | ads1118_handle_t * | handle, |
| int16_t | raw, | ||
| float * | deg ) |
temperature convert
| [in] | *handle | pointer to an ads1118 handle structure |
| [in] | raw | adc raw data |
| [out] | *deg | pointer to a deg buffer |
Definition at line 981 of file driver_ads1118.c.