Secondary display API

From wizarPOS
Revision as of 07:56, 13 April 2018 by Mahong (talk | contribs) (Created page with "== Functions == The calling sequence is open>ctrl_devs/write_picture>close === open === void* customer_display_open(in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Functions

The calling sequence is open>ctrl_devs/write_picture>close

open

void* customer_display_open(int* pError)

Open the CustomerDisplay device. This operation should be used before other operations.

Parameters

pErrorCode if out is null, can not open, else, the out is the handler

Returns

close

 int customer_display_close(int nHandle)

Close the CustomerDisplay device opened before. The open and close apis are pair operations. If you don’t want to use this device, you should call the close api to release this device.

Parameters

nHandle Handle of this device, returned from open

Returns

The result code, >= 0, success; <0 error code.

ctrl_devs

 int customer_display_ctrl_devs(int nHandle, int nCmd, int nValue)

Use the function of the CustomerDisplay, such as set background, display default screen, open or close led, buzzer beep and so on.

Parameters

nHandle Handle of this device, returned from open
nCmd Control command
nValue Value of control command
nCmd nValue
0x04:set background. RED :0x001F;BLACK:0X0000;YELLOW:0X07FF;BLUE:0XF800;GRAY0:0XCE9A.
0x05:display default screen. 0
0x06:led. 1:open led; 0:close led.
0x07:buzzer. 0

Returns

The result code, >= 0, success; <0 error code.

write_picture

 int customer_display_write_picture_data(int nHandle, unsigned int nXcoordinate, unsigned int nYcoordinate,unsigned int nWidth, unsigned int nHeight ,unsigned char* pData, unsigned int nDataLength)

Write picture point data(one point to 4 bytes in ARGB8888). You need firstly convert a Bitmap to point data.


Parameters

nHandle Handle of this device, returned from open
nXcoordinate X cordinate
nYcoordinate Y cordinate
nWidth width
nHeight Height
pData All point data
nDataLength Point data length

Returns

The result code, >= 0, success; <0 error code.