![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg7c.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 124
A.2.4 Type 4: NVRAM & RTC
Function Description
ReadNVRAM Read data from NVRAM.
WriteNVRAM Write data to NVRAM.
GetTime Get the system time from the RTC.
SetTime Set the system time to the RTC
GetDate Get the system date from the RTC
SetDate Set the system date to the RTC
GetWeekDay Get the weekday to the RTC.
……more……
There are more user function for NVRAM & RTC,
please refer to Appendix C iVIEW.h and
CD\Napdos\7188 \miniOS7\manual\index.html for
more detail information.
ReadNVRAM()
Func.: Read data from NVRAM.
Syntax:
int ReadNVRAM(int addr);
Header: #include ”iVIEW.h”
Description:
Read one byte data from NVRAM.
addr: 0 to 30, total 31 bytes.
Return Value:
On success return data (0-255) stored on that address.
On fail return AddrError(-9).
Example:
(nvr.c)
#include <iVIEW.H>
#include <mmi100.H>
void main()
{
int data=55, data2;
InitLib();
WriteNVRAM(0,data);
data2=ReadNVRAM(0); /* now data2=data=55 */
Print("data=%d, data2=%d",data,data2);
}