Internal RTC Nucleo F767ZI Date Time Set and Print with Threads
Diff: main.cpp
- Revision:
- 1:327e9488a197
- Parent:
- 0:6ffa61b54883
--- a/main.cpp Wed Jun 06 06:55:24 2018 +0000
+++ b/main.cpp Mon Sep 16 13:43:17 2019 +0000
@@ -7,26 +7,28 @@
char Current_Time[15]={'\0'};
void Print_Date_Time(void)
{
- while(true){
+ while(true)
+ {
Get_Date_Time(Current_Time);
led1=!led1;
-
printf("Date and Time is %s\r\n",Current_Time);
-
- wait(1);
+ wait(1);
}
+}
+
+
+int main()
+{
- }
-
-// main() runs in its own thread in the OS
-int main() {
- char Time_2_Set[15]= "28022016235955";//{'\0'};
+ printf("Am here\r\n");
+ char Time_2_Set[40]= "28/02/2019 23:59:55";//{'\0'};
- if(iSetTerminalTime(Time_2_Set)) {
+ if(iSetTerminalTime(Time_2_Set))
+ {
printf("Time Set Success\r\n");
}
-Time.start(Print_Date_Time);
+ Time.start(Print_Date_Time);
}