Skip to content

Commit 0158971

Browse files
committed
BLE: Move cordio default scan and connection params in global memory.
1 parent f3c453b commit 0158971

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

features/FEATURE_BLE/source/generic/GenericGap.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ static const uint16_t advertising_interval_max = 0x4000;
4444
static const uint16_t supervision_timeout_min = 0x000A;
4545
static const uint16_t supervision_timeout_max = 0x0C80;
4646

47+
static const ConnectionParams_t default_connection_params = {
48+
/* min conn interval */ 50,
49+
/* max conn interval */ 100,
50+
/* slave latency */ 0,
51+
/* supervision timeout */ 600
52+
};
53+
54+
static const GapScanningParams default_scan_params;
55+
4756
/*
4857
* Return true if value is included in the range [lower_bound : higher_bound]
4958
*/
@@ -490,14 +499,6 @@ ble_error_t GenericGap::connect(
490499
const ConnectionParams_t* connectionParams,
491500
const GapScanningParams* scanParams
492501
) {
493-
ConnectionParams_t default_connection_params = {
494-
/* min conn interval */ 50,
495-
/* max conn interval */ 100,
496-
/* slave latency */ 0,
497-
/* supervision timeout */ 600
498-
};
499-
GapScanningParams default_scan_params;
500-
501502
if (connectionParams == NULL) {
502503
connectionParams = &default_connection_params;
503504
}

0 commit comments

Comments
 (0)