summaryrefslogtreecommitdiff
path: root/keyboards/annepro2
diff options
context:
space:
mode:
authorcoffeeyy <coffeeyy@gmail.com>2022-11-20 07:40:52 +0800
committerGitHub <noreply@github.com>2022-11-20 10:40:52 +1100
commit37c271460a537cb395c3bb9fbf84419b54aa00a8 (patch)
treef47b06ad8571c65b89b5e46ad8471ca70fad1321 /keyboards/annepro2
parentbecd7e5975a3696f7ab7c00088a78143ea84698e (diff)
[Keyboard] annepro2: fix bluetooth multi-pairing issue (#17483)
Diffstat (limited to 'keyboards/annepro2')
-rw-r--r--keyboards/annepro2/annepro2_ble.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/keyboards/annepro2/annepro2_ble.c b/keyboards/annepro2/annepro2_ble.c
index 0336d6a76c..ed7021299d 100644
--- a/keyboards/annepro2/annepro2_ble.c
+++ b/keyboards/annepro2/annepro2_ble.c
@@ -37,12 +37,12 @@ static host_driver_t ap2_ble_driver = {
static uint8_t ble_mcu_wakeup[11] = {0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x01, 0x7d, 0x02, 0x01, 0x02};
-static uint8_t ble_mcu_start_broadcast[11] = {
- 0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x00, 0x7d, 0x40, 0x01, 0x00 // Broadcast ID[0-3]
+static uint8_t ble_mcu_start_broadcast[10] = {
+ 0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x00, 0x7d, 0x40, 0x01, // Broadcast ID[0-3]
};
-static uint8_t ble_mcu_connect[11] = {
- 0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x00, 0x7d, 0x40, 0x04, 0x00 // Connect ID [0-3]
+static uint8_t ble_mcu_connect[10] = {
+ 0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x00, 0x7d, 0x40, 0x04, // Connect ID [0-3]
};
static uint8_t ble_mcu_send_report[10] = {
@@ -77,6 +77,7 @@ void annepro2_ble_broadcast(uint8_t port) {
// sdPut(&SD1, 0x00);
sdWrite(&SD1, ble_mcu_start_broadcast, sizeof(ble_mcu_start_broadcast));
sdPut(&SD1, port);
+ sdPut(&SD1, 0x00);
static int lastBroadcast = -1;
if (lastBroadcast == port) {
annepro2_ble_connect(port);
@@ -90,6 +91,7 @@ void annepro2_ble_connect(uint8_t port) {
}
sdWrite(&SD1, ble_mcu_connect, sizeof(ble_mcu_connect));
sdPut(&SD1, port);
+ sdPut(&SD1, 0x00);
ap2_ble_swtich_ble_driver();
}