summaryrefslogtreecommitdiff
path: root/lib/fatfs/integer.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-12-20 20:32:27 +0000
committerDamien George <damien.p.george@gmail.com>2014-12-27 17:36:16 +0000
commitc546b66bab04426a423af21eabb84de5707b29c4 (patch)
treedd8e2500bb654772522bbc27853792f92aecdcab /lib/fatfs/integer.h
parent83204f34067b765293b791563bdd5756bdfc5aa4 (diff)
lib/fatfs: Upgrade to new FatFs driver, put in lib/ for common use.
Patches to fatfs for our use will follow.
Diffstat (limited to 'lib/fatfs/integer.h')
-rw-r--r--lib/fatfs/integer.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/fatfs/integer.h b/lib/fatfs/integer.h
new file mode 100644
index 000000000..074a46bd5
--- /dev/null
+++ b/lib/fatfs/integer.h
@@ -0,0 +1,33 @@
+/*-------------------------------------------*/
+/* Integer type definitions for FatFs module */
+/*-------------------------------------------*/
+
+#ifndef _FF_INTEGER
+#define _FF_INTEGER
+
+#ifdef _WIN32 /* FatFs development platform */
+
+#include <windows.h>
+#include <tchar.h>
+
+#else /* Embedded platform */
+
+/* This type MUST be 8 bit */
+typedef unsigned char BYTE;
+
+/* These types MUST be 16 bit */
+typedef short SHORT;
+typedef unsigned short WORD;
+typedef unsigned short WCHAR;
+
+/* These types MUST be 16 bit or 32 bit */
+typedef int INT;
+typedef unsigned int UINT;
+
+/* These types MUST be 32 bit */
+typedef long LONG;
+typedef unsigned long DWORD;
+
+#endif
+
+#endif