ArmSys Support
ArmsysApi  0.12.18
BSdio1.cpp File Reference
#include <BSdio1.h>
#include <BSys.h>
#include <BGpio.h>
#include <BDebug.h>

Macros

#define BDEBUGL1   0
 
#define BDEBUGL2   0
 
#define USE_DMA   1
 
#define SD_CMD_GO_IDLE_STATE   0
 
#define SD_CMD_SEND_OP_COND   1
 
#define SD_CMD_ALL_SEND_CID   2
 
#define SD_CMD_SET_REL_ADDR   3
 
#define SD_CMD_SET_DSR   4
 
#define SD_CMD_SDIO_SEN_OP_COND   5
 
#define SD_CMD_HS_SWITCH   6
 
#define SD_CMD_SEL_DESEL_CARD   7
 
#define SD_CMD_HS_SEND_EXT_CSD   8
 
#define SD_CMD_SEND_CSD   9
 
#define SD_CMD_SEND_CID   10
 
#define SD_CMD_READ_DAT_UNTIL_STOP   11
 
#define SD_CMD_STOP_TRANSMISSION   12
 
#define SD_CMD_SEND_STATUS   13
 
#define SD_CMD_HS_BUSTEST_READ   14
 
#define SD_CMD_GO_INACTIVE_STATE   15
 
#define SD_CMD_SET_BLOCKLEN   16
 
#define SD_CMD_READ_SINGLE_BLOCK   17
 
#define SD_CMD_READ_MULT_BLOCK   18
 
#define SD_CMD_HS_BUSTEST_WRITE   19
 
#define SD_CMD_WRITE_DAT_UNTIL_STOP   20
 
#define SD_CMD_SET_BLOCK_COUNT   23
 
#define SD_CMD_WRITE_SINGLE_BLOCK   24
 
#define SD_CMD_WRITE_MULT_BLOCK   25
 
#define SD_CMD_PROG_CID   26
 
#define SD_CMD_PROG_CSD   27
 
#define SD_CMD_SET_WRITE_PROT   28
 
#define SD_CMD_CLR_WRITE_PROT   29
 
#define SD_CMD_SEND_WRITE_PROT   30
 
#define SD_CMD_SD_ERASE_GRP_START   32
 
#define SD_CMD_SD_ERASE_GRP_END   33
 
#define SD_CMD_ERASE_GRP_START   35
 
#define SD_CMD_ERASE_GRP_END   36
 
#define SD_CMD_ERASE   38
 
#define SD_CMD_FAST_IO   39
 
#define SD_CMD_GO_IRQ_STATE   40
 
#define SD_CMD_LOCK_UNLOCK   42
 
#define SD_CMD_APP_CMD   55
 
#define SD_CMD_GEN_CMD   56
 
#define SD_CMD_NO_CMD   64
 
#define SD_CMD_APP_SD_SET_BUSWIDTH   6
 
#define SD_CMD_SD_APP_STAUS   13
 
#define SD_CMD_SD_APP_SEND_NUM_WRITE_BLOCKS   22
 
#define SD_CMD_SD_APP_OP_COND   41
 
#define SD_CMD_SD_APP_SET_CLR_CARD_DETECT   42
 
#define SD_CMD_SD_APP_SEND_SCR   51
 
#define SD_CMD_SDIO_RW_DIRECT   52
 
#define SD_CMD_SDIO_RW_EXTENDED   53
 
#define STATUS_READY   0x0100
 
#define STATUS_ERR_BITS   (SDIO_STA_CTIMEOUT|SDIO_STA_CCRCFAIL|SDIO_STA_DTIMEOUT|SDIO_STA_DCRCFAIL|SDIO_STA_STBITERR|SDIO_STA_RXOVERR|SDIO_STA_TXUNDERR)
 

Enumerations

