PokittoLib is the library needed for programming the Pokitto DIY game console (www.pokitto.com)

Dependents:   Sensitive

Fork of PokittoLib by Jonne Valola

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers diskio.h Source File

diskio.h

00001 /*-----------------------------------------------------------------------
00002 /  PFF - Low level disk interface modlue include file    (C)ChaN, 2009
00003 /-----------------------------------------------------------------------*/
00004 
00005 #ifndef _DISKIO
00006 
00007 #include "integer.h"
00008 
00009 /* Status of Disk Functions */
00010 typedef BYTE    DSTATUS;
00011 
00012 /* Results of Disk Functions */
00013 typedef enum {
00014     RES_OK = 0,        /* 0: Function succeeded */
00015     RES_ERROR,        /* 1: Disk error */
00016     RES_NOTRDY,        /* 2: Not ready */
00017     RES_PARERR        /* 3: Invalid parameter */
00018 } DRESULT;
00019 
00020 /*---------------------------------------*/
00021 /* Prototypes for disk control functions */
00022 
00023 DSTATUS disk_initialize (void);
00024 DRESULT disk_readp (BYTE*, DWORD, WORD, WORD);
00025 DRESULT disk_writep (const BYTE*, DWORD);
00026 
00027 #define STA_NOINIT        0x01    /* Drive not initialized */
00028 #define STA_NODISK        0x02    /* No medium in the drive */
00029 
00030 /* Card type flags (CardType) */
00031 #define CT_MMC                0x01    /* MMC ver 3 */
00032 #define CT_SD1                0x02    /* SD ver 1 */
00033 #define CT_SD2                0x04    /* SD ver 2 */
00034 #define CT_SDC                (CT_SD1|CT_SD2)    /* SD */
00035 #define CT_BLOCK            0x08    /* Block addressing */
00036 
00037 #define _DISKIO
00038 #endif
00039