| NANO100_BSP V3.05.000 The Board Support Package for Nano100BN Series

Modules | Data Structures | Macros
SDCARD Library Exported Constants
NANO100 Library » SDCARD Library
Collaboration diagram for SDCARD Library Exported Constants:

## Modules
| SDCARD Library Exported Structs

## Data Structures
union | UINT32
union | UINT16

## Macros
#define | DBG_PRINTF(...)
#define | PHYSICAL_BLOCK_SIZE 512
#define | EMPTY 0
#define | YES 1
#define | NO 0
#define | CMD 0
#define | RD 1
#define | WR 2
#define | RDB 3
#define | WDB 4
#define | R1 0
#define | R1b 1
#define | R2 2
#define | R3 3
#define | R7 4
#define | START_SBR 0xFE
#define | START_MBR 0xFE
#define | START_SBW 0xFE
#define | START_MBW 0xFC
#define | STOP_MBW 0xFD
#define | DATA_RESP_MASK 0x11
#define | BUSY_BIT 0x80
#define | BACK_FROM_ERROR { SingleWrite(0xFF); SPI_SET_SS0_HIGH(SPI1); return FALSE;}
#define | SD_SUCCESS (0)
#define | SD_FAIL (1)
#define | SDv1 1<<1
#define | SDv2 1<<2
#define | MMCv3 1<<3
#define | SDBlock 1<<4
#define | GO_IDLE_STATE 0
#define | SEND_OP_COND 1
#define | SEND_IF_COND 2
#define | SEND_CSD 3
#define | SEND_CID 4
#define | STOP_TRANSMISSION 5
#define | SEND_STATUS 6
#define | SET_BLOCKLEN 7
#define | READ_SINGLE_BLOCK 8
#define | READ_MULTIPLE_BLOCK 9
#define | SET_BLOCK_COUNT 10
#define | WRITE_BLOCK 11
#define | WRITE_MULTIPLE_BLOCK 12
#define | PROGRAM_CSD 13
#define | SET_WRITE_PROT 14
#define | CLR_WRITE_PROT 15
#define | SEND_WRITE_PROT 16
#define | TAG_SECTOR_START 17
#define | TAG_SECTOR_END 18
#define | UNTAG_SECTOR 19
#define | TAG_ERASE_GROUP_START 20
#define | TAG_ERASE_GROUP_END 21
#define | UNTAG_ERASE_GROUP 22
#define | ERASE 23
#define | LOCK_UNLOCK 24
#define | APP_CMD 25
#define | READ_OCR 26
#define | CRC_ON_OFF 27
#define | SD_SEND_STATUS 28
#define | SD_SET_WR_BLK_ERASE_COUNT 29
#define | SD_SEND_OP_COND 30

## Detailed Description

## Macro Definition Documentation

## ◆ APP_CMD

#define APP_CMD 25

CMD55

Definition at line 120 of file SDCard.h.

## ◆ BACK_FROM_ERROR

#define BACK_FROM_ERROR { SingleWrite(0xFF); SPI_SET_SS0_HIGH(SPI1); return FALSE;}

macro for SPI write

Definition at line 70 of file SDCard.h.

## ◆ BUSY_BIT

#define BUSY_BIT 0x80

BUSY_BIT mask

Definition at line 68 of file SDCard.h.

## ◆ CLR_WRITE_PROT

#define CLR_WRITE_PROT 15

CMD29

Definition at line 110 of file SDCard.h.

## ◆ CMD

#define CMD 0

Command value definitions: CMD

Definition at line 45 of file SDCard.h.

## ◆ CRC_ON_OFF

#define CRC_ON_OFF 27

CMD59

Definition at line 122 of file SDCard.h.

## ◆ DATA_RESP_MASK

#define DATA_RESP_MASK 0x11

DATA_RESP_MASK mask

Definition at line 65 of file SDCard.h.

## ◆ DBG_PRINTF

#define DBG_PRINTF | ( |  | ... | ) |

Debug printf option, Off

Definition at line 34 of file SDCard.h.

## ◆ EMPTY

#define EMPTY 0

Command value definitions: EMPTY

Definition at line 42 of file SDCard.h.

## ◆ ERASE

#define ERASE 23

CMD38

Definition at line 118 of file SDCard.h.

## ◆ GO_IDLE_STATE

#define GO_IDLE_STATE 0

CMD0

Definition at line 95 of file SDCard.h.

## ◆ LOCK_UNLOCK

#define LOCK_UNLOCK 24

CMD42

Definition at line 119 of file SDCard.h.

## ◆ MMCv3

#define MMCv3 1<<3

Command table index MMCv3

Definition at line 92 of file SDCard.h.

## ◆ NO

#define NO 0

Command value definitions: NO

Definition at line 44 of file SDCard.h.

## ◆ PHYSICAL_BLOCK_SIZE

#define PHYSICAL_BLOCK_SIZE 512

512 Erase group size = 16 MMC FLASH sectors

Definition at line 37 of file SDCard.h.

## ◆ PROGRAM_CSD

#define PROGRAM_CSD 13

CMD27

Definition at line 108 of file SDCard.h.

## ◆ R1

#define R1 0

Command value definitions: R1

Definition at line 50 of file SDCard.h.

## ◆ R1b

#define R1b 1

Command value definitions: R1b

Definition at line 51 of file SDCard.h.

## ◆ R2

#define R2 2

Command value definitions: R2

Definition at line 52 of file SDCard.h.

## ◆ R3

