123

Files at this revision

API Documentation at this revision

Comitter:
advxolltm
Date:
Mon Jun 06 16:37:00 2022 +0000
Parent:
36:af9b41b1e285
Commit message:
123

Changed in this revision

sx127x.cpp Show annotated file Show diff for this revision Revisions of this file
sx127x_fsk.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/sx127x.cpp	Fri Jul 10 09:23:52 2020 -0700
+++ b/sx127x.cpp	Mon Jun 06 16:37:00 2022 +0000
@@ -62,16 +62,16 @@
     if (!RegOpMode.bits.LongRangeMode) {
         set_opmode(RF_OPMODE_SLEEP);
 #if (MBED_MAJOR_VERSION < 6)
-        ThisThread::sleep_for(10);
+        wait_us(10000);
 #else
-        ThisThread::sleep_for(10ms);
+        wait_us(10000);
 #endif
         RegOpMode.bits.LongRangeMode = 1;
         write_reg(REG_OPMODE, RegOpMode.octet);
 #if (MBED_MAJOR_VERSION < 6)
-        ThisThread::sleep_for(10);
+        wait_us(10000);
 #else
-        ThisThread::sleep_for(10ms);
+        wait_us(10000);
 #endif
         RegOpMode.octet = read_reg(REG_OPMODE);     
     }
@@ -271,21 +271,21 @@
     reset_pin.output();
     reset_pin.write(1);
 #if (MBED_MAJOR_VERSION < 6)
-    ThisThread::sleep_for(50);
+    wait_us(10000);
     if (in == 1) { /* pin is pulled up somewhere? */
         reset_pin.write(0);
-        ThisThread::sleep_for(5);
+        wait_us(10000);
     }
     reset_pin.input();
-    ThisThread::sleep_for(5);
+    wait_us(5000);
 #else
-    ThisThread::sleep_for(50ms);
+    wait_us(50000);
     if (in == 1) { /* pin is pulled up somewhere? */
         reset_pin.write(0);
-        ThisThread::sleep_for(5ms);
+        wait_us(5000);
     }
     reset_pin.input();
-    ThisThread::sleep_for(5ms);
+    wait_us(5000);
 #endif
 }
 
--- a/sx127x_fsk.cpp	Fri Jul 10 09:23:52 2020 -0700
+++ b/sx127x_fsk.cpp	Mon Jun 06 16:37:00 2022 +0000
@@ -306,9 +306,9 @@
         // was already receiving, restart it
         m_xcvr.set_opmode(RF_OPMODE_STANDBY);
 #if (MBED_MAJOR_VERSION < 6)
-        ThisThread::sleep_for(10);
+        wait_us(10000);
 #else
-        ThisThread::sleep_for(10ms);
+        wait_us(10000);
 #endif
     }