publishing to check changes in cdms code

Dependencies:   FreescaleIAP SimpleDMA mbed-rtos mbed

Fork of CDMS_CODE_samp_23SEP_DMA_flag by samp Srinivasan

Revision:
209:63e9c8f8b5d2
Child:
214:6848a51af734
Child:
229:42624b9a08b4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/RESET_functions.h	Sat Jul 02 14:54:52 2016 +0000
@@ -0,0 +1,39 @@
+DigitalOut pwr_comrx (PIN72);
+
+void RESET_COMRX();
+void RESET_RTC();
+
+void RESET_COMRX()
+{
+    pwr_comrx = 0;
+    wait_ms(10);
+    pwr_comrx =1;
+}
+
+void RESET_RTC()
+{
+    gCS_RTC=1;
+    gCS_RTC=0;
+    spi.write(0x81); //register address with write flag
+    spi.write(0x80);//enabling stop bit in the seconds register
+ 
+    gCS_RTC=1;
+    gCS_RTC=0;
+    spi.write(0x81);
+    spi.write(0x00);//disabling the stop bit to restart the oscillator 
+
+    wait(4000);
+    //clearing the halt bit 
+    gCS_RTC=1;
+    gCS_RTC=0;
+    spi.write(0x8C);
+    spi.write(0x00);
+     
+    //clearing the OF bit 
+    gCS_RTC=1;
+    gCS_RTC=0;
+    spi.write(0x8F);
+    spi.write(0x00);
+}
+
+