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

Dependents:   YATTT sd_map_test cPong SnowDemo ... more

PokittoLib

Library for programming Pokitto hardware

How to Use

  1. Import this library to online compiler (see button "import" on the right hand side
  2. DO NOT import mbed-src anymore, a better version is now included inside PokittoLib
  3. Change My_settings.h according to your project
  4. Start coding!
Committer:
Pokitto
Date:
Mon Sep 18 11:47:51 2017 +0000
Revision:
0:e8b8f36b4505
Initial;

Who changed what in which revision?

UserRevisionLine numberNew 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