Loading...
Searching...
No Matches
pir_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 UC Berkeley
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "board.h"
19#include "pir.h"
20#include "saul_reg.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
30#ifndef PIR_PARAM_GPIO
34#define PIR_PARAM_GPIO GPIO_PIN(0, 6)
35#endif
36#ifndef PIR_PARAM_ACTIVE_HIGH
40#define PIR_PARAM_ACTIVE_HIGH 1
41#endif
42
43#ifndef PIR_PARAMS
47#define PIR_PARAMS { .gpio = PIR_PARAM_GPIO, \
48 .active_high = PIR_PARAM_ACTIVE_HIGH }
49#endif
50
51#ifndef PIR_SAUL_INFO
55#define PIR_SAUL_INFO { .name = "PIR" }
56#endif
58
62static const pir_params_t pir_params[] =
63{
65};
66
71{
73};
74
75#ifdef __cplusplus
76}
77#endif
78
Device driver interface for the PIR motion sensor.
#define PIR_PARAMS
The PIR configuration parameters.
Definition pir_params.h:47
static const pir_params_t pir_params[]
PIR configuration.
Definition pir_params.h:62
static const saul_reg_info_t pir_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition pir_params.h:70
#define PIR_SAUL_INFO
The SAUL information the PIR devices get registered with.
Definition pir_params.h:55
SAUL registry interface definition.
Parameters needed for device initialization.
Definition pir.h:45
Additional data to collect for each entry.
Definition saul_reg.h:48