summaryrefslogtreecommitdiff
path: root/firmware/drivers/fat.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/fat.c')
-rw-r--r--firmware/drivers/fat.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/firmware/drivers/fat.c b/firmware/drivers/fat.c
index e4e77627d0..e3e1a755cb 100644
--- a/firmware/drivers/fat.c
+++ b/firmware/drivers/fat.c
@@ -31,9 +31,6 @@
31#include "rbunicode.h" 31#include "rbunicode.h"
32#include "logf.h" 32#include "logf.h"
33#include "atoi.h" 33#include "atoi.h"
34#ifdef CONFIG_RTC
35#include "rtc.h"
36#endif
37 34
38#define BYTES2INT16(array,pos) \ 35#define BYTES2INT16(array,pos) \
39 (array[pos] | (array[pos+1] << 8 )) 36 (array[pos] | (array[pos+1] << 8 ))
@@ -948,10 +945,6 @@ static void fat_time(unsigned short* date,
948{ 945{
949#ifdef CONFIG_RTC 946#ifdef CONFIG_RTC
950 struct tm* tm = get_time(); 947 struct tm* tm = get_time();
951#if CONFIG_RTC == RTC_DS1339_DS3231
952 if(rtc_detected)
953 {
954#endif /* CONFIG_RTC == RTC_DS1339_DS3231 */
955 948
956 if (date) 949 if (date)
957 *date = ((tm->tm_year - 80) << 9) | 950 *date = ((tm->tm_year - 80) << 9) |
@@ -965,14 +958,7 @@ static void fat_time(unsigned short* date,
965 958
966 if (tenth) 959 if (tenth)
967 *tenth = (tm->tm_sec & 1) * 100; 960 *tenth = (tm->tm_sec & 1) * 100;
968 961#else
969#if CONFIG_RTC == RTC_DS1339_DS3231
970 }
971 else
972#endif /* CONFIG_RTC == RTC_DS1339_DS3231 */
973#endif /* CONFIG_RTC */
974#if !defined(CONFIG_RTC) || CONFIG_RTC == RTC_DS1339_DS3231
975 {
976 /* non-RTC version returns an increment from the supplied time, or a 962 /* non-RTC version returns an increment from the supplied time, or a
977 * fixed standard time/date if no time given as input */ 963 * fixed standard time/date if no time given as input */
978 bool next_day = false; 964 bool next_day = false;
@@ -1039,9 +1025,9 @@ static void fat_time(unsigned short* date,
1039 } 1025 }
1040 if (tenth) 1026 if (tenth)
1041 *tenth = 0; 1027 *tenth = 0;
1042 } 1028#endif /* CONFIG_RTC */
1043#endif /* !defined(CONFIG_RTC) || CONFIG_RTC == RTC_DS1339_DS3231 */
1044} 1029}
1030
1045static int write_long_name(struct fat_file* file, 1031static int write_long_name(struct fat_file* file,
1046 unsigned int firstentry, 1032 unsigned int firstentry,
1047 unsigned int numentries, 1033 unsigned int numentries,