publishing to check changes in cdms code

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE_samp_23SEP_DMA_flag by samp Srinivasan

Revision:
88:b9beee1a7a3e
Parent:
86:a26f5f22631d
Child:
89:cca875337dd5
Child:
91:05cf9d71a665
diff -r 6e154fd43531 -r b9beee1a7a3e OBSRS.h
--- a/OBSRS.h	Wed Jan 20 17:00:54 2016 +0000
+++ b/OBSRS.h	Thu Jan 21 14:35:11 2016 +0000
@@ -46,7 +46,7 @@
 
 uint8_t SID ;
 unsigned char buffer_112[112];
-uint32_t FSC;
+uint8_t FSC;
 uint16_t read_success = false;
 uint16_t counter_buffer_112=0, counter_EoS=0,T_frames_sent=0;
 uint16_t counter_call_sign_buffer=0;
@@ -61,8 +61,8 @@
 uint16_t T_frame_Ack_andcallsign_sent = 0; 
 uint16_t T_frame_in_Ackandcallsign = 4;                        // needs to get from sukhdeep depends on size of Ack_L1
 uint64_t start_block_num ;
-uint32_t block_counter = 0;
-uint32_t no_of_frames =0;                             
+uint8_t block_counter = 0;
+uint8_t no_of_frames =0;                             
 int Ack_L1; // should be always even
 
 //#define max_segments = 65415/(48+T_frames_in_segment*159)
@@ -492,38 +492,41 @@
 void execute_OBSRS_TC(Base_tc *tcp){
     short_TC = true;
     //pc.printf("WELCOME\n\r");
-//    FCTN_CDMS_SD_INIT();/* sd card initialization*/
+    FCTN_CDMS_SD_INIT();/* sd card initialization*/
 //    SID = 0x0;
 //    FSC =10;
 //    no_of_frames =1;
 //    short_TC = true;
-//    adf_SND_SDCard;
+//    adf_SND_SDCard();
 
-    if( GETshort_or_long_tc(tcp) == SHORT_TC_CODE ){
-        short_TC = true;
-    }
-    else{
-        short_TC = false;    
-    }
-    /*  reading SID from TC  */
-    SID = (tcp->TC_string[2]) & 0x0f;
-    /*  reading FSC and no. of frames from TC  */
-    if(short_TC){
-    FSC  = tcp->TC_string[3] << 24;
-    FSC += tcp->TC_string[4] << 16;
-    FSC += tcp->TC_string[5] << 8;
-    FSC += tcp->TC_string[6];
-    no_of_frames = tcp->TC_string[7] << 8;
-    no_of_frames += tcp->TC_string[8];
-    }
-    else{
-        no_of_frames = tcp->TC_string[3];
-        for(int i=0 ;i<no_of_frames ; i++){
-            list_of_FSC[i] = tcp->TC_string[4+i];
-        }
-    }
-    gPC.printf("sid = %u \r\n",SID);
-    gPC.printf("FSC = %u\r\n",FSC);
+//    if( GETshort_or_long_tc(tcp) == SHORT_TC_CODE ){
+//        short_TC = true;
+//    }
+//    else{
+//        short_TC = false;    
+//    }
+//    /*  reading SID from TC  */
+//    SID = (tcp->TC_string[2]) & 0x0f;
+//    /*  reading FSC and no. of frames from TC  */
+//    if(short_TC){
+//    FSC  = tcp->TC_string[3] << 24;
+//    FSC += tcp->TC_string[4] << 16;
+//    FSC += tcp->TC_string[5] << 8;
+//    FSC += tcp->TC_string[6];
+//    no_of_frames = tcp->TC_string[7] << 8;
+//    no_of_frames += tcp->TC_string[8];
+//    }
+//    else{
+//        no_of_frames = tcp->TC_string[3];
+//        for(int i=0 ;i<no_of_frames ; i++){
+//            list_of_FSC[i] = tcp->TC_string[4+i];
+//        }
+//    }
+//    gPC.printf("sid = %u \r\n",SID);
+//    gPC.printf("FSC = %u\r\n",FSC);
+    SID = 0x0;
+    FSC = 10;
+    no_of_frames = 2;
 //    cout<<"max_segments = "<<max_segments<<ENDL;
     //while(0){
 //    while(!stop){