Skip to content

Commit

Permalink
upd badkb
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Aug 17, 2024
1 parent 7440145 commit 8b59017
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions base_pack/bad_kb/helpers/ble_hid.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,15 +373,21 @@ bool ble_profile_hid_mouse_scroll(FuriHalBleProfileBase* profile, int8_t delta)
return state;
}

// AN5289: 4.7, in order to use flash controller interval must be at least 25ms + advertisement, which is 30 ms
// Since we don't use flash controller anymore interval can be lowered to 7.5ms
#define CONNECTION_INTERVAL_MIN (0x0006)
// Up to 45 ms
#define CONNECTION_INTERVAL_MAX (0x24)

static GapConfig template_config = {
.adv_service_uuid = HUMAN_INTERFACE_DEVICE_SERVICE_UUID,
.appearance_char = GAP_APPEARANCE_KEYBOARD,
.bonding_mode = true,
.pairing_method = GapPairingPinCodeVerifyYesNo,
.conn_param =
{
.conn_int_min = 0x18, // 30 ms
.conn_int_max = 0x24, // 45 ms
.conn_int_min = CONNECTION_INTERVAL_MIN,
.conn_int_max = CONNECTION_INTERVAL_MAX,
.slave_latency = 0,
.supervisor_timeout = 0,
},
Expand Down

0 comments on commit 8b59017

Please sign in to comment.