Smartage application

Dependencies:   BufferedSerial SX1276GenericLib USBDeviceHT mbed Crypto X_NUCLEO_IKS01A2

Fork of STM32L0_LoRa by Helmut Tschemernjak

Files at this revision

API Documentation at this revision

Comitter:
Helmut64
Date:
Thu Jun 29 17:44:18 2017 +0000
Parent:
10:e589a497bd64
Child:
12:aa287e51c09e
Commit message:
Added Radio callback this pointer and userData. This makes it easier to pass context into the interrupt callbacks. The this pointer allows to call C++ functions easier.; Update SX1276GenericLib

Changed in this revision

SX1276GenericLib.lib Show annotated file Show diff for this revision Revisions of this file
SX1276GenericPingPong/GenericPingPong.cpp Show annotated file Show diff for this revision Revisions of this file
SX1276GenericPingPong/GenericPingPong.h Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/SX1276GenericLib.lib	Fri Jun 23 11:46:59 2017 +0000
+++ b/SX1276GenericLib.lib	Thu Jun 29 17:44:18 2017 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/Helmut64/code/SX1276GenericLib/#835c5e20834e
+http://developer.mbed.org/users/Helmut64/code/SX1276GenericLib/#5b9d391244dc
--- a/SX1276GenericPingPong/GenericPingPong.cpp	Fri Jun 23 11:46:59 2017 +0000
+++ b/SX1276GenericPingPong/GenericPingPong.cpp	Thu Jun 29 17:44:18 2017 +0000
@@ -365,7 +365,7 @@
     }
 }
 
-void OnTxDone(void *radio)
+void OnTxDone(void *radio, void *userThisPtr, void *userData)
 {
     Radio->Sleep( );
     State = TX;
@@ -373,7 +373,7 @@
         dprintf("> OnTxDone");
 }
 
-void OnRxDone(void *radio, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr)
+void OnRxDone(void *radio, void *userThisPtr, void *userData, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr)
 {
     Radio->Sleep( );
     BufferSize = size;
@@ -384,7 +384,7 @@
     dump("Data:", payload, size);
 }
 
-void OnTxTimeout(void *radio)
+void OnTxTimeout(void *radio, void *userThisPtr, void *userData)
 {
     *led3 = 0;
     Radio->Sleep( );
@@ -393,7 +393,7 @@
         dprintf("> OnTxTimeout");
 }
 
-void OnRxTimeout(void *radio)
+void OnRxTimeout(void *radio, void *userThisPtr, void *userData)
 {
     *led3 = 0;
     Radio->Sleep( );
@@ -403,7 +403,7 @@
         dprintf("> OnRxTimeout");
 }
 
-void OnRxError(void *radio)
+void OnRxError(void *radio, void *userThisPtr, void *userData)
 {
     Radio->Sleep( );
     State = RX_ERROR;
--- a/SX1276GenericPingPong/GenericPingPong.h	Fri Jun 23 11:46:59 2017 +0000
+++ b/SX1276GenericPingPong/GenericPingPong.h	Thu Jun 29 17:44:18 2017 +0000
@@ -34,36 +34,36 @@
 /*!
  * @brief Function to be executed on Radio Tx Done event
  */
-void OnTxDone(void *radio);
+void OnTxDone(void *radio, void *userThisPtr, void *userData);
 
 /*!
  * @brief Function to be executed on Radio Rx Done event
  */
-void OnRxDone(void *radio, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr );
+void OnRxDone(void *radio, void *userThisPtr, void *userData, uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr );
 
 /*!
  * @brief Function executed on Radio Tx Timeout event
  */
-void OnTxTimeout(void *radio);
+void OnTxTimeout(void *radio, void *userThisPtr, void *userData);
 
 /*!
  * @brief Function executed on Radio Rx Timeout event
  */
-void OnRxTimeout(void *radio);
+void OnRxTimeout(void *radio, void *userThisPtr, void *userData);
 
 /*!
  * @brief Function executed on Radio Rx Error event
  */
-void OnRxError(void *radio);
+void OnRxError(void *radio, void *userThisPtr, void *userData);
 
 /*!
  * @brief Function executed on Radio Fhss Change Channel event
  */
-void OnFhssChangeChannel(void *radio, uint8_t channelIndex );
+void OnFhssChangeChannel(void *radio, void *userThisPtr, void *userData, uint8_t channelIndex);
 
 /*!
  * @brief Function executed on CAD Done event
  */
-void OnCadDone(void *radio);
+void OnCadDone(void *radio, void *userThisPtr, void *userData);
 
 #endif // __MAIN_H__
\ No newline at end of file
--- a/mbed.bld	Fri Jun 23 11:46:59 2017 +0000
+++ b/mbed.bld	Thu Jun 29 17:44:18 2017 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed/builds/86740a56073b
\ No newline at end of file
+https://mbed.org/users/mbed_official/code/mbed/builds/64910690c574
\ No newline at end of file