#include "sceptre.h"
#include "diskio.h"
#include "sdcard.h"
Go to the source code of this file.
Defines | |
#define | USE_SOCKSWITCHES 1 |
#define | USE_POWERCONTROL 1 |
#define | USE_FIFO 1 |
#define | CT_MMC 0x01 |
#define | CT_SD1 0x02 |
#define | CT_SD2 0x04 |
#define | CT_SDC (CT_SD1|CT_SD2) |
#define | CT_BLOCK 0x08 |
#define | CMD0 (0x40+0) |
#define | CMD1 (0x40+1) |
#define | ACMD41 (0xC0+41) |
#define | CMD8 (0x40+8) |
#define | CMD9 (0x40+9) |
#define | CMD10 (0x40+10) |
#define | CMD12 (0x40+12) |
#define | ACMD13 (0xC0+13) |
#define | CMD16 (0x40+16) |
#define | CMD17 (0x40+17) |
#define | CMD18 (0x40+18) |
#define | CMD23 (0x40+23) |
#define | ACMD23 (0xC0+23) |
#define | CMD24 (0x40+24) |
#define | CMD25 (0x40+25) |
#define | CMD55 (0x40+55) |
#define | CMD58 (0x40+58) |
#define | SOCKWP 0x20 |
#define | SOCKINS 0x10 |
#define | SD_SOCKET_WP_PIN 24 |
#define | SD_SOCKET_WP_DIR IODIR1 |
#define | SD_SOCKET_WP_IN IOPIN1 |
#define | SD_SOCKET_INS_PIN 25 |
Pin connected to the Insert/Card Detect switch of the card socket. | |
#define | SD_SOCKET_INS_DIR IODIR1 |
#define | SD_SOCKET_INS_IN IOPIN1 |
#define | SD_SOCKET_POWER_PIN 16 |
#define | SD_SOCKET_POWER_DIR IODIR1 |
#define | SD_SOCKET_POWER_IN IOPIN1 |
#define | SD_SOCKET_POWER_SET IOSET1 |
#define | SD_SOCKET_POWER_CLR IOCLR1 |
#define | SSPCR0_DSS 0 |
#define | SSPCR0_CPOL 6 |
#define | SSPCR0_CPHA 7 |
#define | SSPCR0_SCR 8 |
#define | SSPCR1_SSE 1 |
#define | SSPSR_TNF 1 |
#define | SSPSR_RNE 2 |
#define | SSPSR_BSY 4 |
#define | PCONP_PCSPI1 10 |
#define | SD_CS_BIT 20 |
#define | SD_CS_DIR IODIR0 |
#define | SD_CS_SET IOSET0 |
#define | SD_CS_CLR IOCLR0 |
#define | SD_CS_SEL PINSEL1 |
#define | SD_CS_SEL_BIT 8 |
#define | SPI_SPEED_20MHz 4 |
#define | SPI_SPEED_25MHz 4 |
#define | SPI_SPEED_400kHz 150 |
#define | FIFO_ELEM 8 |
Functions | |
bool_t | sdcard_detect (void) |
bool_t | sdcard_write_protected (void) |
DSTATUS | disk_initialize (BYTE drv) |
DSTATUS | disk_status (BYTE drv) |
DRESULT | disk_read (BYTE drv, BYTE *buff, DWORD sector, BYTE count) |
DRESULT | disk_write (BYTE drv, const BYTE *buff, DWORD sector, BYTE count) |
DRESULT | disk_ioctl (BYTE drv, BYTE ctrl, void *buff) |
void | disk_timerproc (void) |
bool_t | SDInit (void) |
bool_t | SDReadCSD (BYTE *pbCSD) |
bool_t | SDReadCID (BYTE *pbCID) |
bool_t | SDReadOCR (DWORD *pulOCR) |
bool_t | SDReadBlock (BYTE *pbData, DWORD ulBlock) |
bool_t | SDWriteBlock (const BYTE *pbData, DWORD ulBlock) |
Mixed SD card/SPP driver.
Definition in file sd_spi_lpc2000.c.