Loading...
Searching...
No Matches
ad7746_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 HAW Hamburg
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
20#ifndef AD7746_PARAMS_H
21#define AD7746_PARAMS_H
22
23#include "board.h"
24#include "saul_reg.h"
25#include "ad7746.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35#ifndef AD7746_PARAM_I2C
36#define AD7746_PARAM_I2C (I2C_DEV(0))
37#endif
38#ifndef AD7746_PARAM_ADDR
39#define AD7746_PARAM_ADDR (0x48)
40#endif
41#ifndef AD7746_PARAM_CAP_SR
42#define AD7746_PARAM_CAP_SR (AD7746_CAP_SR_091)
43#endif
44#ifndef AD7746_PARAM_VT_SR
45#define AD7746_PARAM_VT_SR (AD7746_VT_SR_082)
46#endif
47#ifndef AD7746_PARAM_VT_MD
48#define AD7746_PARAM_VT_MD (AD7746_VT_MD_TEMP)
49#endif
50#ifndef AD7746_PARAM_DAC_A
51#define AD7746_PARAM_DAC_A (39) /* ~1.2pF */
52#endif
53#ifndef AD7746_PARAM_DAC_B
54#define AD7746_PARAM_DAC_B (0)
55#endif
56#ifndef AD7746_PARAM_EXC_CONFIG
57#define AD7746_PARAM_EXC_CONFIG (AD7746_EXC_A)
58#endif
59#ifndef AD7746_PARAM_CAP_IN
60#define AD7746_PARAM_CAP_IN (AD7746_CAP_IN_1)
61#endif
62
63#ifndef AD7746_PARAMS
64#define AD7746_PARAMS { .i2c = AD7746_PARAM_I2C, \
65 .addr = AD7746_PARAM_ADDR, \
66 .dac_a_cap = AD7746_PARAM_DAC_A, \
67 .dac_b_cap = AD7746_PARAM_DAC_B, \
68 .exc_config = AD7746_PARAM_EXC_CONFIG, \
69 .cap_sample_rate = AD7746_PARAM_CAP_SR, \
70 .vt_sample_rate = AD7746_PARAM_VT_SR, \
71 .vt_mode = AD7746_PARAM_VT_MD, \
72 .cap_input = AD7746_PARAM_CAP_IN }
73#endif
74#ifndef AD7746_SAUL_INFO
75#define AD7746_SAUL_INFO { .name = "ad7746" }
76#endif
83{
84 AD7746_PARAMS
85};
86
91{
92 AD7746_SAUL_INFO
93};
94
95#ifdef __cplusplus
96}
97#endif
98
99#endif /* AD7746_PARAMS_H */
AD7746 Capacitance-to-digital converter with temperature sensor driver.
static const saul_reg_info_t ad7746_saul_info[]
Additional meta information to keep in the SAUL registry.
SAUL registry interface definition.
AD7746 params.
Definition ad7746.h:142
Additional data to collect for each entry.
Definition saul_reg.h:49