Loading...
Searching...
No Matches
ad7746_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
18
19#include "board.h"
20#include "saul_reg.h"
21#include "ad7746.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31#ifndef AD7746_PARAM_I2C
32#define AD7746_PARAM_I2C (I2C_DEV(0))
33#endif
34#ifndef AD7746_PARAM_ADDR
35#define AD7746_PARAM_ADDR (0x48)
36#endif
37#ifndef AD7746_PARAM_CAP_SR
38#define AD7746_PARAM_CAP_SR (AD7746_CAP_SR_091)
39#endif
40#ifndef AD7746_PARAM_VT_SR
41#define AD7746_PARAM_VT_SR (AD7746_VT_SR_082)
42#endif
43#ifndef AD7746_PARAM_VT_MD
44#define AD7746_PARAM_VT_MD (AD7746_VT_MD_TEMP)
45#endif
46#ifndef AD7746_PARAM_DAC_A
47#define AD7746_PARAM_DAC_A (39) /* ~1.2pF */
48#endif
49#ifndef AD7746_PARAM_DAC_B
50#define AD7746_PARAM_DAC_B (0)
51#endif
52#ifndef AD7746_PARAM_EXC_CONFIG
53#define AD7746_PARAM_EXC_CONFIG (AD7746_EXC_A)
54#endif
55#ifndef AD7746_PARAM_CAP_IN
56#define AD7746_PARAM_CAP_IN (AD7746_CAP_IN_1)
57#endif
58
59#ifndef AD7746_PARAMS
60#define AD7746_PARAMS { .i2c = AD7746_PARAM_I2C, \
61 .addr = AD7746_PARAM_ADDR, \
62 .dac_a_cap = AD7746_PARAM_DAC_A, \
63 .dac_b_cap = AD7746_PARAM_DAC_B, \
64 .exc_config = AD7746_PARAM_EXC_CONFIG, \
65 .cap_sample_rate = AD7746_PARAM_CAP_SR, \
66 .vt_sample_rate = AD7746_PARAM_VT_SR, \
67 .vt_mode = AD7746_PARAM_VT_MD, \
68 .cap_input = AD7746_PARAM_CAP_IN }
69#endif
70#ifndef AD7746_SAUL_INFO
71#define AD7746_SAUL_INFO { .name = "ad7746" }
72#endif
74
79{
80 AD7746_PARAMS
81};
82
87{
88 AD7746_SAUL_INFO
89};
90
91#ifdef __cplusplus
92}
93#endif
94
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.
struct ad7746_params ad7746_params_t
AD7746 params.
SAUL registry interface definition.
AD7746 params.
Definition ad7746.h:141
Additional data to collect for each entry.
Definition saul_reg.h:48