You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
354 B
13 lines
354 B
#include <time.h>
|
|
#include "lib/oofatfs/ff.h"
|
|
|
|
DWORD get_fattime(void) {
|
|
time_t now = time(NULL);
|
|
struct tm *tm = localtime(&now);
|
|
return ((1900 + tm->tm_year - 1980) << 25)
|
|
| ((tm->tm_mon + 1) << 21)
|
|
| (tm->tm_mday << 16)
|
|
| (tm->tm_hour << 11)
|
|
| (tm->tm_min << 5)
|
|
| (tm->tm_sec / 2);
|
|
}
|
|
|