ACR89U-A1 – Reference Manual
Version 1.04
www.acs.com.hk
Page 49 of 57
4.2.4.5. AS_SetLcdSetContrast
This function sets the contrast level of the LCD.
AS_STATUS AS_DECL
AS_SetLcdSetContrast
(
IN INT nDevId,
IN PLCDCONTRAST pLcdContrast,
OUT PDISPLAYSTATUS pDisplayStatus);
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pLcdContrast
[in] Pointer to a
LCDCONTRAST
structure that specifies the path to the bitmap
file. See also
Section 4.1.2.7
for more information about the
LCDCONTRAST
structure.
pDisplayStatus
[out] Pointer to a
DISPLAYSTATUS
structure containing the cursor position after
displaying the graphics. See also
Section 4.1.3.4
for more information about the
DISPLAYSTATUS
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.6. AS_ClearLcdDisplay
This function clears one or more rows or columns on the LCD display. The cursor will be moved to the
position at the starting point of the cleared block after executing this command.
AS_STATUS AS_DECL
AS_ClearLcdDisplay
(
IN INT nDevId,
IN PLCDCLEAR pLcdClear,
OUT PDISPLAYSTATUS pDisplayStatus);
Parameters:
nDevId
[in] Handle returned by a previous call to
AS_Open
.
pLcdClear
[in] Pointer to a
LCDCLEAR
structure that specifies the LCD clear mode. See
also
Section 4.1.2.8
for more information about the
LCDCLEAR
structure.
pDisplayStatus
[out] Pointer to a
DISPLAYSTATUS
structure containing the cursor position after
displaying the graphics. See also
Section 4.1.3.4
for more information about the
LCDCONTRAST lcdContrast;
DISPLAYSTATUS lcdStatus;
AS_STATUS status;
//Set the contrast of the LCD to 100%
//assumed is that a connection has already been established
lcdContrast. cbContrastLevel = 0x3f;
status = AS_SetLcdSetContrast (nDid, &lcdContrast, &lcdStatus);