|
tds 2.2.0
|
This file contains API for TDS Click Driver. More...
#include "drv_digital_out.h"#include "drv_digital_in.h"#include "drv_analog_in.h"#include "drv_i2c_master.h"Go to the source code of this file.
Data Structures | |
| struct | tds_t |
| TDS Click context object. More... | |
| struct | tds_cfg_t |
| TDS Click configuration object. More... | |
Macros | |
| #define | TDS_COEF_POW3 133.42 |
| TDS ppm calculation values. | |
| #define | TDS_COEF_POW2 255.86 |
| #define | TDS_COEF_POW1 875.39 |
| #define | TDS_COEF_FINAL 0.5 |
| #define | TDS_NUM_CONVERSIONS 200 |
| TDS default ADC samples number for averaging. | |
| #define | TDS_ADC_RESOLUTION 0x0FFF |
| TDS ADC setting. | |
| #define | TDS_VREF_3V3 3.3 |
| #define | TDS_VREF_5V 5.0 |
| #define | TDS_TIMEOUT_MS 2000 |
| TDS timeout setting. | |
| #define | TDS_SET_DEV_ADDR 0x4D |
| TDS device address setting. | |
| #define | TDS_MAP_MIKROBUS(cfg, mikrobus) |
| MikroBUS pin mapping. | |
Enumerations | |
| enum | tds_drv_t { TDS_DRV_SEL_ADC , TDS_DRV_SEL_I2C } |
| TDS Click driver selector. More... | |
| enum | tds_return_value_t { TDS_OK = 0 , TDS_ERROR = -1 } |
| TDS Click return value data. More... | |
Functions | |
| void | tds_cfg_setup (tds_cfg_t *cfg) |
| TDS configuration object setup function. | |
| void | tds_drv_interface_sel (tds_cfg_t *cfg, tds_drv_t drv_sel) |
| TDS driver interface setup function. | |
| err_t | tds_init (tds_t *ctx, tds_cfg_t *cfg) |
| TDS initialization function. | |
| err_t | tds_read_raw_adc (tds_t *ctx, uint16_t *raw_adc) |
| TDS read raw ADC value function. | |
| err_t | tds_read_voltage (tds_t *ctx, float *voltage) |
| TDS read voltage level function. | |
| err_t | tds_read_voltage_avg (tds_t *ctx, uint16_t num_conv, float *voltage_avg) |
| TDS read average voltage level function. | |
| err_t | tds_set_vref (tds_t *ctx, float vref) |
| TDS set vref function. | |
| err_t | tds_read_ppm (tds_t *ctx, float *data_out) |
| TDS read ppm function. | |
This file contains API for TDS Click Driver.
| enum tds_drv_t |
| enum tds_return_value_t |