Type 4: NVRAM and RTC
Function Description
ReadNVRAM Reads data from the NVRAM.
WriteNVRAM Writes data to the NVRAM.
GetTime
Gets the system time from the RTC.
SetTime
Sets the system time for the RTC
GetDate
Gets the system date from the RTC
SetDate
Sets the system date for the RTC
GetWeekDay Gets the day of the week from the RTC.
…More…
There are many other functions related to the NVRAM and
the RTC. Please refer to the 7188xb.h header file and the
user manual on the enclosed CD, which can be found at
CD:\Napdos\minios7\document\lib_manual_for_7188xabc\index.htm
for more detailed information.
ReadNVRAM()
Function: Reads data from the NVRAM.
Syntax:
int ReadNVRAM(int addr);
Header: #include
”7188xb.h”
Description: Reads one byte of data from the NVRAM.
addr: 0 to 30, a total of 31 bytes.
Return Value: On success, returns the data (0-255) stored at the
specified address.
On error, returns the AddrError (-9).
Example:
#include “7188xb.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);
}
WriteNVRAM()
Function: Writes data to the NVRAM.
Syntax:
int WriteNVRAM(int addr, int data);
I-7188XB Series User’s Manual(Ver.1.0, Apr/2007,
7MH-020-10
) ---
111
Summary of Contents for I-7188XB Series
Page 88: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 88...
Page 138: ...I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 138...
Page 144: ...Step 8 Make the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 144...
Page 151: ...Step 8 Rebuild the project I 7188XB Series User s Manual Ver 1 0 Apr 2007 7MH 020 10 151...