From ffb49ad6228e34b46391054701d87a68ca6dc6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=2E=20David=20Ib=C3=A1=C3=B1ez?= Date: Thu, 27 Jan 2022 11:29:40 +0100 Subject: [PATCH] boards/feather-m0: sx127x params only valid for lora vairiant In the feather-m0 board the sx127x pin parameters are hardcoded for the feather-m0-lora variant, but this is not compatible with other configurations. For example in the feather-m0 adalogger PA06 and PA08 are used for the SD card. When combined with the RFM95W FeatherWing the IRQ/CS/RST pins must be wired, and then the sx127x pins must be configured to match the wiring (which will be necessarily different from the lora variant configuration). --- boards/feather-m0/include/board.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/boards/feather-m0/include/board.h b/boards/feather-m0/include/board.h index 0f89ef0b52..956b29e928 100644 --- a/boards/feather-m0/include/board.h +++ b/boards/feather-m0/include/board.h @@ -59,9 +59,11 @@ extern "C" { * @{ **/ #define SX127X_PARAM_SPI SPI_DEV(0) +#if defined(BOARD_FEATHER_M0_LORA) #define SX127X_PARAM_SPI_NSS GPIO_PIN(PA, 6) #define SX127X_PARAM_RESET GPIO_PIN(PA, 8) #define SX127X_PARAM_DIO0 GPIO_PIN(PA, 9) +#endif #define SX127X_PARAM_DIO1 GPIO_UNDEF #define SX127X_PARAM_DIO2 GPIO_UNDEF #define SX127X_PARAM_DIO3 GPIO_UNDEF