1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

pkg/openwsn: allow overiding led pins

This commit is contained in:
Francisco Molina 2020-09-25 17:39:42 +02:00
parent 46fc1f2ae6
commit f5b587c130
No known key found for this signature in database
GPG Key ID: 3E94EAC3DBDEEDA8
2 changed files with 9 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#ifndef OPENWSN_DEBUGPINS_PARAMS_H
#define OPENWSN_DEBUGPINS_PARAMS_H
#include "board.h"
#include "openwsn_debugpins.h"
#ifdef __cplusplus

View File

@ -34,29 +34,37 @@ extern "C" {
* @note On Nucleo boards the LED pin is shared with SPI -> don't use it!
* @{
*/
#ifndef OPENWSN_LEDPIN_ERROR
#if defined (LED0_PIN) && !defined(MODULE_BOARDS_COMMON_NUCLEO)
#define OPENWSN_LEDPIN_ERROR LED0_PIN
#else
#define OPENWSN_LEDPIN_ERROR GPIO_UNDEF
#endif
#endif
#ifndef OPENWSN_LEDPIN_SYNC
#ifdef LED1_PIN
#define OPENWSN_LEDPIN_SYNC LED1_PIN
#else
#define OPENWSN_LEDPIN_SYNC GPIO_UNDEF
#endif
#endif
#ifndef OPENWSN_LEDPIN_RADIO
#ifdef LED2_PIN
#define OPENWSN_LEDPIN_RADIO LED2_PIN
#else
#define OPENWSN_LEDPIN_RADIO GPIO_UNDEF
#endif
#endif
#ifndef OPENWSN_LEDPIN_DEBUG
#ifdef LED3_PIN
#define OPENWSN_LEDPIN_DEBUG LED3_PIN
#else
#define OPENWSN_LEDPIN_DEBUG GPIO_UNDEF
#endif
#endif
#ifndef OPENWSN_LED_ON_STATE
#define OPENWSN_LED_ON_STATE GPIO_LED_LOW