(KEYPAD_GetKey)
Line 23: Line 23:
 
{{#Widget:LibTable}}
 
{{#Widget:LibTable}}
 
|-
 
|-
|Defination || unsigned char KEYPAD_GetKey()
+
|Defination || '''unsigned char KEYPAD_GetKey()'''
 
|-
 
|-
 
| Input Arguments || none
 
| Input Arguments || none
 
|-
 
|-
| Return Value|| uint8_t--> ASCII value of the Key Pressed
+
| Return Value|| '''uint8_t'''--> ASCII value of the Key Pressed
 
|-
 
|-
| Description ||  This function waits till a key is pressed and returns its ASCII Value. It follows the following sequences to decode the key pressed:
+
| Description ||  This function waits till a key is pressed and returns its ASCII Value.
1.Wait till the previous key is released..
+
It follows the following sequences to decode the key pressed:
2.Wait for the new key press.
+
*Wait till the previous key is released..
3.Scan all the rows one at a time for the pressed key.
+
*Wait for the new key press.
4.Decodes the key pressed depending on ROW-COL combination and returns its
+
*Scan all the rows one at a time for the pressed key.
 +
*Decodes the key pressed depending on ROW-COL combination and returns its
 
  ASCII value.
 
  ASCII value.
 
|-
 
|-

Revision as of 23:13, 20 December 2014


KEYPAD

KEYPAD_Init

{{#Widget:LibTable}}
Defination void KEYPAD_Init()
Input Arguments none
Return Value none
Description This function configures the rows and columns for keypad scan. 1.ROW lines are configured as Output. 2.Column Lines are configured as Input.
Usage

KEYPAD_GetKey

{{#Widget:LibTable}}
Defination unsigned char KEYPAD_GetKey()
Input Arguments none
Return Value uint8_t--> ASCII value of the Key Pressed
Description This function waits till a key is pressed and returns its ASCII Value.

It follows the following sequences to decode the key pressed:

  • Wait till the previous key is released..
  • Wait for the new key press.
  • Scan all the rows one at a time for the pressed key.
  • Decodes the key pressed depending on ROW-COL combination and returns its

ASCII value.

Usage

KEYPAD_WaitForKeyRelease

{{#Widget:LibTable}}
Defination void KEYPAD_WaitForKeyRelease()
Input Arguments none
Return Value none
Description This function waits till the previous key is released.
Usage

KEYPAD_WaitForKeyPress

{{#Widget:LibTable}}
Defination void KEYPAD_WaitForKeyPress()
Input Arguments none
Return Value none
Description This function waits till a new key is pressed. The new Key pressed can be decoded by the function KEYPAD_GetKey.
Usage