-
2.22. Enable/Disable Scan2Key
Function Description:
Enable or disable Scan2Key to put scanned data to standard keyboard input buffer.
Scan2Key is enabled by default.
Function call:
BOOL
S2K_Enable(
BOOL
enable,
DWORD
timeout
)
;
Parameter: (input)
enable:
BOOL:
TRUE = Enable scanned data to keyboard buffer
FALSE
= Disable scanned data to keyboard
timeout:
DWORD:
when enable or disable Scan2Key, it will
wait until Scan2Key has been removed from memory or
timeout specified by this parameter.
Parameter: (output)
Return:
TRUE
: if successfully enabled Scan2Key,
otherwise FALSE
2.23. Send scanner command to decoding chip
Function Description:
Send scanner command to decoder chip. This command will send a serial of bytes to
decoder chip as following: (Esc and BCC will be calculated and added automatically)
Esc, high-length, low-length, command-ID, operation, set, BCC
Please refer to complete command reference on section
4
BOOL
HAM_SendCommand(
BYTE
highlen,
BYTE
lowlen,
BYTE
cmdID,
BYTE
op,
BYTE
set
)
;
Parameter: (input)
highlen:
BYTE: high byte of command length
lowlen:
BYTE: low byte of command length
cmdID: BYTE:
command
ID
op:
BYTE: operation mode for this command
set:
BYTE: operand for this command
Return:
TRUE = Indicates the command has been successfully sent to queue to output.
2.24. Only send single command decoding chip
Function Description:
Send command to decoder chip. This is a variation of command
HAM_SendCommand.
It sends following command to Hamster: (note, only two bytes without BCC)
Esc,
0x80+cmd
Function call:
BOOL
HAM_SendCommand1(
BYTE
cmd
)
;
Parameter: (input)
cmd: BYTE:
command
Return:
TRUE = indicates the command has been successfully sent to queue to output.