ds18_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2017 Frits Kuipers
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 DS18_PARAMS_H
20 #define DS18_PARAMS_H
21 
22 #include "ds18.h"
23 #include "saul_reg.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
33 #ifndef DS18_PARAM_PIN
34 #define DS18_PARAM_PIN (GPIO_PIN(0, 0))
35 #endif
36 #ifndef DS18_PARAM_PULL
37 #define DS18_PARAM_PULL (GPIO_OD_PU)
38 #endif
39 
40 #define DS18_PARAMS_DEFAULT { .pin = DS18_PARAM_PIN, \
41  .out_mode = DS18_PARAM_PULL }
42 
47 static const ds18_params_t ds18_params[] =
48 {
49 #ifdef DS18_PARAMS_BOARD
50  DS18_PARAMS_BOARD,
51 #else
52  DS18_PARAMS_DEFAULT,
53 #endif
54 };
55 
60 {
61  { .name = "ds18" }
62 };
63 
64 #ifdef __cplusplus
65 }
66 #endif
67 
68 #endif /* DS18_PARAMS_H */
69 
ds18_saul_reg_info
static const saul_reg_info_t ds18_saul_reg_info[]
Configure SAUL registry entries.
Definition: ds18_params.h:59
ds18_params_t
Device initialization parameters.
Definition: ds18.h:59
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
saul_reg_info_t::name
const char * name
string identifier for a device
Definition: saul_reg.h:50
ds18_params
static const ds18_params_t ds18_params[]
Configure ds18.
Definition: ds18_params.h:47
saul_reg.h
SAUL registry interface definition.
ds18.h
Driver for Maxim Integrated DS1822 and DS18B20 temperature sensors.