aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/TemperatureDataLogger/Lib/FATFs
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/TemperatureDataLogger/Lib/FATFs')
-rw-r--r--Projects/TemperatureDataLogger/Lib/FATFs/diskio.c14
-rw-r--r--Projects/TemperatureDataLogger/Lib/FATFs/ffconf.h2
2 files changed, 14 insertions, 2 deletions
diff --git a/Projects/TemperatureDataLogger/Lib/FATFs/diskio.c b/Projects/TemperatureDataLogger/Lib/FATFs/diskio.c
index e6be68734..0c0083bac 100644
--- a/Projects/TemperatureDataLogger/Lib/FATFs/diskio.c
+++ b/Projects/TemperatureDataLogger/Lib/FATFs/diskio.c
@@ -83,5 +83,17 @@ DRESULT disk_ioctl (
DWORD get_fattime (void)
{
- return (1UL << 25) | (1UL << 21) | (1UL << 16) | (1UL << 11) | (1UL << 5) | (1UL << 0);
+ uint8_t Day, Month, Year;
+ uint8_t Hour, Minute, Second;
+
+ DS1307_GetDate(&Day, &Month, &Year);
+ DS1307_GetTime(&Hour, &Minute, &Second);
+
+
+ return ((DWORD)(20 + Year) << 25) |
+ ((DWORD)Month << 21) |
+ ((DWORD)Day << 16) |
+ ((DWORD)Hour << 11) |
+ ((DWORD)Minute << 5) |
+ (((DWORD)Second >> 1) << 0);
}
diff --git a/Projects/TemperatureDataLogger/Lib/FATFs/ffconf.h b/Projects/TemperatureDataLogger/Lib/FATFs/ffconf.h
index 18510157d..9b414e979 100644
--- a/Projects/TemperatureDataLogger/Lib/FATFs/ffconf.h
+++ b/Projects/TemperatureDataLogger/Lib/FATFs/ffconf.h
@@ -36,7 +36,7 @@
/ 3: f_lseek is removed in addition to level 2. */
-#define _USE_STRFUNC 1 /* 0, 1 or 2 */
+#define _USE_STRFUNC 0 /* 0, 1 or 2 */
/* To enable string functions, set _USE_STRFUNC to 1 or 2. */