2 #include "../drivers/mmc/card_sdio.h"
4 PART_DEVICE_IO g_part_device_io =
12 PART_DEVICE emmc_part_device={0};
16 * block device access interface
19 unsigned int _get_device_info(unsigned int *total_sector_number)
21 *total_sector_number = Emmc_GetCapacity(0);
25 unsigned int _read_block(unsigned int start_sector,unsigned int sector_number,unsigned char *buf)
29 if(TRUE == Emmc_Read(0, start_sector, sector_number, buf))
35 unsigned int _write_block(unsigned int start_sector,unsigned int sector_number,unsigned char *buf)
38 if(TRUE == Emmc_Write(0, start_sector, sector_number, buf))
44 unsigned int _erase_block(unsigned int start_sector,unsigned int sector_number)
47 if(TRUE == Emmc_Erase(0, start_sector, sector_number))
53 unsigned int emmc_part_device_init()
55 emmc_part_device._device_io = &g_part_device_io;
56 g_part_device_io._info(&emmc_part_device.total_sector);