![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Repository for final Beacon code of IITMSAT
Diff: beacon.h
- Revision:
- 13:de2bb3b0b0d2
- Parent:
- 12:4113ef89cd78
- Child:
- 14:a7dbfbc462f1
--- a/beacon.h Sun Oct 25 15:34:58 2015 +0000 +++ b/beacon.h Tue Oct 27 11:50:05 2015 +0000 @@ -1,6 +1,5 @@ #include "mbed.h" - //STATES #define BCN_RF_SILENCE 0 #define BCN_TX_DISABLED 1 @@ -12,7 +11,7 @@ #define SHORT_TX_DATA 60 //in bytes #define LONG_TX_DATA 75 //in bytes -//#define RF_SILENCE_TIME 5 //in seconds //shouldn't this be 35 mins in actual scenario +//#define RF_SILENCE_TIME 5 //in seconds #define RF_SILENCE_TIME 35*60 //GLOBAL VARIABLES @@ -20,7 +19,7 @@ uint8_t BCN_TX_MAIN_STATUS; uint8_t BCN_TX_STATUS; uint8_t BCN_TX_EN = 1; //hardcoding for now //check where is this variable toggled?? -uint8_t BCN_FEN = 0; //This variable is also toggled in P_BCN_FEN process. +uint8_t BCN_FEN = 0; //write this to non-erasable memory. uint8_t BCN_STANDBY = 0; //hardcoding for now //check where is this variable toggled?? uint8_t BCN_TS_BUFFER; // For Temperature @@ -28,13 +27,13 @@ void P_BCN_INIT(); void P_BCN_FEN(); void P_BCN_TX_MAIN(); -void Set_BCN_TX_STATUS(uint8_t STATUS); +void Set_BCN_TX_STATUS(uint8_t); int check_Temperature(); void SHORT_BCN_TX(); void LONG_BCN_TX(); void Init_BEACON_HW(); -void writereg(uint8_t reg,uint8_t val); -uint8_t readreg(uint8_t reg); +void writereg(uint8_t,uint8_t); +uint8_t readreg(uint8_t); void clearTxBuf(); int setFrequency(double,float); bool Check_ACK_RECEIVED();