wayne roberts / sx12xx_hal

Dependents:   alarm_slave alarm_master lora_p2p lorawan1v1 ... more

Files at this revision

API Documentation at this revision

Comitter:
Wayne Roberts
Date:
Wed Sep 11 13:20:21 2019 -0700
Parent:
10:3303cf2867d4
Child:
15:e1c04ec39aa4
Commit message:
DioPin_top_half() added to permit scheduling a call to Radio::service()

Changed in this revision

radio.h Show annotated file Show diff for this revision Revisions of this file
radio_sx126x.cpp Show annotated file Show diff for this revision Revisions of this file
radio_sx127x.cpp Show annotated file Show diff for this revision Revisions of this file
radio_sx128x.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/radio.h	Thu Dec 13 18:10:28 2018 -0800
+++ b/radio.h	Wed Sep 11 13:20:21 2019 -0700
@@ -22,7 +22,7 @@
  */
 typedef struct
 {
-    void (*Dio0_top_half)(us_timestamp_t curTime);
+    void (*DioPin_top_half)(void);
     /*!
      * \brief  Tx Done callback prototype.
      */
--- a/radio_sx126x.cpp	Thu Dec 13 18:10:28 2018 -0800
+++ b/radio_sx126x.cpp	Wed Sep 11 13:20:21 2019 -0700
@@ -414,6 +414,9 @@
 {
     irqAt = lpt.read_us();
 
+    if (RadioEvents->DioPin_top_half)
+        RadioEvents->DioPin_top_half();
+
     if (radio.chipMode == CHIPMODE_TX) {
         /* TxDone handling requires low latency */
         if (RadioEvents->TxDone_topHalf) {
--- a/radio_sx127x.cpp	Thu Dec 13 18:10:28 2018 -0800
+++ b/radio_sx127x.cpp	Wed Sep 11 13:20:21 2019 -0700
@@ -205,6 +205,9 @@
 void Radio::dio0isr()
 {
     irqAt = lpt.read_us();
+
+    if (RadioEvents->DioPin_top_half)
+        RadioEvents->DioPin_top_half();
  
     if (pinEvent.txing) {
         /* TxDone handling requires low latency */
@@ -229,6 +232,9 @@
 void Radio::dio1isr()
 {
     pinEvent.dio1 = 1;
+
+    if (RadioEvents->DioPin_top_half)
+        RadioEvents->DioPin_top_half();
 }
 
 void Radio::Init(const RadioEvents_t* e)
--- a/radio_sx128x.cpp	Thu Dec 13 18:10:28 2018 -0800
+++ b/radio_sx128x.cpp	Wed Sep 11 13:20:21 2019 -0700
@@ -248,6 +248,9 @@
 {
     irqAt = lpt.read_us();
 
+    if (RadioEvents->DioPin_top_half)
+        RadioEvents->DioPin_top_half();
+
     if (radio.chipMode == CHIPMODE_TX) {
         /* TxDone handling requires low latency */
         if (RadioEvents->TxDone_topHalf) {