pir_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 UC Berkeley
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 PIR_PARAMS_H
20 #define PIR_PARAMS_H
21 
22 #include "board.h"
23 #include "pir.h"
24 #include "saul_reg.h"
25 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
34 #ifndef PIR_PARAM_GPIO
35 #define PIR_PARAM_GPIO GPIO_PIN(0, 6)
36 #endif
37 #ifndef PIR_PARAM_ACTIVE_HIGH
38 #define PIR_PARAM_ACTIVE_HIGH 1
39 #endif
40 
41 #ifndef PIR_PARAMS
42 #define PIR_PARAMS { .gpio = PIR_PARAM_GPIO, \
43  .active_high = PIR_PARAM_ACTIVE_HIGH }
44 #endif
45 #ifndef PIR_SAUL_INFO
46 #define PIR_SAUL_INFO { .name = "pir" }
47 #endif
48 
53 static const pir_params_t pir_params[] =
54 {
55  PIR_PARAMS
56 };
57 
62 {
63  PIR_SAUL_INFO
64 };
65 
66 #ifdef __cplusplus
67 }
68 #endif
69 
70 #endif /* PIR_PARAMS_H */
71 
saul_reg_info_t
Additional data to collect for each entry.
Definition: saul_reg.h:49
pir.h
Device driver interface for the PIR motion sensor.
pir_params_t
Parameters needed for device initialization.
Definition: pir.h:46
saul_reg.h
SAUL registry interface definition.
pir_params
static const pir_params_t pir_params[]
PIR configuration.
Definition: pir_params.h:53
pir_saul_info
static const saul_reg_info_t pir_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition: pir_params.h:61