User`s manual

116 www.rabbit.com Applications Programming
flexKeyConfig
void flexKeyConfig(Flex_Keypad *keypad, char cRaw, char cPress, char
cRelease, char cCntHold, char cSpdLo, char cCntLo, char cSpdHi);
DESCRIPTION
Assigns each key with key press and release codes, hold and repeat ticks for auto repeat, and de-
bouncing for a specific keypad.
PARAMETERS
keypad Pointer to the keypad to configure.
cRaw Raw Key Code Index Each key has a raw key code. The raw key codes start
from 0 and count up. Each crosswired keypad has m outputs and n inputs,
which may or may not correspond to rows and columns.
The raw key code can be calculated by the following formula.
[output #] * [num outputs] + [input #]
where the output # and input # start from 0. If these correspond to rows and
columns, then the formula would be as follows.
[row #] * [num rows] + [column #]
cPress Key Press Code An 8-bit value returned when a key is pressed;
0 = unused.
cRelease Key Release Code An 8-bit value returned when a key is released;
0 = unused.
cCntHold Hold Ticks How long to hold before repeating;
0 = No Repeat.
cSpdLo Low-Speed Repeat Ticks How many times to repeat;
0 = none.
cCntLo Low-Speed Hold Ticks How long to hold before going to high-speed repeat;
0 = slow only.
cSpdHi High-Speed Repeat Ticks How many times to repeat after low-speed repeat;
0 = none.
RETURN VALUE
None.
SEE ALSO
flexKeyInit, flexKeyProcess, flexKeyGet, flexKeyUnget