| #ifndef UPI_IMG_INTERFACE_H |
| #define UPI_IMG_INTERFACE_H |
| |
| |
| |
| typedef struct { |
| unsigned int mtd_totalsize; // mtd device total size |
| unsigned int mtd_pageperblock; // mtd device page per block |
| unsigned int mtd_blocksize; // mtd device block size |
| unsigned int mtd_pagesize; // mtd device page size |
| unsigned int mtd_oobsize; // mtd device oob size |
| // char mtd_path[256]; // mtd path |
| int parti_file_desc; // partition update file description |
| }partition_mtd_info_t; |
| |
| #if 0 |
| int ZXIC_GetBlockSize(partition_mtd_info_t *mtd_info, int *block_size); |
| int ZXIC_GetFiledesc(partition_mtd_info_t *mtd_info, int *fd_dst); |
| #endif |
| |
| int ZXIC_ReadImage(partition_mtd_info_t *mtd_info, unsigned char *buffer, int start_address, int size); |
| int ZXIC_WriteBlock(partition_mtd_info_t *mtd_info, int start_address, unsigned char *buffer); |
| unsigned long translateToGoodAddress(partition_mtd_info_t *mtd_info, unsigned long dwBlockAddress, int *badnum); |
| |
| |
| |
| int ZXIC_ReadImageSeg( |
| partition_mtd_info_t *mtd_info, |
| unsigned char *buffer, |
| int start_address, |
| int stop_address, |
| int index, |
| int size) ; |
| |
| |
| int ZXIC_WriteBlockSeg( |
| partition_mtd_info_t *mtd_info, |
| int start_address, |
| int stop_address, |
| int index, |
| unsigned char *buffer, |
| int size); |
| |
| |
| |
| |
| |
| |
| #endif /*UPI_IMG_INTERFACE_H*/ |
| |