123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- #ifndef __MEMIMG_H__
- #define __MEMIMG_H__
- #include "rjlhex.h"
- #ifndef DEV_18FX455
- #define DEV_18FX550
- #endif
- #define MI_EEPROM_BASE 0x00
- #define MI_EEPROM_TOP 0xff
- #define MI_PROGRAM_BASE 0x0000
- #ifdef DEV_18FX455
- #define MI_PROGRAM_TOP 0x5fff
- #endif
- #ifdef DEV_18FX550
- #define MI_PROGRAM_TOP 0x7fff
- #endif
- #define MI_ID_BASE 0x200000
- #define MI_ID_TOP 0x200007
- #define MI_CONFIG_BASE 0x300000
- #define MI_CONFIG_TOP 0x30000d
- #define MI_DEVID_BASE 0x3ffffe
- #define MI_DEVID_TOP 0x3fffff
- typedef unsigned char mi_byte_t;
- typedef struct _mi_patch {
- unsigned long base;
- unsigned long top;
- mi_byte_t *contents;
- char *mask;
- } mi_patch;
- typedef struct _mi_image {
- mi_patch *program;
- mi_patch *id;
- mi_patch *config;
- mi_patch *devid;
- mi_patch *eeprom;
- } mi_image;
- mi_image *mi_load_hexfile(char *filename);
- #endif
|