Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FreescaleIAP SimpleDMA mbed-rtos mbed
Fork of CDMS_CODE by
Diff: ThreadsAndFunctions.h
- Revision:
- 126:b7c024b5632d
- Parent:
- 125:a3b95a9c16ef
- Child:
- 128:a232a4352664
diff -r a3b95a9c16ef -r b7c024b5632d ThreadsAndFunctions.h
--- a/ThreadsAndFunctions.h Mon Feb 08 14:24:08 2016 +0000
+++ b/ThreadsAndFunctions.h Wed Feb 10 17:01:26 2016 +0000
@@ -102,7 +102,9 @@
}
}
else if( gFLAGS & NEW_TC_RECEIVED ){
+ #if DEBUG
gPC.puts("NEW TC RECEIVED\r\n");
+ #endif
// DEBUF_PRINT("NEW TC RECEIVED\r\n");
Thread::wait(10000); /*To be removed in flight model*/
gFLAGS = gFLAGS & (~NEW_TC_RECEIVED);
@@ -143,7 +145,9 @@
if( tempPAHot == 0xFF ){
gFLAGS = gFLAGS & ~(COM_PA_HOT_FLAG);
gCOM_PA_COOLING_TIMEOUT.detach();
+ #if DEBUG
gPC.puts("EXECUTING TELECOMMANDS\r\n");
+ #endif
// DEBUF_PRINT("EXECUTING TELECOMMANDS\r\n");
EXECUTE_OBOSC_ONLY;
EXECUTE_TC;
@@ -284,11 +288,37 @@
gPAY_SPI.bulkRead_start();
while(true){
+ #if DEBUG
gPC.puts("entering sci\r\n");
+ #endif
gSCIENCE_THREAD->signal_wait(SCIENCE_SIGNAL);
+ #if DEBUG
gPC.puts("sig_set\r\n");
+ #endif
srp(gPAYLOAD_BUFFER);
+ #if DEBUG
gPC.puts("exit_srp\r\n");
+ #endif
gPAY_SPI.bulkRead_start();
}
+}
+
+//I2C from CDMS to PL
+const int addr1 = (0x20<<1|0);
+
+bool f = 1;
+
+void isr_pyldtm()
+{
+ ptr_t_pyldtm->signal_set(0x4);
+}
+
+char rdata[134];
+void pyldtm(void const *args)
+{
+ while(1)
+ {
+ Thread::signal_wait(0x4);
+ f= master.read(addr1,rdata,134);
+ }
}
\ No newline at end of file
