1 /*****************************************************************************
2 * FullFAT - High Performance, Thread-Safe Embedded FAT File-System *
3 * Copyright (C) 2009 James Walmsley (james@worm.me.uk) *
5 * This program is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 3 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program. If not, see <http://www.gnu.org/licenses/>. *
20 * Alternative Licensing is available directly from the Copyright holder, *
21 * (James Walmsley). For more information consult LICENSING.TXT to obtain *
22 * a Commercial license. *
24 * See RESTRICTIONS.TXT for extra restrictions on the use of FullFAT. *
26 * Removing the above notice is illegal and will invalidate this license. *
27 *****************************************************************************
28 * See http://worm.me.uk/fullfat for more information. *
29 * Or http://fullfat.googlecode.com/ for latest releases and the wiki. *
30 *****************************************************************************/
33 * This file defines some portable types.
34 * You should change these as appropriate for your platform, as necessary.
41 #include "ff_config.h"
43 //---------------- BOOLEAN TYPES
44 typedef char FF_T_BOOL
; ///< This can be a char if your compiler isn't C99.
46 #define FF_TRUE 1 ///< 1 if bool not supported.
47 #define FF_FALSE 0 ///< 0 if bool not supported.
49 //---------------- 8 BIT INTEGERS
50 typedef char FF_T_INT8
; ///< 8 bit default integer.
51 typedef unsigned char FF_T_UINT8
; ///< 8 bit unsigned integer.
52 typedef signed char FF_T_SINT8
; ///< 8 bit signed integer.
54 //---------------- 16 BIT INTEGERS
55 typedef short FF_T_INT16
; ///< 16 bit default integer.
56 typedef unsigned short FF_T_UINT16
; ///< 16 bit unsigned integer.
57 typedef signed short FF_T_SINT16
; ///< 16 bit signed integer.
59 //---------------- 32 BIT INTEGERS
60 typedef long FF_T_INT32
; ///< 32 bit default integer.
61 typedef unsigned long FF_T_UINT32
; ///< 32 bit unsigned integer.
62 typedef signed long FF_T_SINT32
; ///< 32 bit signed integer.
64 #ifdef FF_64_NUM_SUPPORT
65 //---------------- 64 BIT INTEGERS // If you cannot define these, then make sure you see ff_config.h
66 typedef long long FF_T_INT64
; // about 64-bit number support.
67 typedef unsigned long long FF_T_UINT64
; // It means that FF_GetVolumeSize() cannot return a size
68 typedef signed long long FF_T_SINT64
; // > 4GB in bytes if you cannot support 64-bits integers.
69 // No other function makes use of 64-bit numbers.
72 typedef FF_T_SINT32 FF_ERROR
; ///< A special error code type to ease some inconsistencies in Error reporting.
74 #endif // end of include guard