zte's code,first commit
Change-Id: I9a04da59e459a9bc0d67f101f700d9d7dc8d681b
diff --git a/ap/lib/libupi_ab/inc/upi_img_interface.h b/ap/lib/libupi_ab/inc/upi_img_interface.h
new file mode 100755
index 0000000..2a0ea67
--- /dev/null
+++ b/ap/lib/libupi_ab/inc/upi_img_interface.h
@@ -0,0 +1,50 @@
+#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*/
+