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 7188xc.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
”7188xc.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 “7188xc.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-7188XC Series User’s Manual(Ver.1.0, Apr/2007,7MH-21-10) ---
109
Содержание I-7188XC Series
Страница 87: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 87...
Страница 136: ...I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 136...
Страница 142: ...Step 8 Make the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 142...
Страница 149: ...Step 8 Rebuild the project I 7188XC Series User s Manual Ver 1 0 Apr 2007 7MH 21 10 149...