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 
9 #pragma once
10 
21 #include "board.h"
22 #include "seesaw_soil.h"
23 #include "saul_reg.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef SEESAW_SOIL_PARAM_I2C
34 #define SEESAW_SOIL_PARAM_I2C I2C_DEV(0)
35 #endif
36 #ifndef SEESAW_SOIL_PARAM_ADDR
37 #define SEESAW_SOIL_PARAM_ADDR (CONFIG_SEESAW_SOIL_I2C_ADDRESS)
38 #endif
39 
40 #ifndef SEESAW_SOIL_PARAMS
41 #define SEESAW_SOIL_PARAMS { .i2c = SEESAW_SOIL_PARAM_I2C, \
42  .addr = SEESAW_SOIL_PARAM_ADDR }
43 #endif
44 #ifndef SEESAW_SOIL_SAUL_INFO
45 #define SEESAW_SOIL_SAUL_INFO { .name = "seesaw_soil" }
46 #endif
53 {
54  SEESAW_SOIL_PARAMS
55 };
56 
61 {
62  SEESAW_SOIL_SAUL_INFO
63 };
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
SAUL registry interface definition.
Interface definition for the Adafruit Seesaw Soil sensor.
static const saul_reg_info_t seesaw_soil_saul_info[]
Additional meta information to keep in the SAUL registry.
static const seesaw_soil_params_t seesaw_soil_params[]
Seesaw Soil configuration.
Additional data to collect for each entry.
Definition: saul_reg.h:48
Parameters needed for device initialization.
Definition: seesaw_soil.h:66