Skip to content

Commit b68e18c

Browse files
committed
Nordi BLE: Fix formatting
1 parent 5237c3e commit b68e18c

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF51/source/nRF5xGap.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,6 @@ ble_error_t nRF5xGap::get_role(ble::connection_handle_t connection, Role_t& role
13891389
if (c.is_allocated && c.connection == connection) {
13901390
role = c.is_peripheral ? PERIPHERAL : CENTRAL;
13911391
return BLE_ERROR_NONE;
1392-
13931392
}
13941393
}
13951394

features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF52/source/nRF5xGap.cpp

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ ble_error_t nRF5xGap::startAdvertising(const GapAdvertisingParams &params)
244244
{
245245
uint32_t err;
246246
ble_gap_adv_params_t adv_para = {0};
247-
247+
248248
/* Make sure we support the advertising type */
249249
if (params.getAdvertisingType() == GapAdvertisingParams::ADV_CONNECTABLE_DIRECTED) {
250250
/* ToDo: This requires a propery security implementation, etc. */
@@ -296,7 +296,7 @@ ble_error_t nRF5xGap::startAdvertising(const GapAdvertisingParams &params)
296296
return error;
297297
}
298298
}
299-
299+
300300
if (_privacy_enabled) {
301301
if (_peripheral_privacy_configuration.resolution_strategy != PeripheralPrivacyConfiguration_t::DO_NOT_RESOLVE) {
302302
ArrayView<resolving_list_entry_t> entries = get_sm().get_resolving_list();
@@ -336,7 +336,7 @@ ble_error_t nRF5xGap::startAdvertising(const GapAdvertisingParams &params)
336336
}
337337
#endif
338338
/* For NRF_SD_BLE_API_VERSION >= 3 nRF5xGap::setWhitelist setups the whitelist. */
339-
339+
340340
/* Start Advertising */
341341

342342

@@ -345,7 +345,7 @@ ble_error_t nRF5xGap::startAdvertising(const GapAdvertisingParams &params)
345345
adv_para.fp = advertisingPolicyMode;
346346
adv_para.interval = params.getIntervalInADVUnits(); // advertising interval (in units of 0.625 ms)
347347
adv_para.timeout = params.getTimeout();
348-
348+
349349
#if (NRF_SD_BLE_API_VERSION >= 5)
350350
err = sd_ble_gap_adv_start(&adv_para, NRF_CONNECTION_TAG);
351351
#else
@@ -365,9 +365,9 @@ ble_error_t nRF5xGap::startAdvertising(const GapAdvertisingParams &params)
365365
#if !defined(TARGET_MCU_NRF51_16K_S110) && !defined(TARGET_MCU_NRF51_32K_S110)
366366
ble_error_t nRF5xGap::startRadioScan(const GapScanningParams &scanningParams)
367367
{
368-
368+
369369
ble_gap_scan_params_t scanParams;
370-
370+
371371
#if (NRF_SD_BLE_API_VERSION <= 2)
372372
/* Allocate the stack's whitelist statically */
373373
ble_gap_whitelist_t whitelist;
@@ -386,17 +386,17 @@ ble_error_t nRF5xGap::startRadioScan(const GapScanningParams &scanningParams)
386386
return error;
387387
}
388388
}
389-
389+
390390
// FIXME: fill the irk list once addresses are resolved by the softdevice.
391391
scanParams.selective = scanningPolicyMode; /**< If 1, ignore unknown devices (non whitelisted). */
392392
scanParams.p_whitelist = &whitelist; /**< Pointer to whitelist, NULL if none is given. */
393393
#else
394394
/* For NRF_SD_BLE_API_VERSION >= 3 nRF5xGap::setWhitelist setups the whitelist. */
395-
395+
396396
scanParams.use_whitelist = scanningPolicyMode;
397397
scanParams.adv_dir_report = 0;
398398
#endif
399-
399+
400400
scanParams.active = scanningParams.getActiveScanning(); /**< If 1, perform active scanning (scan requests). */
401401

402402
scanParams.interval = scanningParams.getInterval(); /**< Scan interval between 0x0004 and 0x4000 in 0.625ms units (2.5ms to 10.24s). */
@@ -545,7 +545,7 @@ ble_error_t nRF5xGap::connect(
545545
}
546546

547547
ble_gap_scan_params_t scanParams ={0};
548-
548+
549549
#if (NRF_SD_BLE_API_VERSION <= 2)
550550
/* Allocate the stack's whitelist statically */
551551
ble_gap_whitelist_t whitelist;
@@ -564,7 +564,7 @@ ble_error_t nRF5xGap::connect(
564564
return error;
565565
}
566566
}
567-
567+
568568
scanParams.selective = scanningPolicyMode; /**< If 1, ignore unknown devices (non whitelisted). */
569569
scanParams.p_whitelist = &whitelist; /**< Pointer to whitelist, NULL if none is given. */
570570
if (_privacy_enabled) {
@@ -597,7 +597,7 @@ ble_error_t nRF5xGap::connect(
597597
}
598598
#else
599599
/* For NRF_SD_BLE_API_VERSION >= 3 nRF5xGap::setWhitelist setups the whitelist. */
600-
600+
601601
scanParams.use_whitelist = (whitelistAddressesSize) ? 1 : 0;
602602

603603
if (_privacy_enabled) {
@@ -797,7 +797,7 @@ ble_error_t nRF5xGap::setAddress(LegacyAddressType_t type, const Address_t addre
797797
if (_privacy_enabled) {
798798
return BLE_ERROR_INVALID_STATE;
799799
}
800-
800+
801801
ble_gap_addr_t dev_addr;
802802
memcpy(dev_addr.addr, address, ADDR_LEN);
803803
if (type == LegacyAddressType::PUBLIC) {
@@ -1472,7 +1472,6 @@ ble_error_t nRF5xGap::get_role(ble::connection_handle_t connection, Role_t& role
14721472
if (c.is_allocated && c.connection == connection) {
14731473
role = c.is_peripheral ? PERIPHERAL : CENTRAL;
14741474
return BLE_ERROR_NONE;
1475-
14761475
}
14771476
}
14781477

0 commit comments

Comments
 (0)