diff options
| author | Jack Humbert <jack.humb@gmail.com> | 2017-07-07 11:55:23 -0400 |
|---|---|---|
| committer | Jack Humbert <jack.humb@gmail.com> | 2017-07-07 11:55:23 -0400 |
| commit | 8655d4f4948b2deef7844503c8d690f23ac1a062 (patch) | |
| tree | b2c6effc9d6cd5b5b43933a1e53b8bf17e9e82cf /lib/lufa/Projects/TempDataLogger/Lib/FATFs/diskio.h | |
| parent | 1896c76a2928c96f9ab7947bec2ef8dd37623cff (diff) | |
| parent | 60b30c036397cb5627fa374bb930794b225daa29 (diff) | |
| download | qmk_firmware-8655d4f4948b2deef7844503c8d690f23ac1a062.tar.gz qmk_firmware-8655d4f4948b2deef7844503c8d690f23ac1a062.zip | |
Merge commit '60b30c036397cb5627fa374bb930794b225daa29' as 'lib/lufa'
Diffstat (limited to 'lib/lufa/Projects/TempDataLogger/Lib/FATFs/diskio.h')
| -rw-r--r-- | lib/lufa/Projects/TempDataLogger/Lib/FATFs/diskio.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/lufa/Projects/TempDataLogger/Lib/FATFs/diskio.h b/lib/lufa/Projects/TempDataLogger/Lib/FATFs/diskio.h new file mode 100644 index 000000000..d3c3149a5 --- /dev/null +++ b/lib/lufa/Projects/TempDataLogger/Lib/FATFs/diskio.h | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | /*----------------------------------------------------------------------- | ||
| 2 | / Low level disk interface module include file | ||
| 3 | /-----------------------------------------------------------------------*/ | ||
| 4 | |||
| 5 | #ifndef _DISKIO_DEFINED | ||
| 6 | #define _DISKIO_DEFINED | ||
| 7 | |||
| 8 | #ifdef __cplusplus | ||
| 9 | extern "C" { | ||
| 10 | #endif | ||
| 11 | |||
| 12 | #include "integer.h" | ||
| 13 | |||
| 14 | #include "../DataflashManager.h" | ||
| 15 | |||
| 16 | |||
| 17 | /* Status of Disk Functions */ | ||
| 18 | typedef BYTE DSTATUS; | ||
| 19 | |||
| 20 | /* Results of Disk Functions */ | ||
| 21 | typedef enum { | ||
| 22 | RES_OK = 0, /* 0: Successful */ | ||
| 23 | RES_ERROR, /* 1: R/W Error */ | ||
| 24 | RES_WRPRT, /* 2: Write Protected */ | ||
| 25 | RES_NOTRDY, /* 3: Not Ready */ | ||
| 26 | RES_PARERR /* 4: Invalid Parameter */ | ||
| 27 | } DRESULT; | ||
| 28 | |||
| 29 | |||
| 30 | /*---------------------------------------*/ | ||
| 31 | /* Prototypes for disk control functions */ | ||
| 32 | |||
| 33 | DSTATUS disk_initialize (BYTE); | ||
| 34 | DSTATUS disk_status (BYTE); | ||
| 35 | DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE); | ||
| 36 | #if _READONLY == 0 | ||
| 37 | DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE); | ||
| 38 | #endif | ||
| 39 | DRESULT disk_ioctl (BYTE, BYTE, void*); | ||
| 40 | |||
| 41 | |||
| 42 | /* Disk Status Bits (DSTATUS) */ | ||
| 43 | |||
| 44 | #define STA_NOINIT 0x01 /* Drive not initialized */ | ||
| 45 | #define STA_NODISK 0x02 /* No medium in the drive */ | ||
| 46 | #define STA_PROTECT 0x04 /* Write protected */ | ||
| 47 | |||
| 48 | /* Generic command */ | ||
| 49 | #define CTRL_SYNC 0 /* Mandatory for write functions */ | ||
| 50 | |||
| 51 | #ifdef __cplusplus | ||
| 52 | } | ||
| 53 | #endif | ||
| 54 | |||
| 55 | #endif | ||