enum  SDCardState {
  SD_CARD_READY = 0x00000001, SD_CARD_IDENTIFICATION = 0x00000002, SD_CARD_STANDBY = 0x00000003, SD_CARD_TRANSFER = 0x00000004,
  SD_CARD_SENDING = 0x00000005, SD_CARD_RECEIVING = 0x00000006, SD_CARD_PROGRAMMING = 0x00000007, SD_CARD_DISCONNECTED = 0x00000008,
  SD_CARD_ERROR = 0x000000FF, SD_CARD_READY = 0x00000001, SD_CARD_IDENTIFICATION = 0x00000002, SD_CARD_STANDBY = 0x00000003,
  SD_CARD_TRANSFER = 0x00000004, SD_CARD_SENDING = 0x00000005, SD_CARD_RECEIVING = 0x00000006, SD_CARD_PROGRAMMING = 0x00000007,
  SD_CARD_DISCONNECTED = 0x00000008, SD_CARD_ERROR = 0x000000FF
}
 

Functions

void SDIO_IRQHandler ()
 
void SDMMC2_IRQHandler ()
 

Variables

static BSdio1dev
 

Macro Definition Documentation

◆ BDEBUGL1

#define BDEBUGL1   0

◆ BDEBUGL2

#define BDEBUGL2   0

◆ SD_CMD_ALL_SEND_CID

#define SD_CMD_ALL_SEND_CID   2

◆ SD_CMD_APP_CMD

#define SD_CMD_APP_CMD   55

◆ SD_CMD_APP_SD_SET_BUSWIDTH

#define SD_CMD_APP_SD_SET_BUSWIDTH   6

◆ SD_CMD_CLR_WRITE_PROT

#define SD_CMD_CLR_WRITE_PROT   29

◆ SD_CMD_ERASE

#define SD_CMD_ERASE   38

◆ SD_CMD_ERASE_GRP_END

#define SD_CMD_ERASE_GRP_END   36

◆ SD_CMD_ERASE_GRP_START

#define SD_CMD_ERASE_GRP_START   35

◆ SD_CMD_FAST_IO

#define SD_CMD_FAST_IO   39

◆ SD_CMD_GEN_CMD

#define SD_CMD_GEN_CMD   56

◆ SD_CMD_GO_IDLE_STATE

#define SD_CMD_GO_IDLE_STATE   0

◆ SD_CMD_GO_INACTIVE_STATE

#define SD_CMD_GO_INACTIVE_STATE   15

◆ SD_CMD_GO_IRQ_STATE

#define SD_CMD_GO_IRQ_STATE   40

◆ SD_CMD_HS_BUSTEST_READ

#define SD_CMD_HS_BUSTEST_READ   14

◆ SD_CMD_HS_BUSTEST_WRITE

#define SD_CMD_HS_BUSTEST_WRITE   19

◆ SD_CMD_HS_SEND_EXT_CSD

#define SD_CMD_HS_SEND_EXT_CSD   8

◆ SD_CMD_HS_SWITCH

#define SD_CMD_HS_SWITCH   6

◆ SD_CMD_LOCK_UNLOCK

#define SD_CMD_LOCK_UNLOCK   42

◆ SD_CMD_NO_CMD

#define SD_CMD_NO_CMD   64

◆ SD_CMD_PROG_CID

#define SD_CMD_PROG_CID   26

◆ SD_CMD_PROG_CSD

#define SD_CMD_PROG_CSD   27

◆ SD_CMD_READ_DAT_UNTIL_STOP

#define SD_CMD_READ_DAT_UNTIL_STOP   11

◆ SD_CMD_READ_MULT_BLOCK

#define SD_CMD_READ_MULT_BLOCK   18

◆ SD_CMD_READ_SINGLE_BLOCK

#define SD_CMD_READ_SINGLE_BLOCK   17

◆ SD_CMD_SD_APP_OP_COND

#define SD_CMD_SD_APP_OP_COND   41

◆ SD_CMD_SD_APP_SEND_NUM_WRITE_BLOCKS

#define SD_CMD_SD_APP_SEND_NUM_WRITE_BLOCKS   22

◆ SD_CMD_SD_APP_SEND_SCR

#define SD_CMD_SD_APP_SEND_SCR   51

