BLE: Move cordio default scan and connection params in global memory.

pull/6188/head
Vincent Coubard 2018-02-21 15:00:17 +00:00
parent ad78b3e023
commit 9e98a72198
1 changed files with 9 additions and 8 deletions

View File

@ -44,6 +44,15 @@ static const uint16_t advertising_interval_max = 0x4000;
static const uint16_t supervision_timeout_min = 0x000A;
static const uint16_t supervision_timeout_max = 0x0C80;
static const ConnectionParams_t default_connection_params = {
/* min conn interval */ 50,
/* max conn interval */ 100,
/* slave latency */ 0,
/* supervision timeout */ 600
};
static const GapScanningParams default_scan_params;
/*
* Return true if value is included in the range [lower_bound : higher_bound]
*/
@ -492,14 +501,6 @@ ble_error_t GenericGap::connect(
const ConnectionParams_t* connectionParams,
const GapScanningParams* scanParams
) {
ConnectionParams_t default_connection_params = {
/* min conn interval */ 50,
/* max conn interval */ 100,
/* slave latency */ 0,
/* supervision timeout */ 600
};
GapScanningParams default_scan_params;
if (connectionParams == NULL) {
connectionParams = &default_connection_params;
}