
Series 30i/ 31i/ 32i-A
C executor library for conversion
Programming manual
01 04.05.06
S. Hasegawa
New registration
B-64183EN/01
EDIT
DATE
DESIG.
DESCRIPTION
85/226
DRAW.NO.
3.7
ACCESS TO THE EXTENDED NONVOLATILE MEMORY
3.7.1
Read from the Extended Nonvolatile Memory
[Name]
pl_kpmrd
[Syntax]
#include <pmclib.h>
short pl_kpmrd(unsigned long offset,
char * data,
unsigned short size);
[Arguments]
Input
offset: Read start offset
size: Number of bytes to be read
Output
*data: Read data
[Return]
0: Normal completion.
2: The "offset" or "size" is invalid.
6: No option
[Description]
This function reads data from the extended nonvolatile memory.
In "data", set an array that is not smaller than the value specified in "size".
[Related Function]
pmc_rdkpm(), pmc_wrkpm(), pmc_kpmsiz()
[Example]
/* Read 1KB from offset 0 */
char data[1024];
short ret;
ret = pl_kpmrd(0, data, sizeof(data));
if (ret != 0)
{
/* error handling */
}