fuck this
Dependencies: BMP280
TimeInterface.h
00001 #include "mbed.h" 00002 /* 00003 * These functions provide an easy way to set and read the onboard time of day clock. 00004 * At start, the clock will read 1970 and so needs to be set for meaningful values. 00005 * Time is returned in a tm data strucure. Variables held in the structure are 00006 * listed at the bottom of the header file. 00007 */ 00008 void SetDate(int DD, int MM, int YYYY); 00009 //Sets the given date as system date. Does not modify time. 00010 00011 void SetTime(int HH, int mm, int ss); 00012 00013 struct tm ReturnDateTimeStruct(time_t seconds); 00014 //Returns a time structure from the integer time given. 00015 //Passing in time(0) will pass in the current system time. 00016 00017 /* tm structure: 00018 *struct tm { 00019 * int tm_sec; // seconds of minutes from 0 to 61 00020 * int tm_min; // minutes of hour from 0 to 59 00021 * int tm_hour; // hours of day from 0 to 24 00022 * int tm_mday; // day of month from 1 to 31 00023 * int tm_mon; // month of year from 1 to 12 (customised) 00024 * int tm_year; // year since 1900 (customised)gives acctual year 00025 * int tm_wday; // days since sunday 00026 * int tm_yday; // days since January 1st 00027 * int tm_isdst; // hours of daylight savings time 00028 *} 00029 tm T = ReturnDateTimeStruct(3456784567); 00030 T.tm_hour; 00031 00032 */
Generated on Tue Jul 26 2022 07:29:23 by 1.7.2