EVM6418 Keypad Module
This module allows you to read the value of the switches and potentiometers on the EVM’s keypad/display module. The keypad/display module must be connected to the EVM6418 when the board is powered up.
EVM6418_KEYPAD_readKey()
Description
Reads the value of the switches on the EVM’s keypad/display module.
Required Headers
evm6418.h
evm6418_keypad.h
Required Libraries
evm6418bsl.lib
Function Prototype
Uint16 EVM6418_KEYPAD_readKey()
Parameters
None
Return Value
1-9 - if a switch is pressed, 0 if no keys are pressed
Example
/* Read current key value */
keyval = EVM6418_KEYPAD_readKey();
EVM6418_KEYPAD_readPot()
Description
Reads the value of the potentiometers on the EVM’s keypad/display module
Required Headers
evm6418.h
evm6418_keypad.h
Required Libraries
evm6418bsl.lib
Function Prototype
Uint16 EVM6418_KEYPAD_readPot(Int16 potnum)
Parameters
potnum – 1 for potentiometer #1, 2 for potentiometer #2
Return Value
12-bit value read from analog/digital converter connected to potentiometer.
Example
/* Read value of potentiometer #1 */
potval = EVM6418_KEYPAD_readPot(1);
|