#define R3 3

Command value definitions: R3

Definition at line 53 of file SDCard.h.

## ◆ R7

#define R7 4

Command value definitions: R7

Definition at line 54 of file SDCard.h.

## ◆ RD

#define RD 1

Command value definitions: RD

Definition at line 46 of file SDCard.h.

## ◆ RDB

#define RDB 3

Command value definitions: RDB

Definition at line 48 of file SDCard.h.

## ◆ READ_MULTIPLE_BLOCK

#define READ_MULTIPLE_BLOCK 9

CMD18

Definition at line 104 of file SDCard.h.

## ◆ READ_OCR

#define READ_OCR 26

CMD58

Definition at line 121 of file SDCard.h.

## ◆ READ_SINGLE_BLOCK

#define READ_SINGLE_BLOCK 8

CMD17

Definition at line 103 of file SDCard.h.

## ◆ SD_FAIL

#define SD_FAIL (1)

fail

Definition at line 84 of file SDCard.h.

## ◆ SD_SEND_OP_COND

#define SD_SEND_OP_COND 30

ACMD41

Definition at line 125 of file SDCard.h.

## ◆ SD_SEND_STATUS

#define SD_SEND_STATUS 28

ACMD13

Definition at line 123 of file SDCard.h.

## ◆ SD_SET_WR_BLK_ERASE_COUNT

#define SD_SET_WR_BLK_ERASE_COUNT 29

ACMD23

Definition at line 124 of file SDCard.h.

## ◆ SD_SUCCESS

#define SD_SUCCESS (0)

success

Definition at line 83 of file SDCard.h.

## ◆ SDBlock

#define SDBlock 1<<4

Command table index SDBlock

Definition at line 93 of file SDCard.h.

## ◆ SDv1

#define SDv1 1<<1

Command table index SDv1

Definition at line 90 of file SDCard.h.

## ◆ SDv2

#define SDv2 1<<2

Command table index SDv2

Definition at line 91 of file SDCard.h.

## ◆ SEND_CID

#define SEND_CID 4

CMD10

Definition at line 99 of file SDCard.h.

## ◆ SEND_CSD

#define SEND_CSD 3

CMD9

Definition at line 98 of file SDCard.h.

## ◆ SEND_IF_COND

#define SEND_IF_COND 2

CMD8

Definition at line 97 of file SDCard.h.

## ◆ SEND_OP_COND

#define SEND_OP_COND 1

CMD1

Definition at line 96 of file SDCard.h.

## ◆ SEND_STATUS

#define SEND_STATUS 6

CMD13

Definition at line 101 of file SDCard.h.

## ◆ SEND_WRITE_PROT

#define SEND_WRITE_PROT 16

CMD30

Definition at line 111 of file SDCard.h.

## ◆ SET_BLOCK_COUNT

#define SET_BLOCK_COUNT 10

CMD23

Definition at line 105 of file SDCard.h.

## ◆ SET_BLOCKLEN

#define SET_BLOCKLEN 7

CMD16

Definition at line 102 of file SDCard.h.

## ◆ SET_WRITE_PROT

#define SET_WRITE_PROT 14

CMD28

Definition at line 109 of file SDCard.h.

## ◆ START_MBR

#define START_MBR 0xFE

START_MBR token

Definition at line 59 of file SDCard.h.

## ◆ START_MBW

#define START_MBW 0xFC

START_MBW token

Definition at line 61 of file SDCard.h.

## ◆ START_SBR

#define START_SBR 0xFE

START_SBR token

Definition at line 58 of file SDCard.h.

## ◆ START_SBW

#define START_SBW 0xFE

START_SBW token

Definition at line 60 of file SDCard.h.

## ◆ STOP_MBW

#define STOP_MBW 0xFD

STOP_SBR token

Definition at line 62 of file SDCard.h.

## ◆ STOP_TRANSMISSION

#define STOP_TRANSMISSION 5

CMD12

Definition at line 100 of file SDCard.h.

## ◆ TAG_ERASE_GROUP_END

#define TAG_ERASE_GROUP_END 21

CMD36

Definition at line 116 of file SDCard.h.

## ◆ TAG_ERASE_GROUP_START

#define TAG_ERASE_GROUP_START 20

CMD35

Definition at line 115 of file SDCard.h.

## ◆ TAG_SECTOR_END

#define TAG_SECTOR_END 18

CMD33

Definition at line 113 of file SDCard.h.

## ◆ TAG_SECTOR_START

#define TAG_SECTOR_START 17

CMD32

Definition at line 112 of file SDCard.h.

## ◆ UNTAG_ERASE_GROUP

#define UNTAG_ERASE_GROUP 22

CMD37

Definition at line 117 of file SDCard.h.

## ◆ UNTAG_SECTOR

#define UNTAG_SECTOR 19

CMD34

Definition at line 114 of file SDCard.h.

## ◆ WDB

#define WDB 4

Command value definitions: WDB

Definition at line 49 of file SDCard.h.

## ◆ WR

#define WR 2

Command value definitions: WR

Definition at line 47 of file SDCard.h.

## ◆ WRITE_BLOCK

#define WRITE_BLOCK 11

CMD24

Definition at line 106 of file SDCard.h.

## ◆ WRITE_MULTIPLE_BLOCK

#define WRITE_MULTIPLE_BLOCK 12

CMD25

Definition at line 107 of file SDCard.h.

## ◆ YES

#define YES 1

Command value definitions: YES

Definition at line 43 of file SDCard.h.