nRF Connect SDK API 0.1.0
Loading...
Searching...
No Matches
passkey_buttons_def.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2020 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#include "passkey_buttons.h"
8
9/* This configuration file is included only once from passkey_buttons module
10 * and holds information about buttons used to input passkey.
11 */
12
13/* This structure enforces the header file is included only once in the build.
14 * Violating this requirement triggers a multiple definition error at link time.
15 */
17
18const static uint16_t confirm_keys[] = {
19 KEY_ID(0x04, 0x0A), /* enter */
20 KEY_ID(0x02, 0x0E), /* keypad enter */
21};
22
23const static uint16_t delete_keys[] = {
24 KEY_ID(0x01, 0x0A), /* backspace */
25};
26
27const static struct passkey_input_config input_configs[] = {
28 {
29 .key_ids = {
30 KEY_ID(0x07, 0x08), /* 0 */
31 KEY_ID(0x07, 0x01), /* 1 */
32 KEY_ID(0x07, 0x02), /* 2 */
33 KEY_ID(0x07, 0x03), /* 3 */
34 KEY_ID(0x07, 0x04), /* 4 */
35 KEY_ID(0x06, 0x04), /* 5 */
36 KEY_ID(0x06, 0x05), /* 6 */
37 KEY_ID(0x07, 0x05), /* 7 */
38 KEY_ID(0x07, 0x06), /* 8 */
39 KEY_ID(0x07, 0x07), /* 9 */
40 },
41 },
42 {
43 .key_ids = {
44 KEY_ID(0x03, 0x0C), /* keypad 0 */
45 KEY_ID(0x02, 0x0B), /* keypad 1 */
46 KEY_ID(0x02, 0x0C), /* keypad 2 */
47 KEY_ID(0x02, 0x0D), /* keypad 3 */
48 KEY_ID(0x01, 0x0B), /* keypad 4 */
49 KEY_ID(0x01, 0x0C), /* keypad 5 */
50 KEY_ID(0x01, 0x0D), /* keypad 6 */
51 KEY_ID(0x00, 0x0B), /* keypad 7 */
52 KEY_ID(0x00, 0x0C), /* keypad 8 */
53 KEY_ID(0x00, 0x0D), /* keypad 9 */
54 },
55 },
56};
#define KEY_ID(_col, _row)
Definition: key_id.h:26
static const uint16_t delete_keys[]
Definition: passkey_buttons_def.h:23
const struct @118 passkey_buttons_def_include_once
static const struct passkey_input_config input_configs[]
Definition: passkey_buttons_def.h:27
static const uint16_t confirm_keys[]
Definition: passkey_buttons_def.h:18
const uint16_t key_ids[10]
Definition: passkey_buttons.h:15
Definition: passkey_buttons.h:14