beautypg.com

Return value, Portability, Functions for use in custom keypad handlers – Rockwell Automation 6182 SDK User Manual

Page 52

background image

4–12

RAC6182-Specific Extensions to the CE API

Publication 6182-UM002B-EN-P

started, but if the value of dwTimeout is out of range for the hardware
implementation of the timer, the timeout setting of the watchdog is left
unmodified and WATCHDOG_TIMEOUT_FAILED is returned. Values
of dwTimeout over 5000 should never be used, because they cannot be
guaranteed to be within range for a given hardware implementation. At
the time of writing, the maximum timeout period supported by the
hardware is 3478 msec.

The hardware implementation of the watchdog timer is such that the
timer’s precision varies with the timeout value specified. For
dwTimeout <= 13, the precision is 1 msec and the accuracy will be
within +7/-4% of the specified period. For dwTimeout > 13, the
precision is 13.64 msec; that is, actual values are always equal to or
within +13.64 msec of the specified values. Accuracy will be within
+7/-4% for the actual period, i.e., the specified period rounded up to the
next 13.64 msec increment.

Return Value
The possible return values are represented by the following macros
defined in watchdog.h:

Macro

Description

WATCHDOG_OK

Tag or setting of new timeout value succeeded.

WATCHDOG_NOT_
PRESENT

Low-level communication with watchdog device
failed.

WATCHDOG_
TIMEOUT_FAILED

Timeout value out of range.

Portability
This function is specific to the RAC6182 hardware.

The functions described in this section should never be called by an
application program. These are functions that must be implemented in a
keypad handler if the handler is to interact properly with the system
keypad driver (keypad.dll). The driver is the only software module that
should call them.

A keypad handler for the RAC6182 is responsible for mapping virtual
key codes supplied by the keypad driver to other virtual key codes, to
macro virtual key sequences, etc. and passing the results back to the
driver, which sends them on to the main keyboard driver for final
processing.

These handler functions are already given a general purpose
implementation in Rockwell’s keypad handler (kh.dll), and a default
implementation in Rockwell’s handler stub (khstubb.dll).

Functions for Use in

Custom Keypad Handlers

This manual is related to the following products: