/* Nvram-w.c: 1. Input a value and write to NVRAM. 2. The value will write to the address of NVRAM from 0 to 30. 3. The value will plus 1 by auto when it is werited to next address. Compiler: MSC 6.0, MSVC 1.52. Compile mode: Small Project: Nvram-w.c ..\lib\7188xbs.lib Hordware: 7188XB with RTC [27/Oct/2005] compiled by Liam */ #include #include #include #include #include #include"..\..\LIB\7188xb.h" void main(void) { int addr=0; int data,x,y; unsigned char cmd[80], result[80]; char buf[100]; Print("PLease insert a valume to write to NVRAM: "); LineInput(buf, 99); sscanf(buf, "%d", &data); while(addr<31) { DelayMs(10); WriteNVRAM(addr, data); Print("\n\rWrite the valume %d to RVRAM address %d", data, addr); addr=addr++,data=data++; } }