![](/media/cache/profiles/827ccb0eea8a706c4c34a16891f84e7b.jpg.50x50_q85.jpg)
Bootload from SD card to sector 0, and jump to sector 24 where new firmware resides
Fork of Panel-Controller-Bootloader by
Diff: fattime.c
- Revision:
- 0:c3a652eff606
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/fattime.c Tue Apr 21 09:30:11 2015 +0000 @@ -0,0 +1,23 @@ +/* Martin Thomas 4/2009 */ + +#include "integer.h" +#include "fattime.h" +#include "rtc.h" + +DWORD get_fattime (void) +{ + DWORD res; + RTC_t rtc; + + rtc_gettime( &rtc ); + + res = (((DWORD)rtc.year - 1980) << 25) + | ((DWORD)rtc.month << 21) + | ((DWORD)rtc.mday << 16) + | (WORD)(rtc.hour << 11) + | (WORD)(rtc.min << 5) + | (WORD)(rtc.sec >> 1); + + return res; +} +