3 #ifndef _DISK_PART_CFG_H
4 #define _DISK_PART_CFG_H
10 * devide wrapped interface
13 unsigned int _get_device_info(unsigned int *total_sector_number);
14 unsigned int _read_block(unsigned int start_sector,unsigned int sector_number,unsigned char *buf);
15 unsigned int _write_block(unsigned int start_sector,unsigned int sector_number,unsigned char *buf);
19 * partition device relative
22 //typedef unsigned int (*PART_DEVICE_ID)(unsigned int *id);
23 typedef unsigned int (*PART_DEVICE_INFO)(unsigned int *total_sector_number);
24 typedef unsigned int (*PART_READ)(unsigned int start_sector,unsigned int sector_number,unsigned char *buf);
25 typedef unsigned int (*PART_WRITE)(unsigned int start_sector,unsigned int sector_number,unsigned char *buf);
27 typedef struct _PART_DEVICE_IO
29 //PART_DEVICE_ID _get_id;
30 PART_DEVICE_INFO _info;
33 } __attribute__ ((packed)) PART_DEVICE_IO,*PPART_DEVICE_IO;
35 typedef struct _PART_DEVICE
37 //unsigned int device_id;
38 unsigned int total_sector;
39 PART_DEVICE_IO *_device_io;
40 } __attribute__ ((packed)) PART_DEVICE,*PPART_DEVICE;
48 typedef struct _PARTITION_INFO
50 unsigned int partition_index;
51 unsigned int partition_start_sector;
52 unsigned int partition_total_sector;
53 unsigned int partition_attr; //must to check by filesystem interface
54 } __attribute__ ((packed)) PARTITION_INFO,*PPARTITION_INFO;
57 typedef struct _PARTITION_TABLE
59 unsigned int total_partition;
60 PARTITION_INFO _partition_info[MAX_PARTITION_INFO];
61 } __attribute__ ((packed)) PARTITION_TABLE,*PPARTITION_TABLE;
63 extern PART_DEVICE emmc_part_device;
65 #endif //_DISK_PART_CFG_H