SX1261 and sx1262 common library

Dependents:   SX126xDevKit SX1262PingPong SX126X_TXonly SX126X_PingPong_Demo ... more

Fork of SX126xLib by Gregory Cristian

Revision:
2:4ff11ea92fbe
Parent:
0:deaafdfde3bb
Child:
3:7e3595a9ebe0
--- a/sx126x.h	Tue Sep 06 07:04:37 2016 +0000
+++ b/sx126x.h	Fri Sep 23 09:38:34 2016 +0000
@@ -12,29 +12,29 @@
 
 Maintainer: Miguel Luis, Gregory Cristian and Matthieu Verdy
 */
-#ifndef __SX1261_H__
-#define __SX1261_H__
+#ifndef __SX126x_H__
+#define __SX126x_H__
 
 #include "radio.h"
 
 /*!
  * \brief Enables/disables driver debug features
  */
-#define SX1261_DEBUG                                0
+#define SX126x_DEBUG                                0
 
 
 
 /*!
  * \brief Hardware IO IRQ callback function definition
  */
-class SX1261;
-typedef void ( SX1261::*DioIrqHandler )( void );
+class SX126x;
+typedef void ( SX126x::*DioIrqHandler )( void );
 
 /*!
  * \brief IRQ triggers callback function definition
  */
-class SX1261Hal;
-typedef void ( SX1261Hal::*Trigger )( void );
+class SX126xHal;
+typedef void ( SX126xHal::*Trigger )( void );
 
 /*!
  * \brief Provides the frequency of the chip running on the radio and the frequency step
@@ -652,15 +652,15 @@
 
 
 /*!
- * \brief Represents the SX1261 and its features
+ * \brief Represents the SX126x and its features
  *
- * It implements the commands the SX1261 can understands
+ * It implements the commands the SX126x can understands
  */
-class SX1261 : public Radio
+class SX126x : public Radio
 {
 public:
     /*!
-     * \brief Instantiates a SX1261 object and provides API functions to communicates with the radio
+     * \brief Instantiates a SX126x object and provides API functions to communicates with the radio
      *
      * \param [in]  txDone                Pointer to a function run on successful transmission
      * \param [in]  rxDone                Pointer to a function run on successful reception
@@ -671,19 +671,19 @@
      * \param [in]  cadDone               Pointer to a function run on channel activity detected
      *
      */
-    SX1261( void ( *txDone )( ), void ( *rxDone )( ), void ( *rxPblSyncWordHeader )(IrqPblSyncHeaderCode_t val ),
+    SX126x( void ( *txDone )( ), void ( *rxDone )( ), void ( *rxPblSyncWordHeader )(IrqPblSyncHeaderCode_t val ),
             void ( *rxTxTimeout )( ), void ( *rxError )( IrqErrorCode_t errorCode ), void ( *rangingDone )( IrqRangingCode_t val ),
             void ( *cadDone )( bool channelActivityDetected ),  void ( *onDioIrq )( ) ): Radio( txDone, rxDone, rxPblSyncWordHeader, rxTxTimeout, rxError, rangingDone, cadDone )
     {
 
-        this->dioIrq = &SX1261::OnDioIrq;
+        this->dioIrq = &SX126x::OnDioIrq;
       
         this->onCustomDioIrq = onDioIrq;
   
         this->PacketType = PACKET_TYPE_NONE;
     }
 
-    virtual ~SX1261( )
+    virtual ~SX126x( )
     {
     }
 
@@ -1204,4 +1204,4 @@
      int8_t GetHexFileLineFields( char* line, uint8_t *bytes, uint16_t *addr, uint16_t *num, uint8_t *code );
 };
 
-#endif // __SX1261_H__
+#endif // __SX126x_H__