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);
uint32_t doReadLatchFlash(uint16_t u16_addrhi, uint16_t u16_addrlo)
A union type for byte, word, or dword access for 32 bit values.
void doWriteLatchFlash(uint16_t u16_addrhi, uint16_t u16_addrlo, uint16_t u16_wordhi, uint16_t u16_wordlo)
void doWritePageFlash(union32 u32_pmemAddress, uint8_t *pu8_data, uint16_t u16_len)
void doReadPageFlash(union32 u32_pmemAddress, uint8_t *pu8_data, uint16_t u16_len)
unsigned char uint8_t
An abbreviation for an 8-bit unsigned integer.