File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
features/FEATURE_BLE/source/generic Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -44,7 +44,6 @@ static const uint16_t advertising_interval_max = 0x4000;
44
44
static const uint16_t supervision_timeout_min = 0x000A ;
45
45
static const uint16_t supervision_timeout_max = 0x0C80 ;
46
46
47
-
48
47
/*
49
48
* Return true if value is included in the range [lower_bound : higher_bound]
50
49
*/
@@ -491,6 +490,22 @@ ble_error_t GenericGap::connect(
491
490
const ConnectionParams_t* connectionParams,
492
491
const GapScanningParams* scanParams
493
492
) {
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
+
501
+ if (connectionParams == NULL ) {
502
+ connectionParams = &default_connection_params;
503
+ }
504
+
505
+ if (scanParams == NULL ) {
506
+ scanParams = &default_scan_params;
507
+ }
508
+
494
509
if (is_scan_params_valid (scanParams) == false ) {
495
510
return BLE_ERROR_PARAM_OUT_OF_RANGE;
496
511
}
You can’t perform that action at this time.
0 commit comments