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_seproxyhal.h"
#include "lcx_rng.h"
Go to the source code of this file.
Macros | |
#define | KEY_WIDTH (SCREEN_WIDTH / 3) |
#define | DIGIT_OFFSET_Y (((KEYPAD_KEY_HEIGHT - 48) / 2) & 0xFFC) |
#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 More... | |
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. More... | |
void | nbgl_objDrawKeypad (nbgl_keypad_t *kpd) |
This function draws a keypad object. More... | |
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 30 of file nbgl_obj_keypad.c.
#define DIGIT_OFFSET_Y (((KEYPAD_KEY_HEIGHT - 48) / 2) & 0xFFC) |
Definition at line 28 of file nbgl_obj_keypad.c.
#define GET_DIGIT_INDEX | ( | _keypad, | |
_digit | |||
) |
Definition at line 34 of file nbgl_obj_keypad.c.
#define KEY_WIDTH (SCREEN_WIDTH / 3) |
Definition at line 27 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 37 of file nbgl_obj_keypad.c.
#define VALIDATE_KEY_IDX 11 |
Definition at line 31 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 337 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 270 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 376 of file nbgl_obj_keypad.c.
|
extern |
Definition at line 125 of file nbgl_obj.c.