lolly

Dependencies:   mbed-rtos mbed

Fork of cdms_rtos_summer_lite by Pradeep Kotipalli

Revision:
2:5b3bd8bd753f
Parent:
1:d89391152298
--- a/main.cpp	Mon Jun 08 11:14:41 2015 +0000
+++ b/main.cpp	Wed Jun 10 09:25:02 2015 +0000
@@ -8,6 +8,9 @@
 Thread *ptr_hk_cdms;
 Thread *ptr_hk_payload;
 
+InterruptIn data_ready1(PTC3);
+
+
 Timer t1;
 
 
@@ -20,15 +23,20 @@
         printf("Entered HK_BAE\n");
     }
 }
+
+void FUNC_INIT_HK_PAYLOAD()
+{
+   
+    ptr_hk_payload -> signal_set(0x3); 
+
+}
 void HK_CDMS(void const *args)
 {
     while(1)
     {
         Thread::signal_wait(0x2);
         printf("Entered HK_CDMS\n");
-        printf("hi");
-        printf("heressffhdng\n");
-        printf("portable\n");
+        
     }
 }
 void HK_PAYLOAD(void const *args)
@@ -55,7 +63,7 @@
     {
         ptr_hk_bae -> signal_set(0x1);
         ptr_hk_cdms -> signal_set(0x2);
-        ptr_hk_payload -> signal_set(0x3);
+        
     }
    schedcount++;
 }
@@ -64,12 +72,14 @@
 int main()
 {
     ptr_hk_bae = new Thread (HK_BAE);
+      data_ready1.rise(&FUNC_INIT_HK_PAYLOAD);
+    
     ptr_hk_cdms=new Thread (HK_CDMS);
     ptr_hk_payload=new Thread (HK_PAYLOAD);
     
     ptr_hk_bae->set_priority(osPriorityAboveNormal);
-    ptr_hk_cdms->set_priority(osPriorityHigh);
-    ptr_hk_payload->set_priority(osPriorityNormal);
+    ptr_hk_cdms->set_priority(osPriorityNormal);
+    ptr_hk_payload->set_priority(osPriorityHigh);
     
     printf("\n T_HK_BAE priority is %d",ptr_hk_bae->get_priority());
     printf("\n T_HK_CDMS priority is %d",ptr_hk_cdms->get_priority());