Home
last modified time | relevance | path

Searched full:keys (Results 1 – 25 of 784) sorted by relevance

12345678910>>...32

/Zephyr-latest/subsys/bluetooth/host/
Dkeys.c1 /* keys.c - Bluetooth key handling */
31 #include "keys.h"
90 struct bt_keys *keys; in bt_keys_get_addr() local
99 keys = &key_pool[i]; in bt_keys_get_addr()
101 if (keys->id == id && bt_addr_le_eq(&keys->addr, addr)) { in bt_keys_get_addr()
102 return keys; in bt_keys_get_addr()
105 bt_addr_le_eq(&keys->addr, BT_ADDR_LE_ANY)) { in bt_keys_get_addr()
129 LOG_DBG("unable to create keys for %s", bt_addr_le_str(addr)); in bt_keys_get_addr()
143 keys = &key_pool[first_free_slot]; in bt_keys_get_addr()
144 keys->id = id; in bt_keys_get_addr()
[all …]
Dkeys.h1 /* keys.h - Bluetooth key handling */
38 /* Bit 2 and 3 might accidentally exist in old stored keys */
72 uint16_t keys; member
90 /** Clears all keys.
92 * Keys stored in settings are not cleared.
103 void bt_keys_foreach_type(enum bt_keys_type type, void (*func)(struct bt_keys *keys, void *data),
109 * If the pair already exists in the keys pool, no new reference is reserved
114 * @note If 'CONFIG_BT_KEYS_OVERWRITE_OLDEST' is defined and the keys pool is full,
129 * If the pair already exists in the keys pool, no new reference is reserved
178 * @param keys Key reference.
[all …]
/Zephyr-latest/tests/posix/common/src/
Dkey.c17 static pthread_key_t keys[N_KEY]; variable
43 zassert_ok(pthread_setspecific(keys[i], value), "pthread_setspecific failed"); in thread_func()
44 zassert_equal(pthread_getspecific(keys[i]), value, in thread_func()
59 zassert_ok(pthread_key_create(&keys[i], NULL), in make_keys()
60 "insufficient memory to create keys"); in make_keys()
74 * multiple keys.
102 zassert_ok(pthread_once(&keys_once, make_keys), "attempt to create keys failed"); in ZTEST()
104 /* Single thread associates its value with different keys */ in ZTEST()
112 zassert_ok(pthread_key_delete(keys[i]), "attempt to delete keys[%d] failed", i); in ZTEST()
130 pthread_key_t keys[CONFIG_POSIX_THREAD_KEYS_MAX]; in ZTEST() local
[all …]
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_get_addr/src/
Dtest_suite_full_list_overwrite_oldest.c9 #include <host/keys.h>
19 /* This list holds returned references while filling keys pool */
27 struct bt_keys *keys = NULL; in bt_unpair_custom_fake() local
30 keys = bt_keys_find_addr(id, addr); in bt_unpair_custom_fake()
31 if (keys) { in bt_unpair_custom_fake()
32 bt_keys_clear(keys); in bt_unpair_custom_fake()
114 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in test_case_setup()
120 * Test adding extra (ID, Address) pair while the keys pool list is full while all keys are in
124 * - Keys pool list is full
125 * - All Keys are used with a connection
[all …]
Dtest_suite_full_list_invalid_values.c9 #include <host/keys.h>
20 /* This list holds returned references while filling keys pool */
53 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in test_case_setup()
59 * Test adding extra (ID, Address) pair while the keys pool list is full, but while looking
60 * for the keys in use, find_key_in_use() receives an invalid NULL connection reference.
63 * - Keys pool list is full
88 * Test adding extra (ID, Address) pair while the keys pool list is full, but while looking
89 * for the keys in use, find_key_in_use() receives an invalid NULL data reference.
92 * - Keys pool list is full
Dtest_suite_full_list_no_overwrite.c9 #include <host/keys.h>
17 /* This list holds returned references while filling keys pool */
30 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in test_case_setup()
36 * Test adding extra (ID, Address) pair while the keys pool list is full.
41 * - Keys pool list is full
Dmain.c9 #include <host/keys.h>
27 /* This list will hold returned references while filling keys pool */
43 * Check if the keys pool list is empty after starting up
46 * - Check is executed after starting up, prior to adding any keys
49 * - Keys pool list is empty
60 * Test filling the keys pool with (ID, Address) pairs
63 * - Keys pool list is empty after starting up
87 "bt_keys_get_addr() failed to add key %d to the keys pool", i); in ZTEST()
100 * - Keys pool has been filled
125 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in test_case_setup()
[all …]
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_foreach_bond/src/
Dmain.c10 #include <host/keys.h>
25 /* This list will hold returned references while filling keys pool */
37 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in type_not_set_ts_setup()
52 * in the keys pool but the keys type isn't set
55 * - Keys pool has been filled
56 * - Keys type isn't set
81 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in type_set_ts_setup()
84 returned_keys_refs[i]->keys |= BT_KEYS_ALL; in type_set_ts_setup()
106 * in the keys pool while the keys type is set
109 * - Keys pool has been filled
[all …]
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_foreach_type/src/
Dmain.c10 #include <host/keys.h>
39 /* This list will hold returned references while filling keys pool */
54 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in type_not_set_ts_setup()
62 static void bt_keys_foreach_type_unreachable_cb(struct bt_keys *keys, void *data) in bt_keys_foreach_type_unreachable_cb() argument
68 * Test calling bt_keys_foreach_type() with a valid key type while the keys type isn't set
71 * - Keys pool has been filled
72 * - Keys type isn't set
97 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in type_set_ts_setup()
105 void bt_keys_foreach_type_expected_cb(struct bt_keys *keys, void *data) in bt_keys_foreach_type_expected_cb() argument
109 zassert_true(keys != NULL, "Unexpected NULL reference pointer for parameter '%s'", "keys"); in bt_keys_foreach_type_expected_cb()
[all …]
Dtest_suite_foreach_type_invalid_inputs.c9 #include <host/keys.h>
42 static void bt_keys_foreach_type_unreachable_cb(struct bt_keys *keys, void *data) in bt_keys_foreach_type_unreachable_cb() argument
48 * Test empty keys pool list with no key type set and a NULL value for the user data.
51 * - Empty keys pool list
65 * Test empty keys pool list with no key type set and a valid value for the user data.
68 * - Empty keys pool list
/Zephyr-latest/tests/bluetooth/host/id/bt_id_del/src/
Dmain.c13 #include "mocks/keys.h"
57 struct bt_keys keys = {0}; in ZTEST() local
63 keys.state |= BT_KEYS_ID_ADDED; in ZTEST()
65 bt_id_del(&keys); in ZTEST()
70 zassert_false(keys.state & BT_KEYS_ID_ADDED, "Incorrect key state"); in ZTEST()
86 struct bt_keys keys = {0}; in ZTEST() local
92 keys.state |= BT_KEYS_ID_ADDED; in ZTEST()
94 bt_id_del(&keys); in ZTEST()
99 zassert_false(keys.state & BT_KEYS_ID_ADDED, "Incorrect key state"); in ZTEST()
117 struct bt_keys keys = {0}; in ZTEST() local
[all …]
Dtest_suite_invalid_inputs.c15 #include <host/keys.h>
20 * Test passing NULL value for keys reference
23 * - Keys reference is passed as NULL
46 struct bt_keys keys = {0}; in ZTEST() local
52 bt_id_del(&keys); in ZTEST()
/Zephyr-latest/tests/bluetooth/host/id/bt_id_add/src/
Dmain.c25 #include <host/keys.h>
54 struct bt_keys keys = {0}; in ZTEST() local
61 bt_id_add(&keys); in ZTEST()
66 zassert_true((keys.state & BT_KEYS_ID_ADDED) == BT_KEYS_ID_ADDED, "Incorrect key state"); in ZTEST()
81 struct bt_keys keys = {0}; in ZTEST() local
88 bt_id_add(&keys); in ZTEST()
93 zassert_true((keys.state & BT_KEYS_ID_ADDED) == BT_KEYS_ID_ADDED, "Incorrect key state"); in ZTEST()
111 struct bt_keys keys = {0}; in ZTEST() local
120 bt_id_add(&keys); in ZTEST()
125 zassert_true((keys.state & BT_KEYS_ID_PENDING_ADD) == BT_KEYS_ID_PENDING_ADD, in ZTEST()
[all …]
/Zephyr-latest/tests/bluetooth/host/keys/mocks/
Dkeys_help_utils.c9 #include <host/keys.h>
27 printk("'%s' Error ! Keys pool isn't empty\n", __func__); in fill_key_pool_by_id_addr()
37 printk("'%s' Failed to add key %d to the keys pool\n", __func__, it); in fill_key_pool_by_id_addr()
53 printk("'%s' Error ! Keys pool isn't empty\n", __func__); in fill_key_pool_by_id_addr_type()
64 printk("'%s' Failed to add key %d to the keys pool\n", __func__, it); in fill_key_pool_by_id_addr_type()
75 struct bt_keys *keys, *key_pool; in check_key_pool_is_empty() local
79 keys = &key_pool[i]; in check_key_pool_is_empty()
80 if (bt_addr_le_cmp(&keys->addr, BT_ADDR_LE_ANY)) { in check_key_pool_is_empty()
/Zephyr-latest/dts/bindings/input/
Dgpio-keys.yaml5 Zephyr Input GPIO KEYS parent node
8 is defined in a child node of the gpio-keys node and defines a specific key
17 compatible = "gpio-keys";
26 compatible: "gpio-keys"
51 description: GPIO KEYS child node
Dzephyr,lvgl-keypad-input.yaml11 to the lvgl keys. There are lvgl keys that have a special function:
12 https://docs.lvgl.io/master/overview/indev.html#keys.
41 Array of mapped lvgl keys.
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_update_usage/src/
Dmain.c15 #include <host/keys.h>
20 * Item in this list will be used to fill keys pool.
34 /* This list will hold returned references while filling keys pool */
49 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in tc_setup()
57 * Request updating non-existing item in the keys pool list
60 * - Keys pool list is filled with items that are different from the testing ID and address pair
81 * - Keys pool list is filled with items
102 * - Keys pool list is filled with items
103 * - ID and address used exist in the keys pool list
/Zephyr-latest/tests/bluetooth/host/keys/bt_keys_get_type/src/
Dmain.c16 #include <host/keys.h>
21 * Item in this list will be used to fill keys pool.
32 /* This list will hold returned references while filling keys pool */
53 zassert_true(rv == 0, "Failed to fill keys pool list, error code %d", -rv); in full_list_ts_setup()
64 * - Keys pool list isn't full
65 * - ID and address pair used doesn't exist in the keys pool list
93 "bt_keys_get_type() failed to add key %d to the keys pool", i); in ZTEST()
96 zassert_true(returned_key->keys == type, in ZTEST()
108 * - Keys pool list is filled with items different from the ones used for testing
129 * - Keys pool list is filled with the ID and address pairs used
[all …]
/Zephyr-latest/subsys/bluetooth/mesh/
Dapp_keys.c31 /* Tracking of what storage changes are pending for App Keys. We track this in
34 * and may be reused for other keys.
57 } keys[2]; member
112 memcpy(&key.val[0], &app->keys[0].val, sizeof(struct bt_mesh_key)); in store_app_key()
113 memcpy(&key.val[1], &app->keys[1].val, sizeof(struct bt_mesh_key)); in store_app_key()
216 bt_mesh_key_destroy(&app->keys[0].val); in app_key_del()
217 bt_mesh_key_destroy(&app->keys[1].val); in app_key_del()
218 memset(app->keys, 0, sizeof(app->keys)); in app_key_del()
227 bt_mesh_key_destroy(&app->keys[0].val); in app_key_revoke()
228 memcpy(&app->keys[0], &app->keys[1], sizeof(app->keys[0])); in app_key_revoke()
[all …]
Dsubnet.c42 /* Tracking of what storage changes are pending for Net Keys. We track this in
45 * and may be reused for other keys.
108 memcpy(&key.val[0], &sub->keys[0].net, sizeof(struct bt_mesh_key)); in store_subnet()
109 memcpy(&key.val[1], &sub->keys[1].net, sizeof(struct bt_mesh_key)); in store_subnet()
216 /* Added second set of keys */ in key_refresh()
221 /* Now using new keys for TX */ in key_refresh()
226 /* Revoking keys */ in key_refresh()
234 subnet_keys_destroy(&sub->keys[0]); in key_refresh()
235 memcpy(&sub->keys[0], &sub->keys[1], sizeof(sub->keys[0])); in key_refresh()
236 sub->keys[1].valid = 0U; in key_refresh()
[all …]
Dapp_keys.h13 /** @brief Reset the app keys module. */
28 /** @brief Resolve the message encryption keys, given a message context.
31 * message encryption keys. If @c ctx::app_idx represents a device key, the
46 /** @brief Iterate through all matching application keys and call @c cb on each.
48 * @param dev_key Whether to return device keys.
62 /** @brief Store pending application keys in persistent storage. */
/Zephyr-latest/doc/hardware/peripherals/
Dkscan.rst16 configuration in order to sense several keys. This allows interfacing to
17 many keys through fewer physical pins. Keyboard matrix
20 There is no correlation between the physical and electrical layout of keys.
21 For, example, the physical layout may be one array of 16 or fewer keys, which
/Zephyr-latest/tests/net/lib/lwm2m/interop/pytest/
Dleshan.py282 keys = [int(key) for key in path.lstrip("/").split('/')]
283 if len(keys) == 1:
285 elif len(keys) == 2:
286 if keys[0] not in data:
287 data[keys[0]] = {}
288 data[keys[0]].update(cls._decode_obj_inst(content))
289 elif len(keys) == 3:
290 if keys[0] not in data:
291 data[keys[0]] = {}
292 if keys[1] not in data[keys[0]]:
[all …]
/Zephyr-latest/dts/bindings/gpio/
Dzephyr,gpio-emul-sdl.yaml9 Add a list of scancodes for the desired keys to be mapped.
16 The following example maps the first 3 numeric keys to GPIO pins:
36 compatible = "gpio-keys";
49 - Only active high as we don't get events for keys that aren't pressed
50 - Pressing multiple keys is best effort, state will be kept but no events
/Zephyr-latest/samples/subsys/usb/hid-keyboard/
DREADME.rst17 :ref:`input` API. There must be a :dtcompatible:`gpio-keys` group of buttons
18 or keys defined at the board level that can generate input events.
19 At least one key is required and up to four can be used. The first three keys
21 report HID keys 1, 2, 3 and the right Alt modifier at once.

12345678910>>...32