STM32F103C8T6_Internal_RTC
Dependencies: mbed-STM32F103C8T6 mbed
Fork of STM32F103C8T6_GPRS_TCP by
main.cpp
- Committer:
- shivanandgowdakr
- Date:
- 2018-07-13
- Revision:
- 13:bf9a5ca067bf
- Parent:
- 12:91de57777095
File content as of revision 13:bf9a5ca067bf:
#include "stm32f103c8t6.h" #include "mbed.h" #include "Time.h" Serial pc(PA_2, PA_3); DigitalOut myled(LED1); int main() { confSysClock(); myled = 0; // turn the LED on wait_ms(200); // 200 millisecond myled = 1; // turn the LED off wait_ms(1000); // 1000 millisecond pc.printf("Blink\r\n"); char DATE[12]={'\0'}; char TIME[10]={'\0'}; int success=iSetTerminalTime("14072018101113"); if(success==0) pc.printf(" Time Set Successfull\r\n"); else pc.printf(" Unable to set terminal time \r\n"); while(success==0) { Get_Date_Time(DATE,TIME); pc.printf("Date : %s\r\n",DATE); pc.printf("Time : %s\r\n",TIME); } }