ao-tools: Create general elf and hex library routines
[fw/altos] / ao-tools / ao-stmload / ao-selfload.c
index 95667dcac21f4e8459d1729f344121a44140bc24..dee1c3cbd6d3ac151e9279eb0f0e63d5423bca86 100644 (file)
@@ -64,16 +64,16 @@ ao_self_block_write(struct cc_usb *cc, uint32_t address, uint8_t block[256])
        }
 }
 
        }
 }
 
-struct hex_image *
+struct ao_hex_image *
 ao_self_read(struct cc_usb *cc, uint32_t address, uint32_t length)
 {
 ao_self_read(struct cc_usb *cc, uint32_t address, uint32_t length)
 {
-       struct hex_image        *image;
+       struct ao_hex_image     *image;
        int                     pages;
        int                     page;
        uint32_t                base = address & ~0xff;
        uint32_t                bound = (address + length + 0xff) & ~0xff;
 
        int                     pages;
        int                     page;
        uint32_t                base = address & ~0xff;
        uint32_t                bound = (address + length + 0xff) & ~0xff;
 
-       image = calloc(sizeof (struct hex_image) + (bound - base), 1);
+       image = calloc(sizeof (struct ao_hex_image) + (bound - base), 1);
        image->address = base;
        image->length = bound - base;
        pages = image->length / 0x100;
        image->address = base;
        image->length = bound - base;
        pages = image->length / 0x100;
@@ -83,7 +83,7 @@ ao_self_read(struct cc_usb *cc, uint32_t address, uint32_t length)
 }
 
 int
 }
 
 int
-ao_self_write(struct cc_usb *cc, struct hex_image *image)
+ao_self_write(struct cc_usb *cc, struct ao_hex_image *image)
 {
        uint8_t         block[256];
        uint8_t         check[256];
 {
        uint8_t         block[256];
        uint8_t         check[256];