test

Dependencies:   Nanopb iSerial mbed BaseJpegDecode FatFileSystem SDFileSystem RingBuffer Camera_LS_Y201

Committer:
cgraham
Date:
Thu Sep 18 15:21:47 2014 +0000
Revision:
0:d69efd0ee139
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cgraham 0:d69efd0ee139 1 /*-----------------------------------------------------------------------
cgraham 0:d69efd0ee139 2 / Low level disk interface modlue include file R0.06 (C)ChaN, 2007
cgraham 0:d69efd0ee139 3 /-----------------------------------------------------------------------*/
cgraham 0:d69efd0ee139 4
cgraham 0:d69efd0ee139 5 #ifndef _DISKIO
cgraham 0:d69efd0ee139 6
cgraham 0:d69efd0ee139 7 #define _READONLY 0 /* 1: Read-only mode */
cgraham 0:d69efd0ee139 8 #define _USE_IOCTL 1
cgraham 0:d69efd0ee139 9
cgraham 0:d69efd0ee139 10 #include "integer.h"
cgraham 0:d69efd0ee139 11
cgraham 0:d69efd0ee139 12 #ifdef __cplusplus
cgraham 0:d69efd0ee139 13 extern "C" {
cgraham 0:d69efd0ee139 14 #endif
cgraham 0:d69efd0ee139 15
cgraham 0:d69efd0ee139 16 /* Status of Disk Functions */
cgraham 0:d69efd0ee139 17 typedef BYTE DSTATUS;
cgraham 0:d69efd0ee139 18
cgraham 0:d69efd0ee139 19 /* Results of Disk Functions */
cgraham 0:d69efd0ee139 20 typedef enum {
cgraham 0:d69efd0ee139 21 RES_OK = 0, /* 0: Successful */
cgraham 0:d69efd0ee139 22 RES_ERROR, /* 1: R/W Error */
cgraham 0:d69efd0ee139 23 RES_WRPRT, /* 2: Write Protected */
cgraham 0:d69efd0ee139 24 RES_NOTRDY, /* 3: Not Ready */
cgraham 0:d69efd0ee139 25 RES_PARERR /* 4: Invalid Parameter */
cgraham 0:d69efd0ee139 26 } DRESULT;
cgraham 0:d69efd0ee139 27
cgraham 0:d69efd0ee139 28
cgraham 0:d69efd0ee139 29 /*---------------------------------------*/
cgraham 0:d69efd0ee139 30 /* Prototypes for disk control functions */
cgraham 0:d69efd0ee139 31
cgraham 0:d69efd0ee139 32 DSTATUS disk_initialize (BYTE);
cgraham 0:d69efd0ee139 33 DSTATUS disk_status (BYTE);
cgraham 0:d69efd0ee139 34 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
cgraham 0:d69efd0ee139 35 #if _READONLY == 0
cgraham 0:d69efd0ee139 36 DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
cgraham 0:d69efd0ee139 37 #endif
cgraham 0:d69efd0ee139 38 DRESULT disk_ioctl (BYTE, BYTE, void*);
cgraham 0:d69efd0ee139 39 void disk_timerproc (void);
cgraham 0:d69efd0ee139 40
cgraham 0:d69efd0ee139 41 #ifdef __cplusplus
cgraham 0:d69efd0ee139 42 };
cgraham 0:d69efd0ee139 43 #endif
cgraham 0:d69efd0ee139 44
cgraham 0:d69efd0ee139 45
cgraham 0:d69efd0ee139 46 /* Disk Status Bits (DSTATUS) */
cgraham 0:d69efd0ee139 47
cgraham 0:d69efd0ee139 48 #define STA_NOINIT 0x01 /* Drive not initialized */
cgraham 0:d69efd0ee139 49 #define STA_NODISK 0x02 /* No medium in the drive */
cgraham 0:d69efd0ee139 50 #define STA_PROTECT 0x04 /* Write protected */
cgraham 0:d69efd0ee139 51
cgraham 0:d69efd0ee139 52
cgraham 0:d69efd0ee139 53 /* Command code for disk_ioctrl() */
cgraham 0:d69efd0ee139 54
cgraham 0:d69efd0ee139 55 /* Generic command */
cgraham 0:d69efd0ee139 56 #define CTRL_SYNC 0 /* Mandatory for read/write configuration */
cgraham 0:d69efd0ee139 57 #define GET_SECTOR_COUNT 1 /* Mandatory for only f_mkfs() */
cgraham 0:d69efd0ee139 58 #define GET_SECTOR_SIZE 2
cgraham 0:d69efd0ee139 59 #define GET_BLOCK_SIZE 3 /* Mandatory for only f_mkfs() */
cgraham 0:d69efd0ee139 60 #define CTRL_POWER 4
cgraham 0:d69efd0ee139 61 #define CTRL_LOCK 5
cgraham 0:d69efd0ee139 62 #define CTRL_EJECT 6
cgraham 0:d69efd0ee139 63 /* MMC/SDC command */
cgraham 0:d69efd0ee139 64 #define MMC_GET_TYPE 10
cgraham 0:d69efd0ee139 65 #define MMC_GET_CSD 11
cgraham 0:d69efd0ee139 66 #define MMC_GET_CID 12
cgraham 0:d69efd0ee139 67 #define MMC_GET_OCR 13
cgraham 0:d69efd0ee139 68 #define MMC_GET_SDSTAT 14
cgraham 0:d69efd0ee139 69 /* ATA/CF command */
cgraham 0:d69efd0ee139 70 #define ATA_GET_REV 20
cgraham 0:d69efd0ee139 71 #define ATA_GET_MODEL 21
cgraham 0:d69efd0ee139 72 #define ATA_GET_SN 22
cgraham 0:d69efd0ee139 73
cgraham 0:d69efd0ee139 74
cgraham 0:d69efd0ee139 75 #define _DISKIO
cgraham 0:d69efd0ee139 76 #endif