summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-05-18 15:07:37 -0400
committerPete Johanson <peter@peterjohanson.com>2020-05-18 15:07:37 -0400
commitd9ca07a914e0e7adcd6aacb9878cf49eb2e85553 (patch)
treed37f4f52dad3548d94ec19af867e9c014acf82c9 /src
parentba156498bdf4dfcbb32f27a5cecf4fc105d6c243 (diff)
Move BLE passkey entry behind config flag.
Diffstat (limited to 'src')
-rw-r--r--src/ble.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/ble.c b/src/ble.c
index 18b4fe3..8b11681 100644
--- a/src/ble.c
+++ b/src/ble.c
@@ -76,6 +76,8 @@ static void auth_passkey_display(struct bt_conn *conn, unsigned int passkey)
printk("Passkey for %s: %06u\n", addr, passkey);
}
+#ifdef CONFIG_ZMK_BLE_PASSKEY_ENTRY
+
static void auth_passkey_entry(struct bt_conn *conn)
{
char addr[BT_ADDR_LE_STR_LEN];
@@ -86,6 +88,8 @@ static void auth_passkey_entry(struct bt_conn *conn)
auth_passkey_entry_conn = bt_conn_ref(conn);
}
+#endif
+
static void auth_cancel(struct bt_conn *conn)
{
char addr[BT_ADDR_LE_STR_LEN];
@@ -104,8 +108,11 @@ static void auth_cancel(struct bt_conn *conn)
}
static struct bt_conn_auth_cb zmk_ble_auth_cb_display = {
- // .passkey_display = auth_passkey_display,
- // .passkey_entry = auth_passkey_entry,
+// .passkey_display = auth_passkey_display,
+
+#ifdef CONFIG_ZMK_BLE_PASSKEY_ENTRY
+ .passkey_entry = auth_passkey_entry,
+#endif
.cancel = auth_cancel,
};