Arduino FatFS
src
driver
sdcommon.h
1
#pragma once
2
3
/* MMC/SD command */
4
#define CMD0 (0)
/* GO_IDLE_STATE */
5
#define CMD1 (1)
/* SEND_OP_COND (MMC) */
6
#define ACMD41 (0x80 + 41)
/* SEND_OP_COND (SDC) */
7
#define CMD8 (8)
/* SEND_IF_COND */
8
#define CMD9 (9)
/* SEND_CSD */
9
#define CMD10 (10)
/* SEND_CID */
10
#define CMD12 (12)
/* STOP_TRANSMISSION */
11
#define ACMD13 (0x80 + 13)
/* SD_STATUS (SDC) */
12
#define CMD16 (16)
/* SET_BLOCKLEN */
13
#define CMD17 (17)
/* READ_SINGLE_BLOCK */
14
#define CMD18 (18)
/* READ_MULTIPLE_BLOCK */
15
#define CMD23 (23)
/* SET_BLOCK_COUNT (MMC) */
16
#define ACMD23 (0x80 + 23)
/* SET_WR_BLK_ERASE_COUNT (SDC) */
17
#define CMD24 (24)
/* WRITE_BLOCK */
18
#define CMD25 (25)
/* WRITE_MULTIPLE_BLOCK */
19
#define CMD32 (32)
/* ERASE_ER_BLK_START */
20
#define CMD33 (33)
/* ERASE_ER_BLK_END */
21
#define CMD38 (38)
/* ERASE */
22
#define CMD55 (55)
/* APP_CMD */
23
#define CMD58 (58)
/* READ_OCR */
24
25
/* MMC card type flags (MMC_GET_TYPE) */
26
#define CT_MMC 0x01
/* MMC ver 3 */
27
#define CT_SD1 0x02
/* SD ver 1 */
28
#define CT_SD2 0x04
/* SD ver 2 */
29
#define CT_SDC (CT_SD1|CT_SD2)
/* SD */
30
#define CT_BLOCK 0x08
/* Block addressing */
31
32
/* MMC card type flags (MMC_GET_TYPE) */
33
#define CT_MMC3 0x01
/* MMC ver 3 */
34
#define CT_MMC4 0x02
/* MMC ver 4+ */
35
//#define CT_MMC 0x03 /* MMC */
36
#define CT_SDC1 0x04
/* SD ver 1 */
37
#define CT_SDC2 0x08
/* SD ver 2+ */
38
//#define CT_SDC 0x0C /* SD */
39
//#define CT_BLOCK 0x10 /* Block addressing */
40
41
Generated by
1.9.1