JEK changes enabling proper recording of IMU/GPS datastrams - 02-APR-2013

Dependencies:   mbed

Fork of GPS_Incremental by Dan Matthews

Committer:
jekain314
Date:
Fri Apr 19 16:21:27 2013 +0000
Revision:
9:b45feb91ba38
Parent:
0:c746ee34feae
update to allow better imu gps data collection

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dannyman939 0:c746ee34feae 1 /*-----------------------------------------------------------------------
dannyman939 0:c746ee34feae 2 / Low level disk interface modlue include file
dannyman939 0:c746ee34feae 3 /-----------------------------------------------------------------------*/
dannyman939 0:c746ee34feae 4
dannyman939 0:c746ee34feae 5 #ifndef _DISKIO
dannyman939 0:c746ee34feae 6
dannyman939 0:c746ee34feae 7 #define _READONLY 0 /* 1: Remove write functions */
dannyman939 0:c746ee34feae 8 #define _USE_IOCTL 1 /* 1: Use disk_ioctl fucntion */
dannyman939 0:c746ee34feae 9
dannyman939 0:c746ee34feae 10 #include "integer.h"
dannyman939 0:c746ee34feae 11
dannyman939 0:c746ee34feae 12
dannyman939 0:c746ee34feae 13 /* Status of Disk Functions */
dannyman939 0:c746ee34feae 14 typedef BYTE DSTATUS;
dannyman939 0:c746ee34feae 15
dannyman939 0:c746ee34feae 16 /* Results of Disk Functions */
dannyman939 0:c746ee34feae 17 typedef enum {
dannyman939 0:c746ee34feae 18 RES_OK = 0, /* 0: Successful */
dannyman939 0:c746ee34feae 19 RES_ERROR, /* 1: R/W Error */
dannyman939 0:c746ee34feae 20 RES_WRPRT, /* 2: Write Protected */
dannyman939 0:c746ee34feae 21 RES_NOTRDY, /* 3: Not Ready */
dannyman939 0:c746ee34feae 22 RES_PARERR /* 4: Invalid Parameter */
dannyman939 0:c746ee34feae 23 } DRESULT;
dannyman939 0:c746ee34feae 24
dannyman939 0:c746ee34feae 25
dannyman939 0:c746ee34feae 26 /*---------------------------------------*/
dannyman939 0:c746ee34feae 27 /* Prototypes for disk control functions */
dannyman939 0:c746ee34feae 28
dannyman939 0:c746ee34feae 29 int assign_drives (int, int);
dannyman939 0:c746ee34feae 30 DSTATUS disk_initialize (BYTE);
dannyman939 0:c746ee34feae 31 DSTATUS disk_status (BYTE);
dannyman939 0:c746ee34feae 32 DRESULT disk_read (BYTE, BYTE*, DWORD, BYTE);
dannyman939 0:c746ee34feae 33 #if _READONLY == 0
dannyman939 0:c746ee34feae 34 DRESULT disk_write (BYTE, const BYTE*, DWORD, BYTE);
dannyman939 0:c746ee34feae 35 #endif
dannyman939 0:c746ee34feae 36 DRESULT disk_ioctl (BYTE, BYTE, void*);
dannyman939 0:c746ee34feae 37
dannyman939 0:c746ee34feae 38
dannyman939 0:c746ee34feae 39
dannyman939 0:c746ee34feae 40 /* Disk Status Bits (DSTATUS) */
dannyman939 0:c746ee34feae 41
dannyman939 0:c746ee34feae 42 #define STA_NOINIT 0x01 /* Drive not initialized */
dannyman939 0:c746ee34feae 43 #define STA_NODISK 0x02 /* No medium in the drive */
dannyman939 0:c746ee34feae 44 #define STA_PROTECT 0x04 /* Write protected */
dannyman939 0:c746ee34feae 45
dannyman939 0:c746ee34feae 46
dannyman939 0:c746ee34feae 47 /* Command code for disk_ioctrl fucntion */
dannyman939 0:c746ee34feae 48
dannyman939 0:c746ee34feae 49 /* Generic command (defined for FatFs) */
dannyman939 0:c746ee34feae 50 #define CTRL_SYNC 0 /* Flush disk cache (for write functions) */
dannyman939 0:c746ee34feae 51 #define GET_SECTOR_COUNT 1 /* Get media size (for only f_mkfs()) */
dannyman939 0:c746ee34feae 52 #define GET_SECTOR_SIZE 2 /* Get sector size (for multiple sector size (_MAX_SS >= 1024)) */
dannyman939 0:c746ee34feae 53 #define GET_BLOCK_SIZE 3 /* Get erase block size (for only f_mkfs()) */
dannyman939 0:c746ee34feae 54 #define CTRL_ERASE_SECTOR 4 /* Force erased a block of sectors (for only _USE_ERASE) */
dannyman939 0:c746ee34feae 55
dannyman939 0:c746ee34feae 56 /* Generic command */
dannyman939 0:c746ee34feae 57 #define CTRL_POWER 5 /* Get/Set power status */
dannyman939 0:c746ee34feae 58 #define CTRL_LOCK 6 /* Lock/Unlock media removal */
dannyman939 0:c746ee34feae 59 #define CTRL_EJECT 7 /* Eject media */
dannyman939 0:c746ee34feae 60
dannyman939 0:c746ee34feae 61 /* MMC/SDC specific ioctl command */
dannyman939 0:c746ee34feae 62 #define MMC_GET_TYPE 10 /* Get card type */
dannyman939 0:c746ee34feae 63 #define MMC_GET_CSD 11 /* Get CSD */
dannyman939 0:c746ee34feae 64 #define MMC_GET_CID 12 /* Get CID */
dannyman939 0:c746ee34feae 65 #define MMC_GET_OCR 13 /* Get OCR */
dannyman939 0:c746ee34feae 66 #define MMC_GET_SDSTAT 14 /* Get SD status */
dannyman939 0:c746ee34feae 67
dannyman939 0:c746ee34feae 68 /* ATA/CF specific ioctl command */
dannyman939 0:c746ee34feae 69 #define ATA_GET_REV 20 /* Get F/W revision */
dannyman939 0:c746ee34feae 70 #define ATA_GET_MODEL 21 /* Get model name */
dannyman939 0:c746ee34feae 71 #define ATA_GET_SN 22 /* Get serial number */
dannyman939 0:c746ee34feae 72
dannyman939 0:c746ee34feae 73 /* NAND specific ioctl command */
dannyman939 0:c746ee34feae 74 #define NAND_FORMAT 30 /* Create physical format */
dannyman939 0:c746ee34feae 75
dannyman939 0:c746ee34feae 76
dannyman939 0:c746ee34feae 77 #define _DISKIO
dannyman939 0:c746ee34feae 78 #endif