Team Fox / Mbed 2 deprecated workinQM_5thJan_azad

Dependencies:   FreescaleIAP mbed-rtos mbed

Fork of workinQM_10thDec by Team Fox

Revision:
18:3662058a7c10
Parent:
16:f9e484dc505e
Child:
19:79e69017c855
--- a/BCN.cpp	Fri May 13 11:56:49 2016 +0000
+++ b/BCN.cpp	Sat May 14 11:19:13 2016 +0000
@@ -25,14 +25,16 @@
 {
     pc_bcn.printf("FCTN_BCN_INIT\n");
     BCN_INIT_STATUS = 1;
-    if(BCN_FEN == 0)
-        rf_sl_timeout.attach(&FCTN_BCN_FEN, 30);
+///   if(BCN_FEN == 0)
+///        rf_sl_timeout.attach(&FCTN_BCN_FEN, 70);//actually 30 \\ so basically not able to call the interrupt .!! is it so?
+///     FCTN_BCN_FEN(); 
+
     Init_BEACON_HW();
     BCN_INIT_STATUS = 0;
 }
-void FCTN_BCN_FEN()
+void FCTN_BCN_FEN(void const *args)
 {
-    pc_bcn.printf("FCTN_FEN\n");
+    printf("\n\n\rFCTN_FEN\n");
     BCN_FEN = 1;//write this value to flash
 }
 void FCTN_BCN_TX_MAIN()
@@ -60,7 +62,7 @@
             else
             {       
                     //transmit short beacon and long beacon
-                    //SHORT_BCN_TX();
+                    SHORT_BCN_TX();
                     LONG_BCN_TX();
                     
                     if(Check_ACK_RECEIVED() == 1)
@@ -116,6 +118,8 @@
     writereg(RF22_REG_6F_TX_DATA_RATE,0x50);//160bps
     writereg(RF22_REG_3E_PACKET_LENGTH,SHORT_TX_DATA); //short packet length 
     wait(0.02);      
+    
+    printf("\n\rstage 1");
                                                                            
     uint32_t timeout_count = 10e5;
     //extract values from short_beacon[]
@@ -175,10 +179,10 @@
     //Check for packet_sent
     while(timeout_count--)if((readreg(RF22_REG_03_INTERRUPT_STATUS1) & 0x04) == 0x04)break;
     
-    //pc_bcn.printf("Short packet sent\r\n");
+    pc_bcn.printf("Short packet sent\r\n");
     
     writereg(RF22_REG_07_OPERATING_MODE1,0x00);        //standby mode
-    
+        
 }
 void LONG_BCN_TX()
 {