#ifndef _MMC_H_ #define _MMC_H_ // MMC_FLASH Functions #define MMC_NORMAL_CODE 0x00 #define MMC_ERROR_CODE 0xFF // Physical size in bytes of one MMC FLASH sector #define PHYSICAL_BLOCK_SIZE 512 extern __bit MMC_initialized; extern __xdata unsigned long MMC_physical_size; extern __xdata unsigned long MMC_physical_sectors; // Initializes MMC and configures it to accept SPI commands; void MMC_FLASH_Init(); unsigned char MMC_Flush(); unsigned char MMC_FLASH_Block_Read(unsigned long address, unsigned char *pchar); unsigned char MMC_FLASH_Block_Write(unsigned long address, unsigned char *wdata); unsigned char MMC_Get_Status(); #endif