3 * Copyright (c) 2006-2009 by Roland Riegel <feedback@roland-riegel.de>
5 * This file is free software; you can redistribute it and/or modify
6 * it under the terms of either the GNU General Public License version 2
7 * or the GNU Lesser General Public License version 2.1, both as
8 * published by the Free Software Foundation.
15 #include "sd_raw_config.h"
29 * FAT configuration (license: GPLv2 or LGPLv2.1)
34 * Controls FAT write support.
36 * Set to 1 to enable FAT write support, set to 0 to disable it.
38 #define FAT_WRITE_SUPPORT 1
42 * Controls FAT date and time support.
44 * Set to 1 to enable FAT date and time stamping support.
46 #define FAT_DATETIME_SUPPORT 0
50 * Controls FAT32 support.
52 * Set to 1 to enable FAT32 support.
54 #define FAT_FAT32_SUPPORT SD_RAW_SDHC
55 //#define FAT_FAT32_SUPPORT 1
59 * Determines the function used for retrieving current date and time.
61 * Define this to the function call which shall be used to retrieve
62 * current date and time.
64 * \note Used only when FAT_DATETIME_SUPPORT is 1.
66 * \param[out] year Pointer to a \c uint16_t which receives the current year.
67 * \param[out] month Pointer to a \c uint8_t which receives the current month.
68 * \param[out] day Pointer to a \c uint8_t which receives the current day.
69 * \param[out] hour Pointer to a \c uint8_t which receives the current hour.
70 * \param[out] min Pointer to a \c uint8_t which receives the current minute.
71 * \param[out] sec Pointer to a \c uint8_t which receives the current sec.
73 #define fat_get_datetime(year, month, day, hour, min, sec) \
74 get_datetime(year, month, day, hour, min, sec)
75 /* forward declaration for the above */
76 void get_datetime(uint16_t* year, uint8_t* month, uint8_t* day, uint8_t* hour, uint8_t* min, uint8_t* sec);
80 * Maximum number of filesystem handles.
82 #define FAT_FS_COUNT 1
86 * Maximum number of file handles.
88 #define FAT_FILE_COUNT 1
92 * Maximum number of directory handles.
94 #define FAT_DIR_COUNT 2
100 #if FAT_FAT32_SUPPORT
101 typedef uint32_t cluster_t;
103 typedef uint16_t cluster_t;