sd.h

来自「An complete pmp solution for mattel juic」· C头文件 代码 · 共 53 行

H
53
字号
#ifndef __SD_H
#define __SD_H
#include "diskio.h"


/*---------------------------------------*/
/* Prototypes for disk control functions */

DSTATUS wDiskInitialize ();
DSTATUS wDiskShutdown ();
DSTATUS wDiskStatus ();
DRESULT wDiskRead (BYTE*, DWORD, BYTE);
#ifndef	_READONLY
DRESULT wDiskWrite (const BYTE*, DWORD, BYTE);
#endif
DRESULT wDiskIOctl (BYTE, void*);
void	wDiskTimerProc ();
DWORD wGetTime ();
//-------------------------------------------------
/* R/W one byte over SPI */
u08 wMMCByte(u08 x);

/* Send a command to the MMC */
u08 wMMCCommand(u08 command, u32 arg);

/* Initialise SIO */
void wSIOInit();


/* Copy a single 512 byte sector from 'start' to MMC 'sector' */
u08 wMMCWriteSector(u32 sector, u08* buffer);
u08 wMMCReadSector(u32 sector, u08* buffer);

/* Init the MMC */
void wMMCInit();

/* Reset the MMC */
u08 wMMCReset();

/* Display card info */
void wMMCDumpCID();


void wMMCDMARead();
void wMMCDMAWrite();
void wSIODMAInit();


#define cs_high() { PORT_CS|=(1 << CS); }
#define cs_low() { PORT_CS&=~(1 << CS); }

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?