2 * FreeRTOS+FAT SL V1.0.1 (C) 2014 HCC Embedded
\r
4 * The FreeRTOS+FAT SL license terms are different to the FreeRTOS license
\r
7 * FreeRTOS+FAT SL uses a dual license model that allows the software to be used
\r
8 * under a standard GPL open source license, or a commercial license. The
\r
9 * standard GPL license (unlike the modified GPL license under which FreeRTOS
\r
10 * itself is distributed) requires that all software statically linked with
\r
11 * FreeRTOS+FAT SL is also distributed under the same GPL V2 license terms.
\r
12 * Details of both license options follow:
\r
14 * - Open source licensing -
\r
15 * FreeRTOS+FAT SL is a free download and may be used, modified, evaluated and
\r
16 * distributed without charge provided the user adheres to version two of the
\r
17 * GNU General Public License (GPL) and does not remove the copyright notice or
\r
18 * this text. The GPL V2 text is available on the gnu.org web site, and on the
\r
19 * following URL: http://www.FreeRTOS.org/gpl-2.0.txt.
\r
21 * - Commercial licensing -
\r
22 * Businesses and individuals who for commercial or other reasons cannot comply
\r
23 * with the terms of the GPL V2 license must obtain a commercial license before
\r
24 * incorporating FreeRTOS+FAT SL into proprietary software for distribution in
\r
25 * any form. Commercial licenses can be purchased from
\r
26 * http://shop.freertos.org/fat_sl and do not require any source files to be
\r
29 * FreeRTOS+FAT SL is distributed in the hope that it will be useful. You
\r
30 * cannot use FreeRTOS+FAT SL unless you agree that you use the software 'as
\r
31 * is'. FreeRTOS+FAT SL is provided WITHOUT ANY WARRANTY; without even the
\r
32 * implied warranties of NON-INFRINGEMENT, MERCHANTABILITY or FITNESS FOR A
\r
33 * PARTICULAR PURPOSE. Real Time Engineers Ltd. and HCC Embedded disclaims all
\r
34 * conditions and terms, be they implied, expressed, or statutory.
\r
36 * http://www.FreeRTOS.org
\r
37 * http://www.FreeRTOS.org/FreeRTOS-Plus
\r
44 #include "../../version/ver_fat_sl.h"
\r
45 #if VER_FAT_SL_MAJOR != 5 || VER_FAT_SL_MINOR != 2
\r
46 #error Incompatible FAT_SL version number!
\r
54 /* definitions for ctime */
\r
55 #define F_CTIME_SEC_SHIFT 0
\r
56 #define F_CTIME_SEC_MASK 0x001f /*0-30 in 2seconds*/
\r
57 #define F_CTIME_MIN_SHIFT 5
\r
58 #define F_CTIME_MIN_MASK 0x07e0 /*0-59 */
\r
59 #define F_CTIME_HOUR_SHIFT 11
\r
60 #define F_CTIME_HOUR_MASK 0xf800 /*0-23*/
\r
63 /* definitions for cdate */
\r
64 #define F_CDATE_DAY_SHIFT 0
\r
65 #define F_CDATE_DAY_MASK 0x001f /*0-31*/
\r
66 #define F_CDATE_MONTH_SHIFT 5
\r
67 #define F_CDATE_MONTH_MASK 0x01e0 /*1-12*/
\r
68 #define F_CDATE_YEAR_SHIFT 9
\r
69 #define F_CDATE_YEAR_MASK 0xfe00 /*0-119 (1980+value)*/
\r
72 #define NTRES_LOW 0x08 /*lower case name*/
\r
77 unsigned char name[F_MAXNAME]; /* 8+3 */
\r
78 unsigned char ext[F_MAXEXT];
\r
79 unsigned char attr; /* 00ADVSHR */
\r
81 unsigned char ntres; /* FAT32 only */
\r
82 unsigned char crttimetenth; /* FAT32 only */
\r
83 unsigned char crttime[2]; /* FAT32 only */
\r
84 unsigned char crtdate[2]; /* FAT32 only */
\r
85 unsigned char lastaccessdate[2]; /* FAT32 only */
\r
87 unsigned char clusterhi[2]; /* FAT32 only */
\r
88 unsigned char ctime[2];
\r
89 unsigned char cdate[2];
\r
90 unsigned char clusterlo[2]; /* fat12,fat16,fat32 */
\r
91 unsigned char filesize[4];
\r
95 unsigned char _f_getdirsector ( unsigned long );
\r
96 unsigned char _f_findfilewc ( char *, char *, F_POS *, F_DIRENTRY * *, unsigned char );
\r
97 unsigned char _f_findpath ( F_NAME *, F_POS * );
\r
98 unsigned long _f_getdecluster ( F_DIRENTRY * );
\r
100 unsigned char _f_writedirsector ( void );
\r
101 void _f_setdecluster ( F_DIRENTRY *, unsigned long );
\r
102 unsigned char _f_addentry ( F_NAME *, F_POS *, F_DIRENTRY * * );
\r
108 #endif /* ifndef __DIR_H */
\r