Skip to content

Commit 661c47f

Browse files
committed
src: Remove need for integer.h, use stdint instead.
1 parent 71056e6 commit 661c47f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

src/diskio.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ extern "C" {
1212
#define _USE_WRITE 1 /* 1: Enable disk_write function */
1313
#define _USE_IOCTL 1 /* 1: Enable disk_ioctl fucntion */
1414

15-
#include "integer.h"
1615

1716

1817
/* Status of Disk Functions */

src/ff.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,24 @@
2323
extern "C" {
2424
#endif
2525

26-
#include "integer.h" /* Basic integer types */
26+
#include <stdint.h>
27+
28+
/* This type MUST be 8-bit */
29+
typedef uint8_t BYTE;
30+
31+
/* These types MUST be 16-bit */
32+
typedef int16_t SHORT;
33+
typedef uint16_t WORD;
34+
typedef uint16_t WCHAR;
35+
36+
/* These types MUST be 16-bit or 32-bit */
37+
typedef int INT;
38+
typedef unsigned int UINT;
39+
40+
/* These types MUST be 32-bit */
41+
typedef int32_t LONG;
42+
typedef uint32_t DWORD;
43+
2744
#include "ffconf.h" /* FatFs configuration options */
2845
#if _FATFS != _FFCONF
2946
#error Wrong configuration file (ffconf.h).

0 commit comments

Comments
 (0)