sx1261/2 driver

Dependents:   alarm_slave iq_sx126x sx126x_simple_TX_shield_2020a sx126x_simple_RX_shield_2020a ... more

Driver for SX1261 or SX1262

Files at this revision

API Documentation at this revision

Comitter:
Wayne Roberts
Date:
Fri Jul 10 09:44:30 2020 -0700
Parent:
12:7a3ec8bb8407
Commit message:
run on mbed-6

Changed in this revision

sx126x.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 7a3ec8bb8407 -r 5703598a88fb sx126x.cpp
--- a/sx126x.cpp	Mon May 04 17:48:12 2020 -0700
+++ b/sx126x.cpp	Fri Jul 10 09:44:30 2020 -0700
@@ -61,7 +61,6 @@
     printf("\r\n");
 }
 
-extern RawSerial pc;
 void SX126x::service()
 {
     IrqFlags_t irqFlags, clearIrqFlags;
@@ -376,7 +375,11 @@
     DigitalInOut nrst(pin);
     nrst.output();
     nrst = 0;
-    wait_us(100);
+#if (MBED_MAJOR_VERSION < 6)
+    ThisThread::sleep_for(1);
+#else
+    ThisThread::sleep_for(1ms);
+#endif
     nrst = 1;
     nrst.mode(PullUp);
     nrst.input();