Line buffer mode. sammple code with MIP8F_SPI_Ver40
Dependencies: MIP8F_SPI_Ver40 mbed
Dependents: MIP8f_FRDM_TransferMode_sample MIP8f_FRDM_Animation_sample
Introduction
Line buffer mode sample with MIP8F_SPI_Ver40 Display some color and monochrome bitmap.
Other information , please refer to https://os.mbed.com/teams/JapanDisplayInc/code/MIP8f_FRDM_sample/
Usage
Copy Setting File and Image to micro SD-CARD. (Same setting File and bitmap of MIP8f_FRDM_sample.)
a) Download the following file corresponding to the target panel, and rename file identifier (.bin -> .zip), and unzip the file on micro SD Card's root directory.
- LPM013M126x (176x176) :/media/uploads/JDI_Mbed_Team/sdcard_176x176.bin
- LPM027M128x (400x240) :/media/uploads/JDI_Mbed_Team/sdcard_400x240.bin
- LPM044M141x (640x480): /media/uploads/JDI_Mbed_Team/sdcard_640x480.bin
b) Insert micro SD-CARD to FRDM-K64F. c) Upload binary file to FRDM-K64F.and push Reset Button.
Other information
refer to Usage on https://os.mbed.com/teams/JapanDisplayInc/code/MIP8f_FRDM_sample/
this Sample Code (.bin)
/media/uploads/JDI_Mbed_Team/mip8f_frdm_linebuffer_sample.k64f.bin
SDFileSystem/FATFileSystem/ChaN/diskio.h@13:855affe061f7, 2018-11-06 (annotated)
- Committer:
- JDI_Mbed_Team
- Date:
- Tue Nov 06 03:57:02 2018 +0000
- Revision:
- 13:855affe061f7
- Parent:
- 0:33fe30a2b785
Line buffer mode. sample code with MIP8F_SPI_Ver40
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JDI_Mbed_Team | 0:33fe30a2b785 | 1 | /*-----------------------------------------------------------------------/ |
JDI_Mbed_Team | 0:33fe30a2b785 | 2 | / Low level disk interface modlue include file (C)ChaN, 2014 / |
JDI_Mbed_Team | 0:33fe30a2b785 | 3 | /-----------------------------------------------------------------------*/ |
JDI_Mbed_Team | 0:33fe30a2b785 | 4 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 5 | #ifndef _DISKIO_DEFINED |
JDI_Mbed_Team | 0:33fe30a2b785 | 6 | #define _DISKIO_DEFINED |
JDI_Mbed_Team | 0:33fe30a2b785 | 7 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 8 | #ifdef __cplusplus |
JDI_Mbed_Team | 0:33fe30a2b785 | 9 | extern "C" { |
JDI_Mbed_Team | 0:33fe30a2b785 | 10 | #endif |
JDI_Mbed_Team | 0:33fe30a2b785 | 11 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 12 | #define _USE_WRITE 1 /* 1: Enable disk_write function */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 13 | #define _USE_IOCTL 1 /* 1: Enable disk_ioctl fucntion */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 14 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 15 | #include "integer.h" |
JDI_Mbed_Team | 0:33fe30a2b785 | 16 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 17 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 18 | /* Status of Disk Functions */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 19 | typedef BYTE DSTATUS; |
JDI_Mbed_Team | 0:33fe30a2b785 | 20 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 21 | /* Results of Disk Functions */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 22 | typedef enum { |
JDI_Mbed_Team | 0:33fe30a2b785 | 23 | RES_OK = 0, /* 0: Successful */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 24 | RES_ERROR, /* 1: R/W Error */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 25 | RES_WRPRT, /* 2: Write Protected */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 26 | RES_NOTRDY, /* 3: Not Ready */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 27 | RES_PARERR /* 4: Invalid Parameter */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 28 | } DRESULT; |
JDI_Mbed_Team | 0:33fe30a2b785 | 29 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 30 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 31 | /*---------------------------------------*/ |
JDI_Mbed_Team | 0:33fe30a2b785 | 32 | /* Prototypes for disk control functions */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 33 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 34 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 35 | DSTATUS disk_initialize (BYTE pdrv); |
JDI_Mbed_Team | 0:33fe30a2b785 | 36 | DSTATUS disk_status (BYTE pdrv); |
JDI_Mbed_Team | 0:33fe30a2b785 | 37 | DRESULT disk_read (BYTE pdrv, BYTE* buff, DWORD sector, UINT count); |
JDI_Mbed_Team | 0:33fe30a2b785 | 38 | DRESULT disk_write (BYTE pdrv, const BYTE* buff, DWORD sector, UINT count); |
JDI_Mbed_Team | 0:33fe30a2b785 | 39 | DRESULT disk_ioctl (BYTE pdrv, BYTE cmd, void* buff); |
JDI_Mbed_Team | 0:33fe30a2b785 | 40 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 41 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 42 | /* Disk Status Bits (DSTATUS) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 43 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 44 | #define STA_NOINIT 0x01 /* Drive not initialized */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 45 | #define STA_NODISK 0x02 /* No medium in the drive */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 46 | #define STA_PROTECT 0x04 /* Write protected */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 47 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 48 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 49 | /* Command code for disk_ioctrl fucntion */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 50 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 51 | /* Generic command (Used by FatFs) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 52 | #define CTRL_SYNC 0 /* Complete pending write process (needed at _FS_READONLY == 0) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 53 | #define GET_SECTOR_COUNT 1 /* Get media size (needed at _USE_MKFS == 1) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 54 | #define GET_SECTOR_SIZE 2 /* Get sector size (needed at _MAX_SS != _MIN_SS) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 55 | #define GET_BLOCK_SIZE 3 /* Get erase block size (needed at _USE_MKFS == 1) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 56 | #define CTRL_TRIM 4 /* Inform device that the data on the block of sectors is no longer used (needed at _USE_TRIM == 1) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 57 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 58 | /* Generic command (Not used by FatFs) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 59 | #define CTRL_POWER 5 /* Get/Set power status */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 60 | #define CTRL_LOCK 6 /* Lock/Unlock media removal */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 61 | #define CTRL_EJECT 7 /* Eject media */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 62 | #define CTRL_FORMAT 8 /* Create physical format on the media */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 63 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 64 | /* MMC/SDC specific ioctl command */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 65 | #define MMC_GET_TYPE 10 /* Get card type */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 66 | #define MMC_GET_CSD 11 /* Get CSD */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 67 | #define MMC_GET_CID 12 /* Get CID */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 68 | #define MMC_GET_OCR 13 /* Get OCR */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 69 | #define MMC_GET_SDSTAT 14 /* Get SD status */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 70 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 71 | /* ATA/CF specific ioctl command */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 72 | #define ATA_GET_REV 20 /* Get F/W revision */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 73 | #define ATA_GET_MODEL 21 /* Get model name */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 74 | #define ATA_GET_SN 22 /* Get serial number */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 75 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 76 | #ifdef __cplusplus |
JDI_Mbed_Team | 0:33fe30a2b785 | 77 | } |
JDI_Mbed_Team | 0:33fe30a2b785 | 78 | #endif |
JDI_Mbed_Team | 0:33fe30a2b785 | 79 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 80 | #endif |