Loading...
Searching...
No Matches
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
27extern "C" {
28#endif
29
34#ifndef PIR_PARAM_GPIO
38#define PIR_PARAM_GPIO GPIO_PIN(0, 6)
39#endif
40#ifndef PIR_PARAM_ACTIVE_HIGH
44#define PIR_PARAM_ACTIVE_HIGH 1
45#endif
46
47#ifndef PIR_PARAMS
51#define PIR_PARAMS { .gpio = PIR_PARAM_GPIO, \
52 .active_high = PIR_PARAM_ACTIVE_HIGH }
53#endif
54
55#ifndef PIR_SAUL_INFO
59#define PIR_SAUL_INFO { .name = "PIR" }
60#endif
66static const pir_params_t pir_params[] =
67{
69};
70
75{
77};
78
79#ifdef __cplusplus
80}
81#endif
82
83#endif /* PIR_PARAMS_H */
Device driver interface for the PIR motion sensor.
#define PIR_PARAMS
The PIR configuration parameters.
Definition pir_params.h:51
static const pir_params_t pir_params[]
PIR configuration.
Definition pir_params.h:66
static const saul_reg_info_t pir_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition pir_params.h:74
#define PIR_SAUL_INFO
The SAUL information the PIR devices get registered with.
Definition pir_params.h:59
SAUL registry interface definition.
Parameters needed for device initialization.
Definition pir.h:46
Additional data to collect for each entry.
Definition saul_reg.h:49