Browse
(440) 299-7778
Menu
(440) 299-7778
One-year parts and labor warranty30-day money-back guaranteeEnglishEspañolContact

The text of a manual · part 5 of 6

PTC-1800 Software Development Kit Programming Guide: PTC-1800 Programming Details

Pages 29 to 38 of 48, from PTC-1800 Software Development Kit Programming Guide

The original document is the PDF (346 KB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.

For the Telxon PTC-1800

Page 29

.HUQHO,R&RQWURO

PTC-1800 Programming Details The PTC-1800 uses the KernelIoControl function calls to allow programmability of certain nonstandard hardware devices.

KernelIoControl The KernelIoControl function provides the kernel with a generic Io control code (IOCTL)

Syntax BOOL KernelIoControl (DWORD dwIoControlCode, LPVOID lpInBuf, DWORD nInBufSize, LPVOID lpOutBuf, DWORD nOutBufSize, LPDWORD lpBytesReturned).

Parameters dwIoControlCode - IO control code. lpInBuf, Pointer to the input buffer. NInBufsize, Size in bytes of lpInBuf. lpOutBuf, Pointer to the output buffer. NOutBufSize, Maximum number of bytes that can be returned in lpOutBuf.

PTC-1800 SDK Programming Guide

21

Page 30

LpBytesReturned, Actual number of bytes returned in lpOutBuf.

Return Values TRUE indicates success. FALSE indicates failure.

Remarks The kernel calls the function OEMIoControl when a device driver or routine calls the kernel function KernelIoControl and passes an I/O control code (IOCTL). The system is fully preemptible when this function is called. The kernel does no processing, but passes all parameters directly to the function supplied by Symbol. This function is provided solely to allow your application to communicate with the kernel mode code of the OEM adaptation layer. For KernelIoControl calls specific to the PTC-1800, the following parameter definition will always be true. dwIoControlCode, IO control code. lpInBuf, Pointer to an ULONG. NInBufsize, Size of an ULONG. lpOutBuf, Pointer to an ULONG. NOutBufSize, Size of a ULONG. LpBytesReturned, Size of a ULONG when a value is returned in lpOutBuf.

22

PTC-1800 SDK Programming Guide

Page 31

.HUQHO,R&RQWURO

Sample All Symbol-supplied KernelIoControl function calls follow the same basic format as the code snippet that is supplied below.

Param = IOCTL_CONTRAST_UP; KernelIoControl (IOCTL_HAL_CONTRAST, 392,' VL]HRI 8/21*

VL]HRI 8/21* 5HVXOW6L]H

PTC-1800 SDK Programming Guide

23

Page 32

Scanner The control lines to the scanner decode module may be manipulated through KernelIoControl function calls. dwIoControlCode: IOCTL_HAL_SCANNER lpInBuf lpOutBuf

IOCTL_SCANNER_INIT

N/A

IOCTL_SCANNER_ON

N/A

IOCTL_SCANNER_OFF

N/A

IOCTL_SCANNER_STATE

IOCTL_SCANNER_WAKE IOCTL_SCANNER_SLEEP

24

Description Initializes the scanner decode module settings. Turns scanner decode module power on.

Turns scanner decode module power off. 1 if the scanReturns the state of ner decode the scanner decode module is pow- module power. ered on, and 0 if the scanner decode module is powered off. N/A Wakes up the scanner decode module. N/A Allows the scanner decode module to sleep.

PTC-1800 SDK Programming Guide

Page 33

6FDQQHU lpInBuf lpOutBuf

IOCTL_SCANNER_RESET_ON

N/A

IOCTL_SCANNER_RESET_OFF

N/A

IOCTL_SCANNER_RESET_STATE 1 if the scan- ner decode module is in reset, and 0 if the scanner decode module is in run state.

PTC-1800 SDK Programming Guide

Description Places the scanner decode module into the reset state. Places the scanner decode module into the run state. Returns the state of the scanner decode module reset signal.

25

Page 34

Backlight The backlight may be manipulated through Kernel IoControl function calls. dwIoControlCode: IOCTL_HAL_BACKLIGHT lpInBuf lpOutBuf

IOCTL_BACKLIGHT_INIT

N/A

IOCTL_BACKLIGHT_ON

N/A

IOCTL_BACKLIGHT_OFF

N/A

IOCTL_BACKLIGHT_STATE 1 if backlight is on, and 0 if backlight is off.

26

Description Initializes the backlight settings. Turns the backlight on. Turns the backlight off. Returns the state of the backlight.

PTC-1800 SDK Programming Guide

Page 35

0RWRU

Vibrator (Motor) The vibrator (motor) may be manipulated through KernelIoControl function calls. dwIoControlCode: IOCTL_HAL_MOTOR lpInBuf lpOutBuf

IOCTL_MOTOR_INIT

N/A

IOCTL_MOTOR_ON

N/A

IOCTL_MOTOR_OFF

N/A

IOCTL_MOTOR_STATE 1 if the vibrator is on, and 0 if the vibrator is off.

PTC-1800 SDK Programming Guide

Description Initializes the vibrator settings. Turns the vibrator on. Turns the vibrator off. Returns the state of the vibrator.

27

Page 36

Buzzer The buzzer may be manipulated through KernelIoControl function calls. dwIoControlCode: IOCTL_HAL_BUZZER lpInBuf lpOutBuf

IOCTL_BUZZER_INIT

N/A

IOCTL_BUZZER_ON

N/A

IOCTL_BUZZER_OFF

N/A

IOCTL_BUZZER_STATE

1 if the buzzer is on, and 0 if the buzzer is off.

28

Description Initializes the buzzer settings. Turns the buzzer on. Turns the buzzer off. Returns the state of the buzzer.

PTC-1800 SDK Programming Guide

Page 37

&RQWUDVW

Contrast The display contrast may be manipulated through KernelIoControl function calls. The contrast can have a value of 0–32. dwIoControlCode: IOCTL_HAL_CONTRAST lpInBuf lpOutBuf

IOCTL_CONTRAST_INIT

N/A

IOCTL_CONTRAST_UP

N/A

IOCTL_CONTRAST_DOWN N/A

Description Initializes the contrast settings. Moves the contrast up one setting. Moves the contrast down one setting.

dwIoControlCode IOCTL_HAL_CONTRAST_GET lpInBuf N/A

PTC-1800 SDK Programming Guide lpOutBuf

Description

A value from 0– 32 to which the contrast is currently set.

Gets gross contrast values.

29

Page 38

dwIoControlCode:

IOCTL_HAL_CONTRAST_SET lpInBuf Contrast value from 0–32 to which the contrast will be set.

30 lpOutBuf N/A

Description Sets gross contrast values.

PTC-1800 SDK Programming Guide