From 1cad1f6f120847dcd02ea8feed842901bebcad5d Mon Sep 17 00:00:00 2001 From: Martin Williams Date: Fri, 4 Aug 2023 15:37:08 +0100 Subject: [PATCH] MicroBitBLEManager - Move MICROBIT_BLE_MAXIMUM_BONDS to MicroBitConfig (#299) * Move MICROBIT_BLE_MAXIMUM_BONDS to MicroBitConfig --- inc/MicroBitConfig.h | 5 +++++ inc/bluetooth/MicroBitBLEManager.h | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/inc/MicroBitConfig.h b/inc/MicroBitConfig.h index 04b3e36e..a0c77e20 100644 --- a/inc/MicroBitConfig.h +++ b/inc/MicroBitConfig.h @@ -227,6 +227,11 @@ #define MICROBIT_BLE_ADVERTISING_INTERVAL 50 #endif +// Define the default maximum number of BLE bonds +#ifndef MICROBIT_BLE_MAXIMUM_BONDS + #define MICROBIT_BLE_MAXIMUM_BONDS 4 +#endif + // Defines default power level of the BLE radio transmitter. // Valid values are in the range 0..7 inclusive, with 0 being the lowest power and 7 the highest power. // Based on trials undertaken by the BBC, the radio is normally set to a low power level diff --git a/inc/bluetooth/MicroBitBLEManager.h b/inc/bluetooth/MicroBitBLEManager.h index fc402ad7..af655d74 100644 --- a/inc/bluetooth/MicroBitBLEManager.h +++ b/inc/bluetooth/MicroBitBLEManager.h @@ -47,7 +47,6 @@ DEALINGS IN THE SOFTWARE. #define MICROBIT_BLE_PAIRING_TIMEOUT 90 #define MICROBIT_BLE_POWER_LEVELS 8 -#define MICROBIT_BLE_MAXIMUM_BONDS 4 #define MICROBIT_BLE_ENABLE_BONDING true #define MICROBIT_BLE_EDDYSTONE_ADV_INTERVAL 400