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
9#pragma once
10
20
21#include "board.h"
22#include "pir.h"
23#include "saul_reg.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#ifndef PIR_PARAM_GPIO
37#define PIR_PARAM_GPIO GPIO_PIN(0, 6)
38#endif
39#ifndef PIR_PARAM_ACTIVE_HIGH
43#define PIR_PARAM_ACTIVE_HIGH 1
44#endif
45
46#ifndef PIR_PARAMS
50#define PIR_PARAMS { .gpio = PIR_PARAM_GPIO, \
51 .active_high = PIR_PARAM_ACTIVE_HIGH }
52#endif
53
54#ifndef PIR_SAUL_INFO
58#define PIR_SAUL_INFO { .name = "PIR" }
59#endif
61
65static const pir_params_t pir_params[] =
66{
68};
69
74{
76};
77
78#ifdef __cplusplus
79}
80#endif
81
Device driver interface for the PIR motion sensor.
#define PIR_PARAMS
The PIR configuration parameters.
Definition pir_params.h:50
static const pir_params_t pir_params[]
PIR configuration.
Definition pir_params.h:65
static const saul_reg_info_t pir_saul_info[]
Additional meta information to keep in the SAUL registry.
Definition pir_params.h:73
#define PIR_SAUL_INFO
The SAUL information the PIR devices get registered with.
Definition pir_params.h:58
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