From 835bfb7d367996402830f1bb2a695769a92783bb Mon Sep 17 00:00:00 2001 From: Arto Kinnunen Date: Thu, 23 Sep 2021 11:16:19 +0300 Subject: [PATCH] 802.15.4 STM S2LP driver update Update STM S2LP driver to version v1.0.10 --- .../stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp b/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp index 63a5f90dde..41967c9e1a 100644 --- a/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp +++ b/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp @@ -134,10 +134,15 @@ public: UnlockedSPI spi; DigitalOut CS; DigitalOut SDN; +#if INTERRUPT_GPIO == S2LP_GPIO0 InterruptIn RF_S2LP_GPIO0; +#elif INTERRUPT_GPIO == S2LP_GPIO1 InterruptIn RF_S2LP_GPIO1; +#elif INTERRUPT_GPIO == S2LP_GPIO2 InterruptIn RF_S2LP_GPIO2; +#else InterruptIn RF_S2LP_GPIO3; +#endif Timeout cca_timer; Timeout backup_timer; Timer tx_timer; @@ -153,10 +158,15 @@ RFPins::RFPins(PinName spi_sdi, PinName spi_sdo, : spi(spi_sdi, spi_sdo, spi_sclk), CS(spi_cs), SDN(spi_sdn), +#if INTERRUPT_GPIO == S2LP_GPIO0 RF_S2LP_GPIO0(spi_gpio0), +#elif INTERRUPT_GPIO == S2LP_GPIO1 RF_S2LP_GPIO1(spi_gpio1), +#elif INTERRUPT_GPIO == S2LP_GPIO2 RF_S2LP_GPIO2(spi_gpio2), +#else RF_S2LP_GPIO3(spi_gpio3), +#endif irq_thread(osPriorityRealtime, 1024) { irq_thread.start(mbed::callback(this, &RFPins::rf_irq_task));