Keypad Driver

Keypad Overview

  • This is the keypad driver which detect key presses, and provide the necessary data to the microcontroller or the main program.

  • The keypad debounce time, keypad action, and key press time should be in the application side.

Usage

  1. The API functions have the first argument as the strucure instance and next followed by config structure.

  2. Configure keypad pins in keypad driver module open function.

  3. When a key press is detected, an rcb callback function will be called to perform further actions with the pressed keys.

  4. Return codes of API functions are defined in header file.

Application Interface

The below table captures the functions that are to be called from the application layer.

Keypad calls

Function

Description

rs_keypad_open

Function to open the keypad module

rs_keypad_process

Function to process the keypad driver module

Callback Functions

Function

Description

rcb_keypad_action

Callback function gets keypad action and use for further need.

Error Code

  • Every API’s for the keyad module returns some success or failure values. Please refer below section,

Keypad driver module Header Details

Documentation from the relevant header as follows:

Warning

doxygenfile: Cannot find file “rs_keypad.h