SX1272Lib

Fork of SX1272Lib by Semtech

Revision:
4:90bd79f1b458
Parent:
2:cd1093b6676f
Child:
7:91ad5308e1a2
--- a/sx1272/sx1272-hal.h	Thu Mar 10 10:20:44 2016 +0000
+++ b/sx1272/sx1272-hal.h	Fri May 13 14:49:34 2016 +0000
@@ -26,6 +26,7 @@
     { MODEM_FSK , REG_LNA                , 0x23 },\
     { MODEM_FSK , REG_RXCONFIG           , 0x1E },\
     { MODEM_FSK , REG_RSSICONFIG         , 0xD2 },\
+    { MODEM_FSK , REG_AFCFEI             , 0x01 },\
     { MODEM_FSK , REG_PREAMBLEDETECT     , 0xAA },\
     { MODEM_FSK , REG_OSC                , 0x07 },\
     { MODEM_FSK , REG_SYNCCONFIG         , 0x12 },\
@@ -61,10 +62,10 @@
     DigitalInOut AntSwitch;
     DigitalIn Fake;
 #endif
-    
+
 private:
     static const RadioRegisters_t RadioRegsInit[];
-    
+
 public:
     SX1272MB2xAS( RadioEvents_t *events,
             PinName mosi, PinName miso, PinName sclk, PinName nss, PinName reset,
@@ -76,17 +77,17 @@
 #else
             PinName antSwitch ); 
 #endif
-    
+
     SX1272MB2xAS( RadioEvents_t *events );
-    
+
     virtual ~SX1272MB2xAS( ) { };
-    
-    protected:
+
+protected:
     /*!
      * @brief Initializes the radio I/Os pins interface
      */
     virtual void IoInit( void );
-    
+
     /*!
      *  @brief Initializes the radio registers
      */
@@ -96,7 +97,7 @@
      * @brief Initializes the radio SPI
      */
     virtual void SpiInit( void );
-    
+
     /*!
      * @brief Initializes DIO IRQ handlers
      *
@@ -146,13 +147,13 @@
      * @param [IN] rxTx [1: Tx, 0: Rx]
      */
     virtual void SetAntSw( uint8_t rxTx );
-    
-    public:
+
+public:
     /*!
      * @brief Detect the board connected by reading the value of the antenna switch pin
      */
     virtual uint8_t DetectBoardType( void );    
-    
+
     /*!
      * @brief Checks if the given RF frequency is supported by the hardware
      *
@@ -160,15 +161,15 @@
      * @retval isSupported [true: supported, false: unsupported]
      */
     virtual bool CheckRfFrequency( uint32_t frequency );
-    
-        /*!
+
+    /*!
      * @brief Writes the radio register at the specified address
      *
      * @param [IN]: addr Register address
      * @param [IN]: data New register value
      */
     virtual void Write ( uint8_t addr, uint8_t data ) ;
-    
+
     /*!
      * @brief Reads the radio register at the specified address
      *
@@ -176,7 +177,7 @@
      * @retval data Register value
      */
     virtual uint8_t Read ( uint8_t addr ) ;
-    
+
     /*!
      * @brief Writes multiple radio registers starting at address
      *
@@ -185,7 +186,7 @@
      * @param [IN] size   Number of registers to be written
      */
     virtual void Write( uint8_t addr, uint8_t *buffer, uint8_t size ) ;
-    
+
     /*!
      * @brief Reads multiple radio registers starting at address
      *
@@ -194,7 +195,7 @@
      * @param [IN] size Number of registers to be read
      */
     virtual void Read ( uint8_t addr, uint8_t *buffer, uint8_t size ) ;
-    
+
     /*!
      * @brief Writes the buffer contents to the SX1272 FIFO
      *
@@ -210,7 +211,7 @@
      * @param [IN] size Number of bytes to be read from the FIFO
      */
     virtual void ReadFifo( uint8_t *buffer, uint8_t size ) ;
-    
+
     /*!
      * @brief Reset the SX1272
      */