seesaw_soil_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2020 Viktor Gal
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 
19 #ifndef SEESAW_SOIL_PARAMS_H
20 #define SEESAW_SOIL_PARAMS_H
21 
22 #include "board.h"
23 #include "seesaw_soil.h"
24 #include "saul_reg.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #ifndef SEESAW_SOIL_PARAM_I2C
35 #define SEESAW_SOIL_PARAM_I2C I2C_DEV(0)
36 #endif
37 #ifndef SEESAW_SOIL_PARAM_ADDR
38 #define SEESAW_SOIL_PARAM_ADDR (CONFIG_SEESAW_SOIL_I2C_ADDRESS)
39 #endif
40 
41 #ifndef SEESAW_SOIL_PARAMS
42 #define SEESAW_SOIL_PARAMS { .i2c = SEESAW_SOIL_PARAM_I2C, \
43  .addr = SEESAW_SOIL_PARAM_ADDR }
44 #endif
45 #ifndef SEESAW_SOIL_SAUL_INFO
46 #define SEESAW_SOIL_SAUL_INFO { .name = "seesaw_soil" }
47 #endif
48 
54 {
55  SEESAW_SOIL_PARAMS
56 };
57 
62 {
63  SEESAW_SOIL_SAUL_INFO
64 };
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* SEESAW_SOIL_PARAMS_H */
71 
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
saul_reg.h
SAUL registry interface definition.
seesaw_soil_params_t
Parameters needed for device initialization.
Definition: seesaw_soil.h:67
seesaw_soil.h
Interface definition for the Adafruit Seesaw Soil sensor.
seesaw_soil_saul_info
static const saul_reg_info_t seesaw_soil_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: seesaw_soil_params.h:61
seesaw_soil_params
static const seesaw_soil_params_t seesaw_soil_params[]
Seesaw Soil configuration.
Definition: seesaw_soil_params.h:53