Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
F7_Keypad_SingleKey Class Reference
Class library for a TS Keypad and retrieving only one key and then the keypad disapears. More...
#include <F7_Keypad_SingleKey.h>
Public Member Functions | |
| F7_Keypad_SingleKey () | |
| Constructor. | |
| char | getkey (uint8_t startx, uint8_t starty, char char1, char char2, char char3, char char4, char char5, char char6, char char7, char char8, char char9, char char10, char char11, char char12, char char13, char char14, char char15, char char16) |
| Retrieves the key selected. | |
Detailed Description
Class library for a TS Keypad and retrieving only one key and then the keypad disapears.
Example:
*#include "mbed.h" *#include "F7_Keypad_SingleKey.h" *F7_Keypad_SingleKey keypad; *LCD_DISCO_F746NG lcd; *TS_StateTypeDef TS_State; *uint8_t text1[30]; *char key; *int main() *{ lcd.SetFont(&Font12); lcd.Clear(LCD_COLOR_BLUE); lcd.SetBackColor(LCD_COLOR_BLUE); lcd.SetTextColor(LCD_COLOR_WHITE); while(1) { key = keypad.getkey(230, 20, 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P'); sprintf((char*)text1, "%c", key); lcd.DisplayStringAt(100, LINE(5), (uint8_t *)&text1, LEFT_MODE); wait(1); } *}
Definition at line 66 of file F7_Keypad_SingleKey.h.
Constructor & Destructor Documentation
Constructor.
Definition at line 6 of file F7_TSKeypad_SingleKey.cpp.
Member Function Documentation
| char getkey | ( | uint8_t | startx, |
| uint8_t | starty, | ||
| char | char1, | ||
| char | char2, | ||
| char | char3, | ||
| char | char4, | ||
| char | char5, | ||
| char | char6, | ||
| char | char7, | ||
| char | char8, | ||
| char | char9, | ||
| char | char10, | ||
| char | char11, | ||
| char | char12, | ||
| char | char13, | ||
| char | char14, | ||
| char | char15, | ||
| char | char16 | ||
| ) |
Retrieves the key selected.
- Parameters:
-
startx - to set x start pos of the keypad starty - to set y start pos of the keypad char1 - char16 to change the keys of the keypad
- Return values:
-
Returns the selected key as char.
Definition at line 166 of file F7_TSKeypad_SingleKey.cpp.
Generated on Wed Jul 13 2022 21:32:08 by
1.7.2