summaryrefslogtreecommitdiffstats
path: root/keyboards/keychron/k9_pro/k9_pro.c
diff options
context:
space:
mode:
authorlalalademaxiya1 <66767061+lalalademaxiya1@users.noreply.github.com>2023-03-16 16:48:17 +0800
committerGitHub <noreply@github.com>2023-03-16 16:48:17 +0800
commit8ab6b59ccadf3b6d7a064b1b51f4a2aef073ad38 (patch)
tree94af982a3db9626b064431da6d8dcc332224b4fc /keyboards/keychron/k9_pro/k9_pro.c
parent77cbe1469a6a83ef00a5eaffce318a176bfacdd4 (diff)
parent0f35f0e2ed1343765422bc9abf4fe240768b4130 (diff)
Merge pull request #108 from lalalademaxiya1/bt_playground
Update Keychron K Pro series keyboards
Diffstat (limited to 'keyboards/keychron/k9_pro/k9_pro.c')
-rwxr-xr-xkeyboards/keychron/k9_pro/k9_pro.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/keyboards/keychron/k9_pro/k9_pro.c b/keyboards/keychron/k9_pro/k9_pro.c
index d28b8728d5..6edf3a914b 100755
--- a/keyboards/keychron/k9_pro/k9_pro.c
+++ b/keyboards/keychron/k9_pro/k9_pro.c
@@ -1,4 +1,4 @@
-/* Copyright 2022 @ Keychron (https://www.keychron.com)
+/* Copyright 2023 @ Keychron (https://www.keychron.com)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -192,7 +192,8 @@ void matrix_scan_kb(void) {
#ifdef KC_BLUETOOTH_ENABLE
static void ckbt51_param_init(void) {
/* Set bluetooth device name */
- ckbt51_set_local_name(STR(PRODUCT));
+ // ckbt51_set_local_name(STR(PRODUCT));
+ ckbt51_set_local_name(PRODUCT);
/* Set bluetooth parameters */
module_param_t param = {.event_mode = 0x02,
.connected_idle_timeout = 7200,
@@ -220,6 +221,21 @@ void bluetooth_enter_disconnected_kb(uint8_t host_idx) {
}
}
+void ckbt51_default_ack_handler(uint8_t *data, uint8_t len) {
+ if (data[1] == 0x45) {
+ module_param_t param = {.event_mode = 0x02,
+ .connected_idle_timeout = 7200,
+ .pairing_timeout = 180,
+ .pairing_mode = 0,
+ .reconnect_timeout = 5,
+ .report_rate = 90,
+ .vendor_id_source = 1,
+ .verndor_id = 0, // Must be 0x3434
+ .product_id = PRODUCT_ID};
+ ckbt51_set_param(&param);
+ }
+}
+
void bluetooth_pre_task(void) {
static uint8_t mode = 1;