Bmag incl gps rettelse

Dependencies:   mbed WDT MODSERIAL BME280

Committer:
gert_lauritsen
Date:
Tue Jul 09 09:54:41 2019 +0000
Branch:
MbedBMAGThrRev
Revision:
64:06b9b8ffd5a6
Parent:
61:52a6d0ffd8e5
dataline version to 4 and fw til 1.0.0.7

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gert_lauritsen 61:52a6d0ffd8e5 1 /*-----------------------------------------------------------------------/
gert_lauritsen 61:52a6d0ffd8e5 2 / Low level disk interface modlue include file (C)ChaN, 2014 /
gert_lauritsen 61:52a6d0ffd8e5 3 /-----------------------------------------------------------------------*/
gert_lauritsen 61:52a6d0ffd8e5 4
gert_lauritsen 61:52a6d0ffd8e5 5 #ifndef _DISKIO_DEFINED
gert_lauritsen 61:52a6d0ffd8e5 6 #define _DISKIO_DEFINED
gert_lauritsen 61:52a6d0ffd8e5 7
gert_lauritsen 61:52a6d0ffd8e5 8 #ifdef __cplusplus
gert_lauritsen 61:52a6d0ffd8e5 9 extern "C" {
gert_lauritsen 61:52a6d0ffd8e5 10 #endif
gert_lauritsen 61:52a6d0ffd8e5 11
gert_lauritsen 61:52a6d0ffd8e5 12 #define _USE_WRITE 1 /* 1: Enable disk_write function */
gert_lauritsen 61:52a6d0ffd8e5 13 #define _USE_IOCTL 1 /* 1: Enable disk_ioctl fucntion */
gert_lauritsen 61:52a6d0ffd8e5 14
gert_lauritsen 61:52a6d0ffd8e5 15 #include "integer.h"
gert_lauritsen 61:52a6d0ffd8e5 16
gert_lauritsen 61:52a6d0ffd8e5 17
gert_lauritsen 61:52a6d0ffd8e5 18 /* Status of Disk Functions */
gert_lauritsen 61:52a6d0ffd8e5 19 typedef BYTE DSTATUS;
gert_lauritsen 61:52a6d0ffd8e5 20
gert_lauritsen 61:52a6d0ffd8e5 21 /* Results of Disk Functions */
gert_lauritsen 61:52a6d0ffd8e5 22 typedef enum {
gert_lauritsen 61:52a6d0ffd8e5 23 RES_OK = 0, /* 0: Successful */
gert_lauritsen 61:52a6d0ffd8e5 24 RES_ERROR, /* 1: R/W Error */
gert_lauritsen 61:52a6d0ffd8e5 25 RES_WRPRT, /* 2: Write Protected */
gert_lauritsen 61:52a6d0ffd8e5 26 RES_NOTRDY, /* 3: Not Ready */
gert_lauritsen 61:52a6d0ffd8e5 27 RES_PARERR /* 4: Invalid Parameter */
gert_lauritsen 61:52a6d0ffd8e5 28 } DRESULT;
gert_lauritsen 61:52a6d0ffd8e5 29
gert_lauritsen 61:52a6d0ffd8e5 30
gert_lauritsen 61:52a6d0ffd8e5 31 /*---------------------------------------*/
gert_lauritsen 61:52a6d0ffd8e5 32 /* Prototypes for disk control functions */
gert_lauritsen 61:52a6d0ffd8e5 33
gert_lauritsen 61:52a6d0ffd8e5 34
gert_lauritsen 61:52a6d0ffd8e5 35 DSTATUS disk_initialize (BYTE pdrv);
gert_lauritsen 61:52a6d0ffd8e5 36 DSTATUS disk_status (BYTE pdrv);
gert_lauritsen 61:52a6d0ffd8e5 37 DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count);
gert_lauritsen 61:52a6d0ffd8e5 38 DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count);
gert_lauritsen 61:52a6d0ffd8e5 39 DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff);
gert_lauritsen 61:52a6d0ffd8e5 40
gert_lauritsen 61:52a6d0ffd8e5 41
gert_lauritsen 61:52a6d0ffd8e5 42 /* Disk Status Bits (DSTATUS) */
gert_lauritsen 61:52a6d0ffd8e5 43
gert_lauritsen 61:52a6d0ffd8e5 44 #define STA_NOINIT 0x01 /* Drive not initialized */
gert_lauritsen 61:52a6d0ffd8e5 45 #define STA_NODISK 0x02 /* No medium in the drive */
gert_lauritsen 61:52a6d0ffd8e5 46 #define STA_PROTECT 0x04 /* Write protected */
gert_lauritsen 61:52a6d0ffd8e5 47
gert_lauritsen 61:52a6d0ffd8e5 48
gert_lauritsen 61:52a6d0ffd8e5 49 /* Command code for disk_ioctrl fucntion */
gert_lauritsen 61:52a6d0ffd8e5 50
gert_lauritsen 61:52a6d0ffd8e5 51 /* Generic command (Used by FatFs) */
gert_lauritsen 61:52a6d0ffd8e5 52 #define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */
gert_lauritsen 61:52a6d0ffd8e5 53 #define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */
gert_lauritsen 61:52a6d0ffd8e5 54 #define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */
gert_lauritsen 61:52a6d0ffd8e5 55 #define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */
gert_lauritsen 61:52a6d0ffd8e5 56 #define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */
gert_lauritsen 61:52a6d0ffd8e5 57
gert_lauritsen 61:52a6d0ffd8e5 58 /* Generic command (Not used by FatFs) */
gert_lauritsen 61:52a6d0ffd8e5 59 #define CTRL_POWER 5 /* Get/Set power status */
gert_lauritsen 61:52a6d0ffd8e5 60 #define CTRL_LOCK 6 /* Lock/Unlock media removal */
gert_lauritsen 61:52a6d0ffd8e5 61 #define CTRL_EJECT 7 /* Eject media */
gert_lauritsen 61:52a6d0ffd8e5 62 #define CTRL_FORMAT 8 /* Create physical format on the media */
gert_lauritsen 61:52a6d0ffd8e5 63
gert_lauritsen 61:52a6d0ffd8e5 64 /* MMC/SDC specific ioctl command */
gert_lauritsen 61:52a6d0ffd8e5 65 #define MMC_GET_TYPE 10 /* Get card type */
gert_lauritsen 61:52a6d0ffd8e5 66 #define MMC_GET_CSD 11 /* Get CSD */
gert_lauritsen 61:52a6d0ffd8e5 67 #define MMC_GET_CID 12 /* Get CID */
gert_lauritsen 61:52a6d0ffd8e5 68 #define MMC_GET_OCR 13 /* Get OCR */
gert_lauritsen 61:52a6d0ffd8e5 69 #define MMC_GET_SDSTAT 14 /* Get SD status */
gert_lauritsen 61:52a6d0ffd8e5 70
gert_lauritsen 61:52a6d0ffd8e5 71 /* ATA/CF specific ioctl command */
gert_lauritsen 61:52a6d0ffd8e5 72 #define ATA_GET_REV 20 /* Get F/W revision */
gert_lauritsen 61:52a6d0ffd8e5 73 #define ATA_GET_MODEL 21 /* Get model name */
gert_lauritsen 61:52a6d0ffd8e5 74 #define ATA_GET_SN 22 /* Get serial number */
gert_lauritsen 61:52a6d0ffd8e5 75
gert_lauritsen 61:52a6d0ffd8e5 76 #ifdef __cplusplus
gert_lauritsen 61:52a6d0ffd8e5 77 }
gert_lauritsen 61:52a6d0ffd8e5 78 #endif
gert_lauritsen 61:52a6d0ffd8e5 79
gert_lauritsen 61:52a6d0ffd8e5 80 #endif