Fredric Rice / Mbed 2 deprecated DemoKeypadMoorseCodeUnlockTouchAndButton

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI mbed-os BSP_DISCO_F429ZI

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers SecurityUnlockDemo-Keypad.h Source File

SecurityUnlockDemo-Keypad.h

00001 
00002 // ----------------------------------------------------------------------
00003 // SecurityUnlockDemo-Keypad.h
00004 //
00005 // Fredric L. Rice, June 2019
00006 //
00007 // ----------------------------------------------------------------------
00008 
00009 #ifndef _SECURITYUNLOCKDEMOKEYPAD_H_
00010 #define _SECURITYUNLOCKDEMOKEYPAD_H_      1
00011 
00012 // ----------------------------------------------------------------------
00013 // Describe MACROs which the module may use
00014 //
00015 // ----------------------------------------------------------------------
00016 
00017 // We define this value to position the entire keypad on the screen
00018 #define KEYPAD_LEFT_MARGIN      42
00019 #define KEYPAD_TOP_MARGIN       60
00020 
00021 // The "line number" on the display to show the keys that get entered
00022 #define ENTERED_KEYS_LINE       18
00023 
00024 // We allow the operator to enter a maximum number of digits for
00025 // the access code
00026 #define MAX_SECURITY_DIGITS     15
00027 
00028     // We define the format of the keypad data structure which the
00029     // module will use to describe the placement of each key
00030     typedef struct KeypadLocation
00031     {
00032         uint16_t u16_screenXLocation;
00033         uint16_t u16_screenYLocation;
00034         uint16_t u16_keyHeight;
00035         uint16_t u16_keyWidth;
00036         uint8_t  u8_keyASCIICharacter;
00037     } KeypadLocation_t;
00038 
00039 // ----------------------------------------------------------------------
00040 // Function prototypes that we will export
00041 //
00042 // ----------------------------------------------------------------------
00043 
00044 extern void KeypadInit(void);
00045 extern void KeypadHandleKeyPress(uint16_t u16_screenX, uint16_t u16_screenY);
00046 extern void KeypadDrawKeypad(void);
00047 
00048 #endif
00049 
00050 // End of file
00051