diff options
author | lalalademaxiya1 <2831039915@qq.com> | 2023-03-15 16:51:53 +0800 |
---|---|---|
committer | lalalademaxiya1 <2831039915@qq.com> | 2023-03-15 16:51:53 +0800 |
commit | c6243da12f6643747a24a7aa761e103cc4a848c2 (patch) | |
tree | 82d29a9567d09c2d3845654c7e5b16b284b2bc30 /keyboards/keychron/k7_pro/k7_pro.c | |
parent | ee715fc26ade41e56f47e60527f17d5cbdfb584b (diff) |
Update Keychron K Pro series keyboards
Diffstat (limited to 'keyboards/keychron/k7_pro/k7_pro.c')
-rwxr-xr-x[-rw-r--r--] | keyboards/keychron/k7_pro/k7_pro.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/keyboards/keychron/k7_pro/k7_pro.c b/keyboards/keychron/k7_pro/k7_pro.c index 31259eff2c..19f4c7cc40 100644..100755 --- a/keyboards/keychron/k7_pro/k7_pro.c +++ b/keyboards/keychron/k7_pro/k7_pro.c @@ -186,7 +186,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, @@ -214,6 +215,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(¶m); + } +} + void bluetooth_pre_task(void) { static uint8_t mode = 1; |