⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmc_spi.h

📁 使用IAR430编译源文件
💻 H
字号:
//#########################################################################
// File: mmc_spi.h
//
// MMC MultiMediaCard and SD SecureDigital definitions for SPI protocol
//
//#########################################################################
// Last change: 21.05.2004
//#########################################################################
// holger.klabunde@t-online.de
// http://home.t-online.de/home/holger.klabunde/homepage.htm
//#########################################################################
// Compiler: AVR-GCC 3.2
//#########################################################################

#ifndef __MMC_CARD_SPI_H
#define __MMC_CARD_SPI_H


// MMC/SD commands
#define MMC_RESET		0x40 + 0
#define MMC_INIT		0x40 + 1
#define MMC_READ_CSD		0x40 + 9
#define MMC_READ_CID		0x40 + 10
#define MMC_STOP_TRANSMISSION	0x40 + 12
#define MMC_SEND_STATUS		0x40 + 13
#define MMC_SET_BLOCKLEN	0x40 + 16
#define MMC_READ_BLOCK		0x40 + 17
#define MMC_READ_MULTI_BLOCK	0x40 + 18
#define MMC_WRITE_BLOCK		0x40 + 24
#define MMC_WRITE_MULTI_BLOCK	0x40 + 25

//prototypes
extern unsigned char MMCReadSector(unsigned long sector, unsigned char *buf);
extern unsigned char MMCWriteSector(unsigned long sector, unsigned char *buf);
extern unsigned char MMCIdentify(void);

#define ReadSector(a,b) 	MMCReadSector((a),(b))
#define WriteSector(a,b) 	MMCWriteSector((a),(b))
#define IdentifyMedia()		MMCIdentify()

#endif

⌨️ 快捷键说明

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