41 #if (defined(__dsPIC33E__) || defined(__PIC24E__))
44 # define FLASH_ROWSIZE 2 //in number of instructions
45 # define FLASH_ROWS_PER_PAGE (1024/FLASH_ROWSIZE)
47 # define FLASH_ROWSIZE 64 //in number of instructions
48 # define FLASH_ROWS_PER_PAGE 8
51 #define FLASH_PAGEINSTR (FLASH_ROWSIZE * FLASH_ROWS_PER_PAGE) //8 rows of 64 instructions
52 #define FLASH_PAGESIZE (FLASH_PAGEINSTR*2) //each instruction appears to occupy 2 program memory addresses
53 #define FLASH_PAGEBYTES (FLASH_PAGEINSTR*3) //total bytes is FLASH_PAGEINSTR *3 = 1536
54 #define FLASH_ROWBYTES (FLASH_ROWSIZE*3) //bytes in one row
56 void doWriteLatchFlash(uint16_t u16_addrhi, uint16_t u16_addrlo, uint16_t u16_wordhi, uint16_t u16_wordlo);
58 void doEraseFlash (uint16_t u16_addrhi, uint16_t u16_addrlo);