1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-23 13:33:49 +01:00
RIOT/drivers/pir/include/pir_params.h
Marian Buschsieweke cac44edec7
tree-wide: replace multiple empty lines with one
For each C source/header `$file`: `sed -e '/^$/N;/^\n$/D' -i $file`.
2025-05-21 22:51:04 +02:00

83 lines
1.5 KiB
C

/*
* Copyright (C) 2018 UC Berkeley
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
#pragma once
/**
* @ingroup drivers_pir
*
* @{
* @file
* @brief Default configuration for PIR devices
*
* @author Hyung-Sin Kim <hs.kim@cs.berkeley.edu>
*/
#include "board.h"
#include "pir.h"
#include "saul_reg.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @name default configuration parameters for the PIR driver
* @{
*/
#ifndef PIR_PARAM_GPIO
/**
* @brief GPIO pin the PIR is connected to
*/
#define PIR_PARAM_GPIO GPIO_PIN(0, 6)
#endif
#ifndef PIR_PARAM_ACTIVE_HIGH
/**
* @brief Signal polarity: 1 means high on active, 0 means low on active
*/
#define PIR_PARAM_ACTIVE_HIGH 1
#endif
#ifndef PIR_PARAMS
/**
* @brief The PIR configuration parameters
*/
#define PIR_PARAMS { .gpio = PIR_PARAM_GPIO, \
.active_high = PIR_PARAM_ACTIVE_HIGH }
#endif
#ifndef PIR_SAUL_INFO
/**
* @brief The SAUL information the PIR devices get registered with
*/
#define PIR_SAUL_INFO { .name = "PIR" }
#endif
/**@}*/
/**
* @brief PIR configuration
*/
static const pir_params_t pir_params[] =
{
PIR_PARAMS
};
/**
* @brief Additional meta information to keep in the SAUL registry
*/
static const saul_reg_info_t pir_saul_info[] =
{
PIR_SAUL_INFO
};
#ifdef __cplusplus
}
#endif
/** @} */