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:
257:7d404e9dc9e2
Parent:
253:fd6696d91e74
Child:
282:74a04dec4b95
diff -r 22d97475ca79 -r 7d404e9dc9e2 RESET_functions.h
--- a/RESET_functions.h	Tue Jul 12 11:10:48 2016 +0000
+++ b/RESET_functions.h	Tue Jul 12 17:07:17 2016 +0000
@@ -10,12 +10,13 @@
 }
 
 void RESET_RTC()
-{   
+{
+    SPI_mutex.lock();
     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);
@@ -33,6 +34,5 @@
     gCS_RTC=0;
     spi.write(0x8F);
     spi.write(0x00);
-}
-
-
+    SPI_mutex.unlock();
+}
\ No newline at end of file