29 SD_CMD0_GO_IDLE_STATE = 0,
30 SD_CMD2_ALL_SEND_CID = 2,
31 SD_CMD3_SEND_RELATIVE_ADDR = 3,
32 SD_CMD7_SELECT_CARD = 7,
33 SD_CMD8_SEND_IF_COND = 8,
35 SD_CMD12_STOP_TRANSMISSION = 12,
36 SD_CMD16_SET_BLOCKLEN = 16,
37 SD_CMD17_READ_SINGLE_BLOCK = 17,
38 SD_CMD18_READ_MULTIPLE_BLOCK = 18,
39 SD_CMD24_WRITE_BLOCK = 24,
40 SD_CMD25_WRITE_MULTIPLE_BLOCK = 25,
41 SD_CMD55_APP_CMD = 55,
42 SD_CMD56_GEN_CMD = 56,
44 SDIO_CMD5_IO_SEND_OP_COND = 5,
45 SDIO_CMD52_IO_RW_DIRECT = 52,
46 SDIO_CMD53_IO_RW_EXTENDED = 53,
48 SDIO_ACMD6_SET_BUS_WIDTH = 6
76#define SDIO_DEVICE_STATUS_CARD_INSERTED (1<<0)
77#define SDIO_DEVICE_STATUS_NOT_INSERTED (1<<1)
78#define SDIO_DEVICE_STATUS_WRITE_PROTECT_SWITCH (1<<2)
79#define SDIO_DEVICE_STATUS_SD_INITIALIZED (1<<16)
80#define SDIO_DEVICE_STATUS_IS_SDHC (1<<20)
int sdio_get_device_status(uint32_t *state)
Returns the status of the SD card slot.
Definition sdio.c:97
void sdio_close()
=Closes the driver.
Definition sdio.c:85
int sdio_send_cmd(sdio_cmd_t cmd, sdio_cmdtype_t type, sdio_resptype_t resptype, uint32_t arg, void *data, uint32_t block_count, uint32_t sector_size, void *response, size_t response_length)
Sends a SD card command. Sends a command and returns a 16 byte response.
Definition sdio.c:173
int sdio_reset_device(uint32_t *response)
Resets the SDIO device, and returns RCA.
Definition sdio.c:107
int sdio_read_oc_register(uint32_t *oc)
Reads the OC register Reads the value of the SD cards OC register. This contains a bit feild of opera...
Definition sdio.c:127
sdio_cmdtype_t
Standard SD Command Types.
Definition sdio.h:54
sdio_resptype_t
Standard SD Response Types.
Definition sdio.h:64
int sdio_set_hc_register(uint32_t offset, uint32_t value)
Sets a host controller register. The wii uses a standard SDIO host controller. You may set an arbitra...
Definition sdio.c:154
int sdio_initialize(const char *device)
Opens the SDIO interface.
Definition sdio.c:70
int sdio_set_clock(uint32_t divider)
Sets the clock source for the SD card.
Definition sdio.c:117
sdio_cmd_t
Standard SD Commands.
Definition sdio.h:28
int sdio_read_hc_register(uint32_t offset, uint32_t *value)
Reads a host controller register. The wii uses a standard SDIO host controller. You may read an arbit...
Definition sdio.c:137