| Embedded SDK
    Embedded SDK | 
The construction and touch management of a keypad object. More...
#include "nbgl_debug.h"#include "nbgl_front.h"#include "nbgl_draw.h"#include "nbgl_obj.h"#include "nbgl_fonts.h"#include "nbgl_touch.h"#include "glyphs.h"#include "os_io_seph_cmd.h"#include "os_io_seph_ux.h"#include "lcx_rng.h"
Go to the source code of this file.
| Macros | |
| #define | KEY_WIDTH (SCREEN_WIDTH / 3) | 
| #define | BACKSPACE_KEY_IDX 10 | 
| #define | VALIDATE_KEY_IDX 11 | 
| #define | GET_DIGIT_INDEX(_keypad, _digit) | 
| #define | SET_DIGIT_INDEX(_keypad, _digit, _index) (_keypad->digitIndexes[_digit >> 1] |= (_digit & 1) ? (_index << 4) : _index) | 
| Functions | |
| void | nbgl_keypadTouchCallback (nbgl_obj_t *obj, nbgl_touchType_t eventType) | 
| function to be called when the keypad object is touched | |
| bool | nbgl_keypadGetPosition (nbgl_keypad_t *kpd, char index, uint16_t *x, uint16_t *y) | 
| This function gets the position (top-left corner) of the key at the given index. (to be used for Testing purpose). Only works without shuffling. | |
| void | nbgl_objDrawKeypad (nbgl_keypad_t *kpd) | 
| This function draws a keypad object. | |
| Variables | |
| uint8_t | ramBuffer [GZLIB_UNCOMPRESSED_CHUNK] | 
The construction and touch management of a keypad object.
Definition in file nbgl_obj_keypad.c.
| #define BACKSPACE_KEY_IDX 10 | 
Definition at line 37 of file nbgl_obj_keypad.c.
| #define GET_DIGIT_INDEX | ( | _keypad, | |
| _digit | |||
| ) | 
Definition at line 41 of file nbgl_obj_keypad.c.
| #define KEY_WIDTH (SCREEN_WIDTH / 3) | 
Definition at line 28 of file nbgl_obj_keypad.c.
| #define SET_DIGIT_INDEX | ( | _keypad, | |
| _digit, | |||
| _index | |||
| ) | (_keypad->digitIndexes[_digit >> 1] |= (_digit & 1) ? (_index << 4) : _index) | 
Definition at line 44 of file nbgl_obj_keypad.c.
| #define VALIDATE_KEY_IDX 11 | 
Definition at line 38 of file nbgl_obj_keypad.c.
| bool nbgl_keypadGetPosition | ( | nbgl_keypad_t * | kpd, | 
| char | index, | ||
| uint16_t * | x, | ||
| uint16_t * | y | ||
| ) | 
This function gets the position (top-left corner) of the key at the given index. (to be used for Testing purpose). Only works without shuffling.
| kpd | the object to be drawned | 
| index | the char of the key | 
| x | [out] the top-left position | 
| y | [out] the top-left position | 
Definition at line 382 of file nbgl_obj_keypad.c.
| void nbgl_keypadTouchCallback | ( | nbgl_obj_t * | obj, | 
| nbgl_touchType_t | eventType | ||
| ) | 
function to be called when the keypad object is touched
| obj | touched object (keypad) | 
| eventType | type of touch (only TOUCHED is accepted) | 
Definition at line 315 of file nbgl_obj_keypad.c.
| void nbgl_objDrawKeypad | ( | nbgl_keypad_t * | kpd | ) | 
This function draws a keypad object.
| kpd | keypad object to draw | 
Definition at line 421 of file nbgl_obj_keypad.c.
| 
 | extern | 
Definition at line 146 of file nbgl_obj.c.