This is a demonstration program which draws a keypad on the LCD and uses the touch screen to allow an operator to key-in an access code. Two possible codes are allowed to grant to different levels of access. Additionally the push button is used to allow an operator to send Moorse Code pulses in to the device which is checked against two characters to determine if there was a match, and if so, access is granted.

Dependencies:   LCD_DISCO_F429ZI mbed TS_DISCO_F429ZI mbed-os BSP_DISCO_F429ZI

Also draws a mushroom on the screen and animates it.

Committer:
Damotclese
Date:
Sat Jun 01 20:43:11 2019 +0000
Revision:
1:316582aec4fb
Added animation of a mushroom sprite that occasionally teleports.;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Damotclese 1:316582aec4fb 1
Damotclese 1:316582aec4fb 2 // ----------------------------------------------------------------------
Damotclese 1:316582aec4fb 3 // SecurityUnlockDemo-Keypad.h
Damotclese 1:316582aec4fb 4 //
Damotclese 1:316582aec4fb 5 // Fredric L. Rice, June 2019
Damotclese 1:316582aec4fb 6 //
Damotclese 1:316582aec4fb 7 // ----------------------------------------------------------------------
Damotclese 1:316582aec4fb 8
Damotclese 1:316582aec4fb 9 #ifndef _SECURITYUNLOCKDEMOKEYPAD_H_
Damotclese 1:316582aec4fb 10 #define _SECURITYUNLOCKDEMOKEYPAD_H_ 1
Damotclese 1:316582aec4fb 11
Damotclese 1:316582aec4fb 12 // ----------------------------------------------------------------------
Damotclese 1:316582aec4fb 13 // Describe MACROs which the module may use
Damotclese 1:316582aec4fb 14 //
Damotclese 1:316582aec4fb 15 // ----------------------------------------------------------------------
Damotclese 1:316582aec4fb 16
Damotclese 1:316582aec4fb 17 // We define this value to position the entire keypad on the screen
Damotclese 1:316582aec4fb 18 #define KEYPAD_LEFT_MARGIN 42
Damotclese 1:316582aec4fb 19 #define KEYPAD_TOP_MARGIN 60
Damotclese 1:316582aec4fb 20
Damotclese 1:316582aec4fb 21 // The "line number" on the display to show the keys that get entered
Damotclese 1:316582aec4fb 22 #define ENTERED_KEYS_LINE 18
Damotclese 1:316582aec4fb 23
Damotclese 1:316582aec4fb 24 // We allow the operator to enter a maximum number of digits for
Damotclese 1:316582aec4fb 25 // the access code
Damotclese 1:316582aec4fb 26 #define MAX_SECURITY_DIGITS 15
Damotclese 1:316582aec4fb 27
Damotclese 1:316582aec4fb 28 // We define the format of the keypad data structure which the
Damotclese 1:316582aec4fb 29 // module will use to describe the placement of each key
Damotclese 1:316582aec4fb 30 typedef struct KeypadLocation
Damotclese 1:316582aec4fb 31 {
Damotclese 1:316582aec4fb 32 uint16_t u16_screenXLocation;
Damotclese 1:316582aec4fb 33 uint16_t u16_screenYLocation;
Damotclese 1:316582aec4fb 34 uint16_t u16_keyHeight;
Damotclese 1:316582aec4fb 35 uint16_t u16_keyWidth;
Damotclese 1:316582aec4fb 36 uint8_t u8_keyASCIICharacter;
Damotclese 1:316582aec4fb 37 } KeypadLocation_t;
Damotclese 1:316582aec4fb 38
Damotclese 1:316582aec4fb 39 // ----------------------------------------------------------------------
Damotclese 1:316582aec4fb 40 // Function prototypes that we will export
Damotclese 1:316582aec4fb 41 //
Damotclese 1:316582aec4fb 42 // ----------------------------------------------------------------------
Damotclese 1:316582aec4fb 43
Damotclese 1:316582aec4fb 44 extern void KeypadInit(void);
Damotclese 1:316582aec4fb 45 extern void KeypadHandleKeyPress(uint16_t u16_screenX, uint16_t u16_screenY);
Damotclese 1:316582aec4fb 46 extern void KeypadDrawKeypad(void);
Damotclese 1:316582aec4fb 47
Damotclese 1:316582aec4fb 48 #endif
Damotclese 1:316582aec4fb 49
Damotclese 1:316582aec4fb 50 // End of file
Damotclese 1:316582aec4fb 51