26#ifndef PROTOCORE_ADS1115_H
27#define PROTOCORE_ADS1115_H
31#if PROTOCORE_ENABLE_ADS1115
39#define ADS1115_REG_CONVERSION 0x00
41#define ADS1115_REG_CONFIG 0x01
43#define ADS1115_GAIN_TWOTHIRDS 0
45#define ADS1115_GAIN_1 1
47#define ADS1115_GAIN_2 2
49#define ADS1115_GAIN_4 3
51#define ADS1115_GAIN_8 4
53#define ADS1115_GAIN_16 5
57#define ADS1115_DR_16 1
59#define ADS1115_DR_32 2
61#define ADS1115_DR_64 3
63#define ADS1115_DR_128 4
65#define ADS1115_DR_250 5
67#define ADS1115_DR_475 6
69#define ADS1115_DR_860 7
77} Ads1115ConfigSingleArgs;
140 Ads1115ConfigSingleArgs config_single_args;
141 Ads1115RawToUvArgs raw_to_uv_args;
142 Ads1115BeginArgs begin_args;
143 Ads1115ReadRawArgs read_raw_args;
144 Ads1115ReadUvArgs read_uv_args;
151extern Ads1115Vars Ads1115V;
156 void (*
const config_single)(uint8_t *work);
157 void (*
const raw_to_uv)(uint8_t *work);
158 void (*
const begin)(uint8_t *work);
159 void (*
const read_raw)(uint8_t *work);
160 void (*
const read_uv)(uint8_t *work);
165void protocore_ads1115_config_single(uint8_t *work);
166void protocore_ads1115_raw_to_uv(uint8_t *work);
167void protocore_ads1115_begin(uint8_t *work);
168void protocore_ads1115_read_raw(uint8_t *work);
169void protocore_ads1115_read_uv(uint8_t *work);
175static const Ads1115Ns Ads1115 __attribute__((unused)) = {
176 .config_single = protocore_ads1115_config_single,
177 .raw_to_uv = protocore_ads1115_raw_to_uv,
178 .begin = protocore_ads1115_begin,
179 .read_raw = protocore_ads1115_read_raw,
180 .read_uv = protocore_ads1115_read_uv,
192uint8_t *protocore_ads1115_span(
void);
#define PROTOCORE_BEGIN_DECLS
Give a header's declarations C linkage, so their symbol names carry no parameter types.
_Bool proto_bool
The truth value.
#define PROTOCORE_END_DECLS