Loading...
Searching...
No Matches
adcxx1c_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 OTA keys S.A.
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
9#pragma once
10
21
22#include "board.h"
23#include "saul_reg.h"
24#include "adcxx1c.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
36
38#ifndef ADCXX1C_PARAM_I2C
39#define ADCXX1C_PARAM_I2C (I2C_DEV(0))
40#endif
41
43#ifndef ADCXX1C_PARAM_ADDR
44#define ADCXX1C_PARAM_ADDR (ADCXX1C_I2C_ADDRESS)
45#endif
46
48#ifndef ADCXX1C_PARAM_BITS
49#define ADCXX1C_PARAM_BITS (ADCXX1C_RES_DEFAULT)
50#endif
51
53#ifndef ADCXX1C_PARAM_CYCLE
54#define ADCXX1C_PARAM_CYCLE (ADCXX1C_CYCLE_DISABLED)
55#endif
56
58#ifndef ADCXX1C_PARAM_ALERT_PIN
59#define ADCXX1C_PARAM_ALERT_PIN (GPIO_UNDEF)
60#endif
61
63#ifndef ADCXX1C_PARAM_LOW_LIMIT
64#define ADCXX1C_PARAM_LOW_LIMIT (0)
65#endif
66
68#ifndef ADCXX1C_PARAM_HIGH_LIMIT
69#define ADCXX1C_PARAM_HIGH_LIMIT (0)
70#endif
71
73#ifndef ADCXX1C_PARAM_HYSTERESIS
74#define ADCXX1C_PARAM_HYSTERESIS (0)
75#endif
77
81#ifndef ADCXX1C_PARAMS
82#define ADCXX1C_PARAMS { .i2c = ADCXX1C_PARAM_I2C, \
83 .addr = ADCXX1C_PARAM_ADDR, \
84 .bits = ADCXX1C_PARAM_BITS, \
85 .cycle = ADCXX1C_PARAM_CYCLE, \
86 .alert_pin = ADCXX1C_PARAM_ALERT_PIN, \
87 .low_limit = ADCXX1C_PARAM_LOW_LIMIT, \
88 .high_limit = ADCXX1C_PARAM_HIGH_LIMIT, \
89 .hysteresis = ADCXX1C_PARAM_HYSTERESIS }
90#endif
91
95#ifndef ADCXX1C_SAUL_INFO
96#define ADCXX1C_SAUL_INFO { .name = "adcxx1c" }
97#endif
98
103{
105};
106
114
115#ifdef __cplusplus
116}
117#endif
ADCXX1C ADC device driver.
static const saul_reg_info_t adcxx1c_saul_info[]
Additional meta information to keep in the SAUL registry.
#define ADCXX1C_PARAMS
ADCXX1C driver configuration structures.
#define ADCXX1C_SAUL_INFO
ADCXX1C driver SAUL registry information structures.
struct adcxx1c_params adcxx1c_params_t
ADCxx1C params.
SAUL registry interface definition.
ADCxx1C params.
Definition adcxx1c.h:100
Additional data to collect for each entry.
Definition saul_reg.h:48