add #if for switching softdevice
This commit is contained in:
1 parent
b339718520
commit
dc30b91a99
2 files changed
+12
-1
No files matched your search
@@ -299,12 +299,19 @@ bool BLEAdvertising::_start(uint16_t interval, uint16_t timeout)
|
||||
.type = _type ,
|
||||
.p_peer_addr = NULL , // Undirected advertisement
|
||||
.fp = BLE_GAP_ADV_FP_ANY ,
|
||||
#if SD_VER < 500
|
||||
.p_whitelist = NULL ,
|
||||
#endif
|
||||
.interval = interval , // advertising interval (in units of 0.625 ms)
|
||||
.timeout = timeout ,
|
||||
.channel_mask = { 0, 0, 0 } , // Enable all 3 adv channels
|
||||
//.channel_mask = { 0, 0, 0 } , // Enable all 3 adv channels
|
||||
};
|
||||
|
||||
#if SD_VER < 500
|
||||
VERIFY_STATUS( sd_ble_gap_adv_start(&adv_para), false );
|
||||
#else
|
||||
VERIFY_STATUS( sd_ble_gap_adv_start(&adv_para, BLE_CONN_CFG_TAG_DEFAULT), false );
|
||||
#endif
|
||||
|
||||
Bluefruit._startConnLed(); // start blinking
|
||||
_runnning = true;
|
||||
|
||||
Reference in new issue
Block a user