From f337a9025a00739ca6bd48b8c06e0ba76c89fb68 Mon Sep 17 00:00:00 2001 From: Alexandre Abadie Date: Fri, 12 Mar 2021 14:35:45 +0100 Subject: [PATCH] pkg/semtech-loramac: only handle CAD/FHSS events with sx127x --- pkg/semtech-loramac/contrib/semtech_loramac.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/semtech-loramac/contrib/semtech_loramac.c b/pkg/semtech-loramac/contrib/semtech_loramac.c index 0505353ab7..332d18771b 100644 --- a/pkg/semtech-loramac/contrib/semtech_loramac.c +++ b/pkg/semtech-loramac/contrib/semtech_loramac.c @@ -40,6 +40,10 @@ #include "LoRaMacTest.h" #include "region/Region.h" +#if IS_USED(MODULE_SX127X) +#include "sx127x.h" +#endif + #ifdef MODULE_PERIPH_EEPROM #include "periph/eeprom.h" #endif @@ -561,6 +565,7 @@ static void _semtech_loramac_event_cb(netdev_t *dev, netdev_event_t event) semtech_loramac_radio_events.RxError(); break; +#if IS_USED(MODULE_SX127X) case NETDEV_EVENT_FHSS_CHANGE_CHANNEL: DEBUG("[semtech-loramac] FHSS channel change\n"); if(semtech_loramac_radio_events.FhssChangeChannel) { @@ -576,6 +581,7 @@ static void _semtech_loramac_event_cb(netdev_t *dev, netdev_event_t event) (sx127x_t *)dev)->_internal.is_last_cad_success); } break; +#endif default: DEBUG("[semtech-loramac] unexpected netdev event received: %d\n",