◆ SD_CMD_SD_APP_SET_CLR_CARD_DETECT

#define SD_CMD_SD_APP_SET_CLR_CARD_DETECT   42

◆ SD_CMD_SD_APP_STAUS

#define SD_CMD_SD_APP_STAUS   13

◆ SD_CMD_SD_ERASE_GRP_END

#define SD_CMD_SD_ERASE_GRP_END   33

◆ SD_CMD_SD_ERASE_GRP_START

#define SD_CMD_SD_ERASE_GRP_START   32

◆ SD_CMD_SDIO_RW_DIRECT

#define SD_CMD_SDIO_RW_DIRECT   52

◆ SD_CMD_SDIO_RW_EXTENDED

#define SD_CMD_SDIO_RW_EXTENDED   53

◆ SD_CMD_SDIO_SEN_OP_COND

#define SD_CMD_SDIO_SEN_OP_COND   5

◆ SD_CMD_SEL_DESEL_CARD

#define SD_CMD_SEL_DESEL_CARD   7

◆ SD_CMD_SEND_CID

#define SD_CMD_SEND_CID   10

◆ SD_CMD_SEND_CSD

#define SD_CMD_SEND_CSD   9

◆ SD_CMD_SEND_OP_COND

#define SD_CMD_SEND_OP_COND   1

◆ SD_CMD_SEND_STATUS

#define SD_CMD_SEND_STATUS   13

◆ SD_CMD_SEND_WRITE_PROT

#define SD_CMD_SEND_WRITE_PROT   30

◆ SD_CMD_SET_BLOCK_COUNT

#define SD_CMD_SET_BLOCK_COUNT   23

◆ SD_CMD_SET_BLOCKLEN

#define SD_CMD_SET_BLOCKLEN   16

◆ SD_CMD_SET_DSR

#define SD_CMD_SET_DSR   4

◆ SD_CMD_SET_REL_ADDR

#define SD_CMD_SET_REL_ADDR   3

◆ SD_CMD_SET_WRITE_PROT

#define SD_CMD_SET_WRITE_PROT   28

◆ SD_CMD_STOP_TRANSMISSION

#define SD_CMD_STOP_TRANSMISSION   12

◆ SD_CMD_WRITE_DAT_UNTIL_STOP

#define SD_CMD_WRITE_DAT_UNTIL_STOP   20

◆ SD_CMD_WRITE_MULT_BLOCK

#define SD_CMD_WRITE_MULT_BLOCK   25

◆ SD_CMD_WRITE_SINGLE_BLOCK

#define SD_CMD_WRITE_SINGLE_BLOCK   24

◆ STATUS_ERR_BITS

#define STATUS_ERR_BITS   (SDIO_STA_CTIMEOUT|SDIO_STA_CCRCFAIL|SDIO_STA_DTIMEOUT|SDIO_STA_DCRCFAIL|SDIO_STA_STBITERR|SDIO_STA_RXOVERR|SDIO_STA_TXUNDERR)

◆ STATUS_READY

#define STATUS_READY   0x0100

◆ USE_DMA

#define USE_DMA   1

Enumeration Type Documentation

◆ SDCardState

Enumerator
SD_CARD_READY 
SD_CARD_IDENTIFICATION 
SD_CARD_STANDBY 
SD_CARD_TRANSFER 
SD_CARD_SENDING 
SD_CARD_RECEIVING 
SD_CARD_PROGRAMMING 
SD_CARD_DISCONNECTED 
SD_CARD_ERROR 
SD_CARD_READY 
SD_CARD_IDENTIFICATION 
SD_CARD_STANDBY 
SD_CARD_TRANSFER 
SD_CARD_SENDING 
SD_CARD_RECEIVING 
SD_CARD_PROGRAMMING 
SD_CARD_DISCONNECTED 
SD_CARD_ERROR 

Function Documentation

◆ SDIO_IRQHandler()

void SDIO_IRQHandler ( )

◆ SDMMC2_IRQHandler()

void SDMMC2_IRQHandler ( )

Variable Documentation

◆ dev

BSdio1* dev
static