Compilation fix for newer mbed-os
Fork of X_NUCLEO_IDB0XA1 by
Diff: source/platform/btle.cpp
- Branch:
- ed913d4b8f4131a00dc3184889a36725d080f65f
- Revision:
- 266:b49e28134d83
- Parent:
- 263:8516afb5e29c
- Child:
- 267:cd7870e466b3
--- a/source/platform/btle.cpp Thu Sep 15 10:51:25 2016 +0100 +++ b/source/platform/btle.cpp Thu Sep 15 10:51:29 2016 +0100 @@ -81,6 +81,7 @@ uint16_t g_gap_service_handle = 0; uint16_t g_appearance_char_handle = 0; uint16_t g_device_name_char_handle = 0; +uint16_t g_preferred_connection_parameters_char_handle = 0; /* Private variables ---------------------------------------------------------*/ volatile uint8_t set_connectable = 1; @@ -203,6 +204,15 @@ /*ret = aci_gatt_update_char_value(service_handle, dev_name_char_handle, 0, strlen(name), (tHalUint8 *)name);*/ + // update the peripheral preferred conenction parameters handle + // if the device is configured as a peripheral + // This value is hardcoded at the moment. + if ((role & GAP_PERIPHERAL_ROLE_IDB05A1) || (role & GAP_PERIPHERAL_ROLE_IDB04A1) || + (bnrg_expansion_board == IDB05A1 /* role is ignored in this configuration ... */)) { + g_preferred_connection_parameters_char_handle = 10; + } + + #ifdef AST_FOR_MBED_OS minar::Scheduler::postCallback(btle_handler); #endif