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.
Fork of COM_MNG_TMTC_SIMPLE by
Diff: adf.h
- Revision:
- 7:79ef05a77cc4
- Parent:
- 3:6c81fc8834e2
- Child:
- 8:3bf584e8ae60
--- a/adf.h Thu Dec 31 06:43:13 2015 +0000
+++ b/adf.h Thu Dec 31 08:50:47 2015 +0000
@@ -377,6 +377,13 @@
spi.write(0x39);\
spi.write(0x10);\
gCS_ADF=1;\
+ gCS_ADF=0;\
+ spi.write(0xBB);\
+ gCS_ADF=1;\
+ gCS_ADF=0;\
+ spi.write(0xFF);\
+ spi.write(0xFF);\
+ gCS_ADF=1;\
SPI_mutex.unlock();\
}
@@ -421,15 +428,6 @@
#define send_data {\
- SPI_mutex.lock();\
- gCS_ADF=0;\
- spi.write(0xBB);\
- gCS_ADF=1;\
- gCS_ADF=0;\
- spi.write(0xFF);\
- spi.write(0xFF);\
- gCS_ADF=1;\
- SPI_mutex.unlock();\
if(sent_tmfrom_SDcard){\
send_tm_from_SD_card();\
}else{\
@@ -524,16 +522,23 @@
// gCOM_MNG_TMTC_THREAD->signal_set(signal);
//}
-void adf_not_SDcard(){
+void configure_adf(){
buffer_state = true;
last_buffer = false;
loop_on = true;
ADF_off = false;
+ /*initial adf check*/
+ initial_adf_check;
+ gPC.puts("initial adf check\r\n");
+ initiate;
+// gPC.puts("initiate done\r\n");
+ gPC.puts("adf configured\r\n");
+}
+
+void adf_not_SDcard(){
sent_tmfrom_SDcard = false;
-
+ configure_adf();
signal = COM_MNG_TMTC_SIGNAL_ADF_NSD;
- initial_adf_check;
- initiate;
send_data;
// gPC.puts("Inside adf transmission\r\n");
