5 #ifndef SDCC_MODEL_LARGE
6 data char mscflash_fdata;
7 data char mscflash_fdm;
8 #endif /* SDCC_MODEL_LARGE */
13 #ifndef SDCC_MODEL_LARGE
14 char __page_erase (int faddr, char fdata, char fdm)
19 EA=0;EAI=0; // Disable interrupts
34 * vec Allocated to stack - offset -4 (the push _bp taken into account)
35 * fnc Allocated to registers
37 char __page_erase (int faddr, char fdata, char fdm) reentrant
40 EA=0;EAI=0; // Disable interrupts
57 #endif /* SDCC_MODEL_LARGE */
59 char __page_erase (int faddr, char fdata, char fdm)
62 EA=0;EAI=0; // Disable interrupts
72 #ifndef SDCC_MODEL_LARGE
73 char __write_flash_chk (int faddr, char fdata, char fdm)
78 EA=0;EAI=0; // Disable interrupts
93 * vec Allocated to stack - offset -4 (the push _bp taken into account)
94 * fnc Allocated to registers
96 char __write_flash_chk (int faddr, char fdata, char fdm) reentrant
99 EA=0;EAI=0; // Disable interrupts
116 #endif /* SDCC_MODEL_LARGE */
118 char __write_flash_chk (int faddr, char fdata, char fdm)
121 EA=0;EAI=0; // Disable interrupts
129 int flash_erase(void *base,int size) {
130 size=size-((unsigned int)base&0x7f);
131 base=(xdata uint8_t*)((unsigned int)base&0xFF80);
133 page_erase ((unsigned int)base, 0xff, MSC_FPM);
134 base=(uint8_t *)base+0x80;
140 int flash_copy(void *des,const void *src,int len) {
142 write_flash_chk ((unsigned int)des, *(uint8_t *)src, MSC_FPM);
143 src=(uint8_t *)src+1;
144 des=(uint8_t *)des+1;
150 int flash_flush(void)