Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of nRF51822 by
Revision 410:b1d564ca6094, committed 2015-08-10
- Comitter:
- rgrover1
- Date:
- Mon Aug 10 15:18:44 2015 +0100
- Parent:
- 409:f307fc7ba42e
- Child:
- 411:d0f102a075f7
- Commit message:
- Synchronized with git rev bf25a5a4
Author: Rohit Grover
rename to getIntervalInADVUnits()
Changed in this revision
| source/nRF5xGap.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/source/nRF5xGap.cpp Mon Aug 10 15:18:44 2015 +0100
+++ b/source/nRF5xGap.cpp Mon Aug 10 15:18:44 2015 +0100
@@ -143,13 +143,13 @@
/* Check interval range */
if (params.getAdvertisingType() == GapAdvertisingParams::ADV_NON_CONNECTABLE_UNDIRECTED) {
/* Min delay is slightly longer for unconnectable devices */
- if ((params.getIntervalInAdvUnits() < GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MIN_NONCON) ||
- (params.getIntervalInAdvUnits() > GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MAX)) {
+ if ((params.getIntervalInADVUnits() < GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MIN_NONCON) ||
+ (params.getIntervalInADVUnits() > GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MAX)) {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
}
} else {
- if ((params.getIntervalInAdvUnits() < GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MIN) ||
- (params.getIntervalInAdvUnits() > GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MAX)) {
+ if ((params.getIntervalInADVUnits() < GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MIN) ||
+ (params.getIntervalInADVUnits() > GapAdvertisingParams::GAP_ADV_PARAMS_INTERVAL_MAX)) {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
}
}
@@ -171,10 +171,10 @@
ble_gap_adv_params_t adv_para = {0};
adv_para.type = params.getAdvertisingType();
- adv_para.p_peer_addr = NULL; // Undirected advertisement
+ adv_para.p_peer_addr = NULL; // Undirected advertisement
adv_para.fp = BLE_GAP_ADV_FP_ANY;
adv_para.p_whitelist = NULL;
- adv_para.interval = params.getIntervalInAdvUnits(); // advertising interval (in units of 0.625 ms)
+ adv_para.interval = params.getIntervalInADVUnits(); // advertising interval (in units of 0.625 ms)
adv_para.timeout = params.getTimeout();
ASSERT(ERROR_NONE == sd_ble_gap_adv_start(&adv_para), BLE_ERROR_PARAM_OUT_OF_RANGE);
