mirror of https://github.com/ARMmbed/mbed-os.git
Squashed 'connectivity/drivers/802.15.4_RF/stm-s2lp-rf-driver/' changes from f491d77de8..7d12478914
7d12478914 Initialise only configured GPIO pin (#77) git-subtree-dir: connectivity/drivers/802.15.4_RF/stm-s2lp-rf-driver git-subtree-split: 7d124789144549a5670b6e67866c1c9f2158beabpull/14913/head^2
parent
92e35b3a27
commit
8a76989b8c
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue