# mios32/common/mios32_sdcard.c File Reference

`#include <mios32.h>`

## Defines
#define | MIOS32_SDCARD_MUTEX_TAKE {}
#define | MIOS32_SDCARD_MUTEX_GIVE {}
#define | MIOS32_SDCARD_SPI_PRESCALER MIOS32_SPI_PRESCALER_8
#define | SDCMD_GO_IDLE_STATE (0x40+0)
#define | SDCMD_GO_IDLE_STATE_CRC 0x95
#define | SDCMD_SEND_OP_COND (0x40+1)
#define | SDCMD_SEND_OP_COND_CRC 0xf9
#define | SDCMD_SEND_OP_COND_SDC (0xC0+41)
#define | SDCMD_SEND_OP_COND_SDC_CRC 0xff
#define | SDCMD_READ_OCR (0x40+58)
#define | SDCMD_READ_OCR_CRC 0xff
#define | SDCMD_APP_CMD (0x40+55)
#define | SDCMD_APP_CMD_CRC 0xff
#define | SDCMD_SEND_IF_COND (0x40+8)
#define | SDCMD_SEND_IF_COND_CRC 0x87
#define | SDCMD_SEND_CSD (0x40+9)
#define | SDCMD_SEND_CSD_CRC 0xff
#define | SDCMD_SEND_CID (0x40+10)
#define | SDCMD_SEND_CID_CRC 0xff
#define | SDCMD_SEND_STATUS (0x40+13)
#define | SDCMD_SEND_STATUS_CRC 0xaf
#define | SDCMD_READ_SINGLE_BLOCK (0x40+17)
#define | SDCMD_READ_SINGLE_BLOCK_CRC 0xff
#define | SDCMD_SET_BLOCKLEN (0x40+16)
#define | SDCMD_SET_BLOCKLEN_CRC 0xff
#define | SDCMD_WRITE_SINGLE_BLOCK (0x40+24)
#define | SDCMD_WRITE_SINGLE_BLOCK_CRC 0xff
#define | CT_MMC 0x01
#define | CT_SD1 0x02
#define | CT_SD2 0x04
#define | CT_SDC (CT_SD1|CT_SD2)
#define | CT_BLOCK 0x08
## Functions
s32 | MIOS32_SDCARD_Init (u32 mode)
s32 | MIOS32_SDCARD_PowerOn (void)
s32 | MIOS32_SDCARD_PowerOff (void)
s32 | MIOS32_SDCARD_CheckAvailable (u8 was_available)
s32 | MIOS32_SDCARD_SendSDCCmd (u8 cmd, u32 addr, u8 crc)
s32 | MIOS32_SDCARD_SectorRead (u32 sector, u8 *buffer)
s32 | MIOS32_SDCARD_SectorWrite (u32 sector, u8 *buffer)
s32 | MIOS32_SDCARD_CIDRead (mios32_sdcard_cid_t *cid)
s32 | MIOS32_SDCARD_CSDRead (mios32_sdcard_csd_t *csd)