![]() |
LibDriver ADS1110
|
driver ads1110 header file More...
#include <stdio.h>#include <stdint.h>#include <string.h>Go to the source code of this file.
Data Structures | |
| struct | ads1110_handle_s |
| ads1110 handle structure definition More... | |
| struct | ads1110_info_s |
| ads1110 information structure definition More... | |
Macros | |
| #define | DRIVER_ADS1110_LINK_INIT(HANDLE, STRUCTURE) |
| initialize ads1110_handle_t structure | |
| #define | DRIVER_ADS1110_LINK_IIC_INIT(HANDLE, FUC) |
| link iic_init function | |
| #define | DRIVER_ADS1110_LINK_IIC_DEINIT(HANDLE, FUC) |
| link iic_deinit function | |
| #define | DRIVER_ADS1110_LINK_IIC_READ_COMMAND(HANDLE, FUC) |
| link iic_read_cmd function | |
| #define | DRIVER_ADS1110_LINK_IIC_WRITE_COMMAND(HANDLE, FUC) |
| link iic_write_cmd function | |
| #define | DRIVER_ADS1110_LINK_DELAY_MS(HANDLE, FUC) |
| link delay_ms function | |
| #define | DRIVER_ADS1110_LINK_DEBUG_PRINT(HANDLE, FUC) |
| link debug_print function | |
Typedefs | |
| typedef struct ads1110_handle_s | ads1110_handle_t |
| ads1110 handle structure definition | |
| typedef struct ads1110_info_s | ads1110_info_t |
| ads1110 information structure definition | |
Enumerations | |
| enum | ads1110_address_t { ADS1110_ADDRESS0 = 0x90 , ADS1110_ADDRESS1 = 0x92 , ADS1110_ADDRESS2 = 0x94 , ADS1110_ADDRESS3 = 0x96 , ADS1110_ADDRESS4 = 0x98 , ADS1110_ADDRESS5 = 0x9A , ADS1110_ADDRESS6 = 0x9C , ADS1110_ADDRESS7 = 0x9E } |
| ads1110 address enumeration definition More... | |
| enum | ads1110_gain_t { ADS1110_GAIN_1 = 0x00 , ADS1110_GAIN_2 = 0x01 , ADS1110_GAIN_4 = 0x02 , ADS1110_GAIN_8 = 0x03 } |
| ads1110 gain enumeration definition More... | |
| enum | ads1110_rate_t { ADS1110_RATE_15SPS = 0x03 , ADS1110_RATE_30SPS = 0x02 , ADS1110_RATE_60SPS = 0x01 , ADS1110_RATE_240SPS = 0x00 } |
| ads1110 rate enumeration definition More... | |
Functions | |
| uint8_t | ads1110_info (ads1110_info_t *info) |
| get chip's information | |
| uint8_t | ads1110_set_addr_pin (ads1110_handle_t *handle, ads1110_address_t addr_pin) |
| set the iic address pin | |
| uint8_t | ads1110_get_addr_pin (ads1110_handle_t *handle, ads1110_address_t *addr_pin) |
| get the iic address pin | |
| uint8_t | ads1110_init (ads1110_handle_t *handle) |
| initialize the chip | |
| uint8_t | ads1110_deinit (ads1110_handle_t *handle) |
| close the chip | |
| uint8_t | ads1110_single_read (ads1110_handle_t *handle, int16_t *raw, float *v) |
| read data from the chip once | |
| uint8_t | ads1110_continuous_read (ads1110_handle_t *handle, int16_t *raw, float *v) |
| read data from the chip continuously | |
| uint8_t | ads1110_start_continuous_read (ads1110_handle_t *handle) |
| start the chip reading | |
| uint8_t | ads1110_stop_continuous_read (ads1110_handle_t *handle) |
| stop the chip reading | |
| uint8_t | ads1110_set_rate (ads1110_handle_t *handle, ads1110_rate_t rate) |
| set the sample rate | |
| uint8_t | ads1110_get_rate (ads1110_handle_t *handle, ads1110_rate_t *rate) |
| get the sample rate | |
| uint8_t | ads1110_set_gain (ads1110_handle_t *handle, ads1110_gain_t gain) |
| set adc gain | |
| uint8_t | ads1110_get_gain (ads1110_handle_t *handle, ads1110_gain_t *gain) |
| get adc gain | |
| uint8_t | ads1110_set_reg (ads1110_handle_t *handle, uint8_t *buf, uint16_t len) |
| set the chip register | |
| uint8_t | ads1110_get_reg (ads1110_handle_t *handle, uint8_t *buf, uint16_t len) |
| get the chip register | |
driver ads1110 header file
Copyright (c) 2015 - present LibDriver All rights reserved
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
| Date | Version | Author | Description |
|---|---|---|---|
| 2025/08/15 | 1.0 | Shifeng Li | first upload |
Definition in file driver_ads1110.h.