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 COM_MNG_TMTC_SIMPLE by
Diff: ThreadsAndFunctions.h
- Revision:
- 3:6c81fc8834e2
- Parent:
- 2:2caf2a9a13aa
- Child:
- 4:104dd82c99b8
--- a/ThreadsAndFunctions.h Tue Dec 22 06:09:48 2015 +0000
+++ b/ThreadsAndFunctions.h Wed Dec 23 05:37:55 2015 +0000
@@ -151,4 +151,48 @@
gFLAGS = gFLAGS & (~COM_SESSION_FLAG);
}
}
+}
+
+void SCIENCE_FUN(void const *args){
+// SPIpayload.format(8,0);
+// SPIpayload.frequency(1000000);
+ for ( int i = 0 ; i < PAYLOAD_BUFFER_LENGTH ; i++ ){
+ gPAYLOAD_BUFFER[i] = 1;
+ }
+
+ // initialise the buffer for dma
+ // SPIpayload.bulkRead_init(VAR_SPACE::payload_dma_buffer, PAYLOAD_DMA_SIZE, &payload_interrupt_fun);
+ // start dma read
+ // SPIpayload.bulkRead_start();
+
+ // attach DMA interrupt
+ while(true){
+ gSCIENCE_THREAD->signal_wait(0x01);
+
+//*********************************************************THE TEST
+
+ //read rtc time later
+ uint64_t RTC_time = 0;
+ Science_Data_Compression::complete_compression( gPAYLOAD_BUFFER , RTC_time);
+// SPI_mutex.lock();
+// disk_write(SDcard_lastWritten , 5);
+// SPI_mutex.unlock();
+
+//**********************************************THE TEST
+
+
+
+// counter_for_payload++;
+// if(counter_for_payload == 10){
+// payload_ticker.detach();
+// ledg = 0;
+// PC.puts("its over\r\n");
+// }
+
+
+
+
+// SPIpayload.bulkRead_start();
+
+ }
}
\ No newline at end of file
