Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
[AnnePro2]: update bluetooth connection
Browse files Browse the repository at this point in the history
  • Loading branch information
Codetector1374 authored and shearn89 committed Feb 16, 2022
1 parent 4d44453 commit 65acd2e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions keyboards/annepro2/annepro2_ble.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,14 @@ void annepro2_ble_broadcast(uint8_t port) {
if (port > 3) {
port = 3;
}
sdPut(&SD1, 0x00);
// sdPut(&SD1, 0x00);
sdWrite(&SD1, bleMcuStartBroadcast, 10);
sdPut(&SD1, port);
annepro2_ble_connect(port);
static int lastBroadcast = -1;
if (lastBroadcast == port) {
annepro2_ble_connect(port);
}
lastBroadcast = port;
}

void annepro2_ble_connect(uint8_t port) {
Expand All @@ -98,7 +102,7 @@ void annepro2_ble_disconnect(void) {
}

void annepro2_ble_unpair(void) {
sdPut(&SD1, 0x0);
// sdPut(&SD1, 0x0);
sdWrite(&SD1, bleMcuUnpair, 11);
}

Expand Down

0 comments on commit 65acd2e

Please sign in to comment.