ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 45 of 57
Parameters:
nDevId
[in] Handle returned by a previous call to AS_Open.
pSerialFlash
[in] Pointer to an
ACCESSSERIALFLASH
structure that contains the data to be
written to ACR89 or the data read from the ACR89. See also
Section 4.2.3.3
more information about the
ACCESSSERIALFLASH
structure.
Return Values:
AS_STATUS
This functions returns different values depending on whether it succeeds
or fails.
AS_STATUS.DllError
contains the status as returned by the DLL.
AS_STATUS.W32Error
contains the Win32 error code associated with
the DLL error, if any. See also
Appendix A
for the possible return codes.
Example:
4.2.4.
LCD Functions
LCD Functions
control the contrast, backlight status and the cursor position of the LCD panel. They
are also used to display graphics and text on the LCD panel.
4.2.4.1. AS_SetLcdCursor
This function sets the LCD position cursor to a new position.
AS_STATUS AS_DECL
AS_SetLcdCursor
(
IN INT nDevId,
IN PLCDCURSOR pLcdCursor,
OUT PDISPLAYSTATUS pDisplayStatus);
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pLcdCursor
[in] Pointer to a
LCDCURSOR
structure that includes the cursor position to be
set. See also
Section 4.1.2.3
for more information about the
LCDCURSOR
structure.
INT nDid;
ACCESSSERIALFLASH serialflash;
BYTE aData[256];
AS_STATUS status;
//read the EEPROM data from address 0x0000
//assumed is a connection has already been established
serialflash.cbAccessMode = READ_SERIALFLASH;
serialflash.wAddress = 0x0000;
serialflash.wDataLength = 0x0100;
serialflash.pData = aData;
status = AS_AccessEEPRom(nDid, &serialflash);
if (status.DLLError == CMD_SUCCESS) {
//do something with the data read
}
else {
//error occurred
}
return status;