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
9#pragma once
10
21
22#include "board.h"
23#include "saul_reg.h"
24#include "ad7746.h"
25
26#ifdef __cplusplus
27extern "C" {
28#endif
29
34#ifndef AD7746_PARAM_I2C
35#define AD7746_PARAM_I2C (I2C_DEV(0))
36#endif
37#ifndef AD7746_PARAM_ADDR
38#define AD7746_PARAM_ADDR (0x48)
39#endif
40#ifndef AD7746_PARAM_CAP_SR
41#define AD7746_PARAM_CAP_SR (AD7746_CAP_SR_091)
42#endif
43#ifndef AD7746_PARAM_VT_SR
44#define AD7746_PARAM_VT_SR (AD7746_VT_SR_082)
45#endif
46#ifndef AD7746_PARAM_VT_MD
47#define AD7746_PARAM_VT_MD (AD7746_VT_MD_TEMP)
48#endif
49#ifndef AD7746_PARAM_DAC_A
50#define AD7746_PARAM_DAC_A (39) /* ~1.2pF */
51#endif
52#ifndef AD7746_PARAM_DAC_B
53#define AD7746_PARAM_DAC_B (0)
54#endif
55#ifndef AD7746_PARAM_EXC_CONFIG
56#define AD7746_PARAM_EXC_CONFIG (AD7746_EXC_A)
57#endif
58#ifndef AD7746_PARAM_CAP_IN
59#define AD7746_PARAM_CAP_IN (AD7746_CAP_IN_1)
60#endif
61
62#ifndef AD7746_PARAMS
63#define AD7746_PARAMS { .i2c = AD7746_PARAM_I2C, \
64 .addr = AD7746_PARAM_ADDR, \
65 .dac_a_cap = AD7746_PARAM_DAC_A, \
66 .dac_b_cap = AD7746_PARAM_DAC_B, \
67 .exc_config = AD7746_PARAM_EXC_CONFIG, \
68 .cap_sample_rate = AD7746_PARAM_CAP_SR, \
69 .vt_sample_rate = AD7746_PARAM_VT_SR, \
70 .vt_mode = AD7746_PARAM_VT_MD, \
71 .cap_input = AD7746_PARAM_CAP_IN }
72#endif
73#ifndef AD7746_SAUL_INFO
74#define AD7746_SAUL_INFO { .name = "ad7746" }
75#endif
77
82{
83 AD7746_PARAMS
84};
85
90{
91 AD7746_SAUL_INFO
92};
93
94#ifdef __cplusplus
95}
96#endif
97
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