Repository for CDMS code

Dependencies:   SimpleDMA mbed-rtos mbed eeprom

Fork of COM_MNG_TMTC_SIMPLE by Shreesha S

Files at this revision

API Documentation at this revision

Comitter:
ee12b079
Date:
Mon Apr 11 15:42:15 2016 +0000
Parent:
152:8e4155426581
Commit message:
debug i2c_cdms

Changed in this revision

i2c.h Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/i2c.h	Mon Apr 04 10:44:44 2016 +0000
+++ b/i2c.h	Mon Apr 11 15:42:15 2016 +0000
@@ -33,9 +33,9 @@
     read_ack = master.read(addr_bae|1,data,length);
     //t_read.stop();
   
-    if(read_ack == 0)
-        printf("\n\rData received from BAE %s \n",data);
- if (read_ack == 1)
+ //   if(read_ack == 0)
+   //     printf("\n\rData received from BAE %s \n",data);
+    if (read_ack == 1)
     {
         printf("\n \r data not received \n");
     }
--- a/main.cpp	Mon Apr 04 10:44:44 2016 +0000
+++ b/main.cpp	Mon Apr 11 15:42:15 2016 +0000
@@ -102,21 +102,25 @@
    
     uint8_t TC[11] = {0x1, 0x60, 0x81, 0x21, 0x0, 0x0, 0x0, 0x0, 0x0, 0x1d, 0xd9};
     uint8_t TM[134];
-    FCTN_I2C_WRITE((char*)TC,TC_SHORT_SIZE);
+    printf("\n\r sending tc\n");
+    while(1)
+    {
+                wait(5);
+                FCTN_I2C_WRITE((char*)TC,TC_SHORT_SIZE);
             
                 wait(1); //TimeOut instead of wait
-                if(BAE_I2C_GPIO == 1)
+                /*if(BAE_I2C_GPIO == 1)
                 {
                     
-                    //printf("receiving...\r\n");
+                   // printf("receiving...\r\n");
                     FCTN_I2C_READ((char*)TM,TM_LONG_SIZE);
                     //printf("%s", tm_pointer->TM_string);
                 }
                 else
                 {
                     gPC.printf("bae_INTR NOT HIGH");
-                    }
-   
+                    }*/
+   }
     while(true){
         Thread::wait(osWaitForever);
         //state = gCOM_MNG_TMTC_THREAD->get_state() + '0';