Keypad Hardware

The driver implementation described in this document is intended to be as general as possible, and is based on assumptions made about the keypad hardware. The keypad hardware must consist of at least six keys.

The hardware may be implemented so that it is polled by the driver to see if a key has been pressed. In this case, the hardware must have a memory of the last key pressed so that the driver will detect that a keystroke has occurred on the next polling interval. The driver must reset the keystroke memory so that additional keystrokes can be detected on future polls of the hardware. For this case, no interrupt service routine (ISR) is required.

Alternatively, the hardware may be implemented so that it generates an interrupt when a key is pressed. In this case, an ISR is required. This documentation does not discuss this case in detail.

The keypad device will not use direct memory access (DMA) or shared buffers to transfer data, but will use programmed I/O instead.