Skip to content

Commit 43fe6d9

Browse files
authored
Merge pull request #14913 from artokin/update_stm_s2lp_rf_driver
802.15.4 stm-s2lp-rf-driver update to v1.0.10
2 parents 7095dc7 + c682e12 commit 43fe6d9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

connectivity/drivers/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,15 @@ class RFPins {
134134
UnlockedSPI spi;
135135
DigitalOut CS;
136136
DigitalOut SDN;
137+
#if INTERRUPT_GPIO == S2LP_GPIO0
137138
InterruptIn RF_S2LP_GPIO0;
139+
#elif INTERRUPT_GPIO == S2LP_GPIO1
138140
InterruptIn RF_S2LP_GPIO1;
141+
#elif INTERRUPT_GPIO == S2LP_GPIO2
139142
InterruptIn RF_S2LP_GPIO2;
143+
#else
140144
InterruptIn RF_S2LP_GPIO3;
145+
#endif
141146
Timeout cca_timer;
142147
Timeout backup_timer;
143148
Timer tx_timer;
@@ -153,10 +158,15 @@ RFPins::RFPins(PinName spi_sdi, PinName spi_sdo,
153158
: spi(spi_sdi, spi_sdo, spi_sclk),
154159
CS(spi_cs),
155160
SDN(spi_sdn),
161+
#if INTERRUPT_GPIO == S2LP_GPIO0
156162
RF_S2LP_GPIO0(spi_gpio0),
163+
#elif INTERRUPT_GPIO == S2LP_GPIO1
157164
RF_S2LP_GPIO1(spi_gpio1),
165+
#elif INTERRUPT_GPIO == S2LP_GPIO2
158166
RF_S2LP_GPIO2(spi_gpio2),
167+
#else
159168
RF_S2LP_GPIO3(spi_gpio3),
169+
#endif
160170
irq_thread(osPriorityRealtime, 1024)
161171
{
162172
irq_thread.start(mbed::callback(this, &RFPins::rf_irq_task));

0 commit comments

Comments
 (0)