Intermec 6100 Reference Guide

Page of 328
APPENDIX B
Common PEN*KEY 6000 Series Information
PEN*KEY
R
 6100 Computer Programmer’s Reference Guide    B-5
#define PWR_OEM_EL
0x0213 // Backlight on/off press
#define PWR_OEM_BATT_CHANGE
0x0214 // Battery change detected
#define PWR_OEM_PWRFAILNEW
0x0215 // Powerfail detected
#define PWR_OEM_PWRMSGTXT
0x027F // Power message text broadcast.
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// APM BIOS standard device IDs
#define APM_BIOS
0x0000 // APM BIOS itself
#define APM_SYSTEM
0x0001 // All BIOS-managed devices
#define APM_DISPLAY
0x0100 // Display controller (VGA, etc.)
#define APM_PCMCIA
0x0200 // PCMCIA slot controller
#define APM_PARALLEL_PORTS
0x0300 // Printer ports
#define APM_SERIAL_PORTS
0x0400 // UARTs
#define APM_LAN_ADAPTER
0x0500 // Ethernet controller
#define APM_SLOTS
0x0600 // Cards in PCMCIA slots
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// APM BIOS OEM Norand device IDs
#define APM_OEM_DEVICES
0xE000 // Remainder are OEM unique
#define APM_OEM_PODS
0xE000 // Two pod devices possible
#define APM_OEM_DIG_PADS
0xE100
// Digitizer interface control
#define APM_OEM_BACKLIGHT
0xE200 // Backlight control
#define APM_OEM_HEATER
0xE300 // 4600 display heater control
#define APM_OEM_SWV5
0xE400 // Wwitch 5 control for 4600
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// APM power states
#define APM_READY
0
// “ON”
#define APM_STANDBY
1
// Still operational, but in low power state.
#define APM_SUSPEND
2
// Not operational, but saves HW state
#define APM_OFF
3
// Not operational and does not save HW state.
//–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
// APM Event Return Codes for DOS.
// The Windows versions of these codes (PWR_FAIL, PWR_OK) are in WINDOWS.H.
#define APM_OK
0
// Continue operation
#define APM_FAIL
0x80
// Cancel operation
Sample Program Listings
Charge Detection Demo Program: TESTCHRG.CPP
TESTCHRG is a C++ Windows program that demonstrates a method for accessĆ
ing NORAPM.DLL to get the current charge status (tells you whether you are in
the dock or not).  The program needs to include NORAPM.H.  The sample proĆ
gram TESTCHRG.CPP  is presented in the following pages.
// TESTCHRG.CPP: NorAPM charge detection test fixture v1.01.
// (C) Copyright 1994 by Norand Corporation
// **************************************************************
/* TESTCHRG.DEF
NAME            TESTCHRG
DESCRIPTION     ‘Tests NorAPM Charge Detection’
EXETYPE         WINDOWS
STUB            ‘WINSTUB.EXE’
CODE            PRELOAD MOVEABLE DISCARDABLE
DATA            PRELOAD MOVEABLE MULTIPLE
HEAPSIZE        1024
STACKSIZE       8200
*/
#include <windows.h>
#include “norapm.h”
char szTitle[] = “TESTCHRG.EXE – 94.07.07.01”;
HINSTANCE hinstNorAPM;
// For storing NorAPM library instance.
B. Common PEN*KEY
6000 Series Info.