/* Flash-w.c: 1. To write a value which you input to flash memory at segment 0x9000 which offset is 0 to 65535 and show it on monitor. 2. The value you input will write to Flash memory and auto-plus 1. ** Press 'q' or 'Q' to quit program. Compiler: BC++ 3.1, Turbo C ++ 1.01(3.01) (free from http://community.borland.com/museum) Compile mode: Small Project: Flash-w.c ..\lib\7188xas.lib Hordware: 7188XA [27/Oct/2005] compiled by Liam */ #include #include #include #include #include #include"..\..\lib\7188xa.h" void main(void) { int seg, data; char c; unsigned e=0x9000,i=0; Print("\r\nPlease Input a value writting to segment 0x9000 of Flash Member: "); Scanf("%d", &seg); FlashErase(e); while(i<65535) { FlashWrite(e, i, seg); Print("\r\nThe value %d is writting to offset %d of Flash Memory", seg, i); i++; seg++; if(i%100==0) { Print("\r\nPress q to quit or any key to continue..."); c=Getch(); if ((c=='q') || (c=='Q')) return; } } }