1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-17 02:23:49 +01:00
David Picard 7917f5f28e boards/seeedstudio-xiao-esp32c3: fix BTN0 conflict
Add a uard around macro BTN0_PIN definition to allow the user to redefine
it in order to use the SPI module.
Add a guard around SAUL parameters that use BTN0_PIN to avoid error when
it is redefined.
2025-05-19 13:56:53 +02:00

48 lines
849 B
C

/*
* Copyright (C) 2025 David Picard
*
* 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.
*/
#ifndef GPIO_PARAMS_H
#define GPIO_PARAMS_H
/**
* @ingroup boards_seeedstudio-xiao-esp32c3
* @brief Board specific configuration of direct mapped GPIOs
* @file
* @author David Picard
* @{
*/
#include "board.h"
#include "saul/periph.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief Button configuration
*/
static const saul_gpio_params_t saul_gpio_params[] =
{
{
#ifdef MODULE_PERIPH_INIT_BUTTONS
.name = "BOOT",
.pin = BTN0_PIN,
.mode = BTN0_MODE,
.flags = SAUL_GPIO_INVERTED
#endif
},
};
#ifdef __cplusplus
}
#endif
#endif /* GPIO_PARAMS_H */
/** @} */