User`s manual

OP7100 Software
71
int kpDefStChgFn( char *curState, char *changed )
This is the default state change function for the default get key function
kpDefGetKey. This function is called back by kpScanState when
there is a change in the keypad state. If the current key is not read by
kpDefGetKey, the new key pressed will not be registered.
PARAMETERS: curState points to an array that reflects the current
state of the keypad (bitmapped, 1 indicates key is not currently
pressed).
changed points to an array that reflects the CHANGE of keypad state
from the previous scan. (bitmapped, 1 indicates there was a change).
RETURN VALUE: -1 if no key is pressed. Otherwise kpScanState
returns the normalized key number. The normalized key number is
8*row+col+edge*256. edge is 1 if the key is released, and 0 if the
key is pressed.
int kpDefGetKey()
This is the default get key function. It returns the key previously
pressed (i.e., from the one-keypress buffer). The key pressed is actually
interpreted by kpDefStChgFn, which is called back by kpScanState.
kpDefInit should be used to initialize the module.
RETURN VALUE: -1 if no key is pressed. Otherwise, kpDefGetKey
returns the normalized key number. The normalized key number is
8*row+col+edge*256. edge is 1 if the key is released, and 0 if the
key is pressed.
void kpDefInit()
Initializes the library to use the default state change function to inter-
pret key presses when kpScanState is called. Use kpDefGetKey to
get the code of the last key pressed.