modtronix H / SX127x_modtronix

Dependents:   SX1276_terminal SX1276_Semtech_GUI

Fork of SX127x by wayne roberts

Revision:
9:b7809c62eaa6
Parent:
6:5d94ee847016
--- a/sx127x.h	Sat Feb 14 10:31:57 2015 +0000
+++ b/sx127x.h	Sun Feb 15 08:15:07 2015 +0000
@@ -195,7 +195,7 @@
          * @param fem_cps rx-tx switch for LF bands (vhf/433)
          */
          
-        SX127x(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName rst, PinName dio_0, PinName dio_1, PinName fem_ctx, PinName fem_cps);
+        SX127x(PinName mosi, PinName miso, PinName sclk, PinName cs, PinName rst, PinName dio_0, PinName dio_1);
         
         ~SX127x();
         
@@ -293,16 +293,20 @@
         DigitalOut m_cs;
         SPI m_spi;
         bool HF;    // sx1272 is always HF   
-        
+
+        /*! board-specific RF switch callback, called whenever operating mode is changed
+         * This function should also set RegPaConfig.bits.PaSelect to use PA_BOOST or RFO during TX.
+         * examples:
+         *      PE4259-63: controlled directly by radio chip, no software function needed
+         *      SKY13350-385LF: two separate control lines, requires two DigitalOut pins
+         */
+        FunctionPointer rf_switch;
+
     private:    
         DigitalInOut reset_pin;
-        //void dio0_callback(void);
-        DigitalOut femcps;  // LF rf switch
-        DigitalOut femctx;  // HF rf switch        
-        
         
     protected:
-        FunctionPointer _callback_rx;
+        //FunctionPointer _callback_rx;
         
 };