![](/media/cache/group/JapanDisplayInc_logo.jpg.50x50_q85.jpg)
Renewal Sample code, SpeedMeter Demo with MIP8F_SPI_Ver50
Dependencies: mbed MIP8F_SPI_Ver50
Introduction
Renewal Version. Number charactors count up sample like a speed meter of a car with MIP8F_SPI_Ver50
Only for LPM027M128x (400x240) ,JDI DIsplay.
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. you can NOT use same sample color images of OTHER VERSION 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.
LPM027M128x (400x240) :/media/uploads/JDI_Mbed_Team/speedmeter2-400x240.bin
\SpeedMeter2-400x240 (SD card) (X:)
|-settings2.txt
|-SpeedMeter2-400x240
|- n00021 400x240 navi_mod2.bmp
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_countupnumber_sample2.k64f.bin
This sample Video
SDFileSystem/SDFileSystem.h@10:733bfa7cf111, 2018-11-19 (annotated)
- Committer:
- JDI_Mbed_Team
- Date:
- Mon Nov 19 04:45:11 2018 +0000
- Revision:
- 10:733bfa7cf111
- Parent:
- 0:33fe30a2b785
renewal sample code, SpeedMeter demo
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JDI_Mbed_Team | 0:33fe30a2b785 | 1 | /* SD/MMC File System Library |
JDI_Mbed_Team | 0:33fe30a2b785 | 2 | * Copyright (c) 2016 Neil Thiessen |
JDI_Mbed_Team | 0:33fe30a2b785 | 3 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 5 | * you may not use this file except in compliance with the License. |
JDI_Mbed_Team | 0:33fe30a2b785 | 6 | * You may obtain a copy of the License at |
JDI_Mbed_Team | 0:33fe30a2b785 | 7 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
JDI_Mbed_Team | 0:33fe30a2b785 | 9 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 10 | * Unless required by applicable law or agreed to in writing, software |
JDI_Mbed_Team | 0:33fe30a2b785 | 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
JDI_Mbed_Team | 0:33fe30a2b785 | 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
JDI_Mbed_Team | 0:33fe30a2b785 | 13 | * See the License for the specific language governing permissions and |
JDI_Mbed_Team | 0:33fe30a2b785 | 14 | * limitations under the License. |
JDI_Mbed_Team | 0:33fe30a2b785 | 15 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 16 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 17 | #ifndef SD_FILE_SYSTEM_H |
JDI_Mbed_Team | 0:33fe30a2b785 | 18 | #define SD_FILE_SYSTEM_H |
JDI_Mbed_Team | 0:33fe30a2b785 | 19 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 20 | #include "mbed.h" |
JDI_Mbed_Team | 0:33fe30a2b785 | 21 | #include "FATFileSystem.h" |
JDI_Mbed_Team | 0:33fe30a2b785 | 22 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 23 | /** SDFileSystem class. |
JDI_Mbed_Team | 0:33fe30a2b785 | 24 | * Used for creating a virtual file system for accessing SD/MMC cards via SPI. |
JDI_Mbed_Team | 0:33fe30a2b785 | 25 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 26 | * Example: |
JDI_Mbed_Team | 0:33fe30a2b785 | 27 | * @code |
JDI_Mbed_Team | 0:33fe30a2b785 | 28 | * #include "mbed.h" |
JDI_Mbed_Team | 0:33fe30a2b785 | 29 | * #include "SDFileSystem.h" |
JDI_Mbed_Team | 0:33fe30a2b785 | 30 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 31 | * //Create an SDFileSystem object |
JDI_Mbed_Team | 0:33fe30a2b785 | 32 | * SDFileSystem sd(p5, p6, p7, p20, "sd"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 33 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 34 | * int main() |
JDI_Mbed_Team | 0:33fe30a2b785 | 35 | * { |
JDI_Mbed_Team | 0:33fe30a2b785 | 36 | * //Mount the filesystem |
JDI_Mbed_Team | 0:33fe30a2b785 | 37 | * sd.mount(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 38 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 39 | * //Perform a write test |
JDI_Mbed_Team | 0:33fe30a2b785 | 40 | * printf("\nWriting to SD card..."); |
JDI_Mbed_Team | 0:33fe30a2b785 | 41 | * FILE *fp = fopen("/sd/sdtest.txt", "w"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 42 | * if (fp != NULL) { |
JDI_Mbed_Team | 0:33fe30a2b785 | 43 | * fprintf(fp, "We're writing to an SD card!"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 44 | * fclose(fp); |
JDI_Mbed_Team | 0:33fe30a2b785 | 45 | * printf("success!\n"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 46 | * } else { |
JDI_Mbed_Team | 0:33fe30a2b785 | 47 | * printf("failed!\n"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 48 | * } |
JDI_Mbed_Team | 0:33fe30a2b785 | 49 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 50 | * //Perform a read test |
JDI_Mbed_Team | 0:33fe30a2b785 | 51 | * printf("Reading from SD card..."); |
JDI_Mbed_Team | 0:33fe30a2b785 | 52 | * fp = fopen("/sd/sdtest.txt", "r"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 53 | * if (fp != NULL) { |
JDI_Mbed_Team | 0:33fe30a2b785 | 54 | * char c = fgetc(fp); |
JDI_Mbed_Team | 0:33fe30a2b785 | 55 | * if (c == 'W') |
JDI_Mbed_Team | 0:33fe30a2b785 | 56 | * printf("success!\n"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 57 | * else |
JDI_Mbed_Team | 0:33fe30a2b785 | 58 | * printf("incorrect char (%c)!\n", c); |
JDI_Mbed_Team | 0:33fe30a2b785 | 59 | * fclose(fp); |
JDI_Mbed_Team | 0:33fe30a2b785 | 60 | * } else { |
JDI_Mbed_Team | 0:33fe30a2b785 | 61 | * printf("failed!\n"); |
JDI_Mbed_Team | 0:33fe30a2b785 | 62 | * } |
JDI_Mbed_Team | 0:33fe30a2b785 | 63 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 64 | * //Unmount the filesystem |
JDI_Mbed_Team | 0:33fe30a2b785 | 65 | * sd.unmount(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 66 | * } |
JDI_Mbed_Team | 0:33fe30a2b785 | 67 | * @endcode |
JDI_Mbed_Team | 0:33fe30a2b785 | 68 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 69 | class SDFileSystem : public FATFileSystem |
JDI_Mbed_Team | 0:33fe30a2b785 | 70 | { |
JDI_Mbed_Team | 0:33fe30a2b785 | 71 | public: |
JDI_Mbed_Team | 0:33fe30a2b785 | 72 | /** Represents the different card detect switch types |
JDI_Mbed_Team | 0:33fe30a2b785 | 73 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 74 | enum SwitchType { |
JDI_Mbed_Team | 0:33fe30a2b785 | 75 | SWITCH_NONE, /**< No card detect switch (assumes socket is always occupied) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 76 | SWITCH_POS_NO, /**< Switch shorts to VDD when the socket is occupied (positive logic, normally open) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 77 | SWITCH_POS_NC, /**< Switch shorts to VDD when the socket is empty (positive logic, normally closed) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 78 | SWITCH_NEG_NO, /**< Switch shorts to GND when the socket is occupied (negative logic, normally open) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 79 | SWITCH_NEG_NC /**< Switch shorts to GND when the socket is empty (negative logic, normally closed) */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 80 | }; |
JDI_Mbed_Team | 0:33fe30a2b785 | 81 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 82 | /** Represents the different SD/MMC card types |
JDI_Mbed_Team | 0:33fe30a2b785 | 83 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 84 | enum CardType { |
JDI_Mbed_Team | 0:33fe30a2b785 | 85 | CARD_NONE, /**< No card is present */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 86 | CARD_MMC, /**< MMC card */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 87 | CARD_SD, /**< Standard capacity SD card */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 88 | CARD_SDHC, /**< High capacity SD card */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 89 | CARD_UNKNOWN /**< Unknown or unsupported card */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 90 | }; |
JDI_Mbed_Team | 0:33fe30a2b785 | 91 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 92 | /** Create a virtual file system for accessing SD/MMC cards via SPI |
JDI_Mbed_Team | 0:33fe30a2b785 | 93 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 94 | * @param mosi The SPI data out pin. |
JDI_Mbed_Team | 0:33fe30a2b785 | 95 | * @param miso The SPI data in pin. |
JDI_Mbed_Team | 0:33fe30a2b785 | 96 | * @param sclk The SPI clock pin. |
JDI_Mbed_Team | 0:33fe30a2b785 | 97 | * @param cs The SPI chip select pin. |
JDI_Mbed_Team | 0:33fe30a2b785 | 98 | * @param name The name used to access the virtual filesystem. |
JDI_Mbed_Team | 0:33fe30a2b785 | 99 | * @param cd The card detect pin. |
JDI_Mbed_Team | 0:33fe30a2b785 | 100 | * @param cdtype The type of card detect switch. |
JDI_Mbed_Team | 0:33fe30a2b785 | 101 | * @param hz The SPI bus frequency (defaults to 1MHz). |
JDI_Mbed_Team | 0:33fe30a2b785 | 102 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 103 | SDFileSystem(PinName mosi, PinName miso, PinName sclk, PinName cs, const char* name, PinName cd = NC, SwitchType cdtype = SWITCH_NONE, int hz = 1000000); |
JDI_Mbed_Team | 0:33fe30a2b785 | 104 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 105 | /** Determine whether or not a card is present |
JDI_Mbed_Team | 0:33fe30a2b785 | 106 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 107 | * @returns |
JDI_Mbed_Team | 0:33fe30a2b785 | 108 | * 'true' if a card is present, |
JDI_Mbed_Team | 0:33fe30a2b785 | 109 | * 'false' if no card is present. |
JDI_Mbed_Team | 0:33fe30a2b785 | 110 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 111 | bool card_present(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 112 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 113 | /** Get the detected SD/MMC card type |
JDI_Mbed_Team | 0:33fe30a2b785 | 114 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 115 | * @returns The detected card type as a CardType enum. |
JDI_Mbed_Team | 0:33fe30a2b785 | 116 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 117 | * @note Valid after the filesystem has been mounted. |
JDI_Mbed_Team | 0:33fe30a2b785 | 118 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 119 | SDFileSystem::CardType card_type(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 120 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 121 | /** Get whether or not CRC is enabled for commands and data |
JDI_Mbed_Team | 0:33fe30a2b785 | 122 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 123 | * @returns |
JDI_Mbed_Team | 0:33fe30a2b785 | 124 | * 'true' if CRC is enabled for commands and data, |
JDI_Mbed_Team | 0:33fe30a2b785 | 125 | * 'false' if CRC is disabled for commands and data. |
JDI_Mbed_Team | 0:33fe30a2b785 | 126 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 127 | bool crc(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 128 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 129 | /** Set whether or not CRC is enabled for commands and data |
JDI_Mbed_Team | 0:33fe30a2b785 | 130 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 131 | * @param enabled Whether or not to enable CRC for commands and data. |
JDI_Mbed_Team | 0:33fe30a2b785 | 132 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 133 | void crc(bool enabled); |
JDI_Mbed_Team | 0:33fe30a2b785 | 134 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 135 | /** Get whether or not 16-bit frames are enabled for data read/write operations |
JDI_Mbed_Team | 0:33fe30a2b785 | 136 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 137 | * @returns |
JDI_Mbed_Team | 0:33fe30a2b785 | 138 | * 'true' if 16-bit frames will be used during data read/write operations, |
JDI_Mbed_Team | 0:33fe30a2b785 | 139 | * 'false' if 8-bit frames will be used during data read/write operations. |
JDI_Mbed_Team | 0:33fe30a2b785 | 140 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 141 | bool large_frames(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 142 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 143 | /** Set whether or not 16-bit frames are enabled for data read/write operations |
JDI_Mbed_Team | 0:33fe30a2b785 | 144 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 145 | * @param enabled Whether or not 16-bit frames are enabled for data read/write operations. |
JDI_Mbed_Team | 0:33fe30a2b785 | 146 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 147 | void large_frames(bool enabled); |
JDI_Mbed_Team | 0:33fe30a2b785 | 148 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 149 | /** Get whether or not write validation is enabled for data write operations |
JDI_Mbed_Team | 0:33fe30a2b785 | 150 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 151 | * @returns |
JDI_Mbed_Team | 0:33fe30a2b785 | 152 | * 'true' if data writes will be verified using CMD13, |
JDI_Mbed_Team | 0:33fe30a2b785 | 153 | * 'false' if data writes will not be verified. |
JDI_Mbed_Team | 0:33fe30a2b785 | 154 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 155 | bool write_validation(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 156 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 157 | /** Set whether or not write validation is enabled for data write operations |
JDI_Mbed_Team | 0:33fe30a2b785 | 158 | * |
JDI_Mbed_Team | 0:33fe30a2b785 | 159 | * @param enabled Whether or not write validation is enabled for data write operations. |
JDI_Mbed_Team | 0:33fe30a2b785 | 160 | */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 161 | void write_validation(bool enabled); |
JDI_Mbed_Team | 0:33fe30a2b785 | 162 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 163 | virtual int unmount(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 164 | virtual int disk_initialize(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 165 | virtual int disk_status(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 166 | virtual int disk_read(uint8_t* buffer, uint32_t sector, uint32_t count); |
JDI_Mbed_Team | 0:33fe30a2b785 | 167 | virtual int disk_write(const uint8_t* buffer, uint32_t sector, uint32_t count); |
JDI_Mbed_Team | 0:33fe30a2b785 | 168 | virtual int disk_sync(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 169 | virtual uint32_t disk_sectors(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 170 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 171 | private: |
JDI_Mbed_Team | 0:33fe30a2b785 | 172 | //Commands |
JDI_Mbed_Team | 0:33fe30a2b785 | 173 | enum Command { |
JDI_Mbed_Team | 0:33fe30a2b785 | 174 | CMD0 = (0x40 | 0), /**< GO_IDLE_STATE */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 175 | CMD1 = (0x40 | 1), /**< SEND_OP_COND */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 176 | CMD6 = (0x40 | 6), /**< SWITCH_FUNC */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 177 | CMD8 = (0x40 | 8), /**< SEND_IF_COND */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 178 | CMD9 = (0x40 | 9), /**< SEND_CSD */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 179 | CMD12 = (0x40 | 12), /**< STOP_TRANSMISSION */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 180 | CMD13 = (0x40 | 13), /**< SEND_STATUS */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 181 | CMD16 = (0x40 | 16), /**< SET_BLOCKLEN */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 182 | CMD17 = (0x40 | 17), /**< READ_SINGLE_BLOCK */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 183 | CMD18 = (0x40 | 18), /**< READ_MULTIPLE_BLOCK */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 184 | ACMD22 = (0x40 | 22), /**< SEND_NUM_WR_BLOCKS */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 185 | ACMD23 = (0x40 | 23), /**< SET_WR_BLK_ERASE_COUNT */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 186 | CMD24 = (0x40 | 24), /**< WRITE_BLOCK */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 187 | CMD25 = (0x40 | 25), /**< WRITE_MULTIPLE_BLOCK */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 188 | ACMD41 = (0x40 | 41), /**< SD_SEND_OP_COND */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 189 | ACMD42 = (0x40 | 42), /**< SET_CLR_CARD_DETECT */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 190 | CMD55 = (0x40 | 55), /**< APP_CMD */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 191 | CMD58 = (0x40 | 58), /**< READ_OCR */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 192 | CMD59 = (0x40 | 59) /**< CRC_ON_OFF */ |
JDI_Mbed_Team | 0:33fe30a2b785 | 193 | }; |
JDI_Mbed_Team | 0:33fe30a2b785 | 194 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 195 | //Member variables |
JDI_Mbed_Team | 0:33fe30a2b785 | 196 | Timer m_Timer; |
JDI_Mbed_Team | 0:33fe30a2b785 | 197 | SPI m_Spi; |
JDI_Mbed_Team | 0:33fe30a2b785 | 198 | DigitalOut m_Cs; |
JDI_Mbed_Team | 0:33fe30a2b785 | 199 | InterruptIn m_Cd; |
JDI_Mbed_Team | 0:33fe30a2b785 | 200 | int m_CdAssert; |
JDI_Mbed_Team | 0:33fe30a2b785 | 201 | const int m_FREQ; |
JDI_Mbed_Team | 0:33fe30a2b785 | 202 | SDFileSystem::CardType m_CardType; |
JDI_Mbed_Team | 0:33fe30a2b785 | 203 | bool m_Crc; |
JDI_Mbed_Team | 0:33fe30a2b785 | 204 | bool m_LargeFrames; |
JDI_Mbed_Team | 0:33fe30a2b785 | 205 | bool m_WriteValidation; |
JDI_Mbed_Team | 0:33fe30a2b785 | 206 | int m_Status; |
JDI_Mbed_Team | 0:33fe30a2b785 | 207 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 208 | //Internal methods |
JDI_Mbed_Team | 0:33fe30a2b785 | 209 | void onCardRemoval(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 210 | void checkSocket(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 211 | bool waitReady(int timeout); |
JDI_Mbed_Team | 0:33fe30a2b785 | 212 | bool select(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 213 | void deselect(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 214 | char commandTransaction(char cmd, unsigned int arg, unsigned int* resp = NULL); |
JDI_Mbed_Team | 0:33fe30a2b785 | 215 | char writeCommand(char cmd, unsigned int arg, unsigned int* resp = NULL); |
JDI_Mbed_Team | 0:33fe30a2b785 | 216 | bool readData(char* buffer, int length); |
JDI_Mbed_Team | 0:33fe30a2b785 | 217 | char writeData(const char* buffer, char token); |
JDI_Mbed_Team | 0:33fe30a2b785 | 218 | bool readBlock(char* buffer, unsigned int lba); |
JDI_Mbed_Team | 0:33fe30a2b785 | 219 | bool readBlocks(char* buffer, unsigned int lba, unsigned int count); |
JDI_Mbed_Team | 0:33fe30a2b785 | 220 | bool writeBlock(const char* buffer, unsigned int lba); |
JDI_Mbed_Team | 0:33fe30a2b785 | 221 | bool writeBlocks(const char* buffer, unsigned int lba, unsigned int count); |
JDI_Mbed_Team | 0:33fe30a2b785 | 222 | bool enableHighSpeedMode(); |
JDI_Mbed_Team | 0:33fe30a2b785 | 223 | }; |
JDI_Mbed_Team | 0:33fe30a2b785 | 224 | |
JDI_Mbed_Team | 0:33fe30a2b785 | 225 | #endif |