598 |
|
|
599 |
|
static __saveds void xpram_func(void) |
600 |
|
{ |
601 |
< |
uint8 last_xpram[256]; |
602 |
< |
memcpy(last_xpram, XPRAM, 256); |
601 |
> |
uint8 last_xpram[XPRAM_SIZE]; |
602 |
> |
memcpy(last_xpram, XPRAM, XPRAM_SIZE); |
603 |
|
|
604 |
|
while (xpram_proc_active) { |
605 |
|
for (int i=0; i<60 && xpram_proc_active; i++) |
606 |
|
Delay(50); // Only wait 1 second so we quit promptly when xpram_proc_active becomes false |
607 |
< |
if (memcmp(last_xpram, XPRAM, 256)) { |
608 |
< |
memcpy(last_xpram, XPRAM, 256); |
607 |
> |
if (memcmp(last_xpram, XPRAM, XPRAM_SIZE)) { |
608 |
> |
memcpy(last_xpram, XPRAM, XPRAM_SIZE); |
609 |
|
SaveXPRAM(); |
610 |
|
} |
611 |
|
} |