00001 00006 #include "sceptre.h" 00007 00008 00024 uint32_t get_fattime(void) 00025 { 00026 uint32_t res; 00027 rtc_time_t rtc; 00028 00029 rtc_get_time(&rtc); 00030 00031 res = (((uint32_t)rtc.year - 1980) << 25) 00032 | ((uint32_t)rtc.month << 21) 00033 | ((uint32_t)rtc.day_of_month << 16) 00034 | (uint16_t)(rtc.hours << 11) 00035 | (uint16_t)(rtc.minutes << 5) 00036 | (uint16_t)(rtc.seconds >> 1); 00037 00038 return res; 00039 } 00040