PokittoLib with changes to lcd refresh etc.
Fork of Pokitto by
This is a fork by user @Spinal, and is used in Pokittris for testing. Do not import this to your own program.
libpff/diskio.h@0:e8b8f36b4505, 2017-09-18 (annotated)
- Committer:
- Pokitto
- Date:
- Mon Sep 18 11:47:51 2017 +0000
- Revision:
- 0:e8b8f36b4505
Initial;
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pokitto | 0:e8b8f36b4505 | 1 | /*----------------------------------------------------------------------- |
Pokitto | 0:e8b8f36b4505 | 2 | / PFF - Low level disk interface modlue include file (C)ChaN, 2009 |
Pokitto | 0:e8b8f36b4505 | 3 | /-----------------------------------------------------------------------*/ |
Pokitto | 0:e8b8f36b4505 | 4 | |
Pokitto | 0:e8b8f36b4505 | 5 | #ifndef _DISKIO |
Pokitto | 0:e8b8f36b4505 | 6 | |
Pokitto | 0:e8b8f36b4505 | 7 | #include "integer.h" |
Pokitto | 0:e8b8f36b4505 | 8 | |
Pokitto | 0:e8b8f36b4505 | 9 | /* Status of Disk Functions */ |
Pokitto | 0:e8b8f36b4505 | 10 | typedef BYTE DSTATUS; |
Pokitto | 0:e8b8f36b4505 | 11 | |
Pokitto | 0:e8b8f36b4505 | 12 | /* Results of Disk Functions */ |
Pokitto | 0:e8b8f36b4505 | 13 | typedef enum { |
Pokitto | 0:e8b8f36b4505 | 14 | RES_OK = 0, /* 0: Function succeeded */ |
Pokitto | 0:e8b8f36b4505 | 15 | RES_ERROR, /* 1: Disk error */ |
Pokitto | 0:e8b8f36b4505 | 16 | RES_NOTRDY, /* 2: Not ready */ |
Pokitto | 0:e8b8f36b4505 | 17 | RES_PARERR /* 3: Invalid parameter */ |
Pokitto | 0:e8b8f36b4505 | 18 | } DRESULT; |
Pokitto | 0:e8b8f36b4505 | 19 | |
Pokitto | 0:e8b8f36b4505 | 20 | /*---------------------------------------*/ |
Pokitto | 0:e8b8f36b4505 | 21 | /* Prototypes for disk control functions */ |
Pokitto | 0:e8b8f36b4505 | 22 | |
Pokitto | 0:e8b8f36b4505 | 23 | DSTATUS disk_initialize (void); |
Pokitto | 0:e8b8f36b4505 | 24 | DRESULT disk_readp (BYTE*, DWORD, WORD, WORD); |
Pokitto | 0:e8b8f36b4505 | 25 | DRESULT disk_writep (const BYTE*, DWORD); |
Pokitto | 0:e8b8f36b4505 | 26 | |
Pokitto | 0:e8b8f36b4505 | 27 | #define STA_NOINIT 0x01 /* Drive not initialized */ |
Pokitto | 0:e8b8f36b4505 | 28 | #define STA_NODISK 0x02 /* No medium in the drive */ |
Pokitto | 0:e8b8f36b4505 | 29 | |
Pokitto | 0:e8b8f36b4505 | 30 | /* Card type flags (CardType) */ |
Pokitto | 0:e8b8f36b4505 | 31 | #define CT_MMC 0x01 /* MMC ver 3 */ |
Pokitto | 0:e8b8f36b4505 | 32 | #define CT_SD1 0x02 /* SD ver 1 */ |
Pokitto | 0:e8b8f36b4505 | 33 | #define CT_SD2 0x04 /* SD ver 2 */ |
Pokitto | 0:e8b8f36b4505 | 34 | #define CT_SDC (CT_SD1|CT_SD2) /* SD */ |
Pokitto | 0:e8b8f36b4505 | 35 | #define CT_BLOCK 0x08 /* Block addressing */ |
Pokitto | 0:e8b8f36b4505 | 36 | |
Pokitto | 0:e8b8f36b4505 | 37 | #define _DISKIO |
Pokitto | 0:e8b8f36b4505 | 38 | #endif |
Pokitto | 0:e8b8f36b4505 | 39 |