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 348:922c8b211979, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:55:36 2015 +0100
- Parent:
- 347:b5d18c33fd8a
- Child:
- 349:4a930be118d8
- Commit message:
- Synchronized with git rev a6b456c7
Author: Rohit Grover
make use of GapAdvertisingData::Appearance instead of uint16_t
Changed in this revision
| nRF51Gap.cpp | Show annotated file Show diff for this revision Revisions of this file |
| nRF51Gap.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/nRF51Gap.cpp Fri Jun 19 15:55:35 2015 +0100
+++ b/nRF51Gap.cpp Fri Jun 19 15:55:36 2015 +0100
@@ -423,7 +423,7 @@
}
}
-ble_error_t nRF51Gap::setAppearance(uint16_t appearance)
+ble_error_t nRF51Gap::setAppearance(GapAdvertisingData::Appearance appearance)
{
if (sd_ble_gap_appearance_set(appearance) == NRF_SUCCESS) {
return BLE_ERROR_NONE;
@@ -432,9 +432,9 @@
}
}
-ble_error_t nRF51Gap::getAppearance(uint16_t *appearanceP)
+ble_error_t nRF51Gap::getAppearance(GapAdvertisingData::Appearance *appearanceP)
{
- if (sd_ble_gap_appearance_get(appearanceP)) {
+ if (sd_ble_gap_appearance_get(reinterpret_cast<uint16_t *>(appearanceP))) {
return BLE_ERROR_NONE;
} else {
return BLE_ERROR_PARAM_OUT_OF_RANGE;
--- a/nRF51Gap.h Fri Jun 19 15:55:35 2015 +0100
+++ b/nRF51Gap.h Fri Jun 19 15:55:36 2015 +0100
@@ -61,8 +61,8 @@
virtual ble_error_t setDeviceName(const uint8_t *deviceName);
virtual ble_error_t getDeviceName(uint8_t *deviceName, unsigned *lengthP);
- virtual ble_error_t setAppearance(uint16_t appearance);
- virtual ble_error_t getAppearance(uint16_t *appearanceP);
+ virtual ble_error_t setAppearance(GapAdvertisingData::Appearance appearance);
+ virtual ble_error_t getAppearance(GapAdvertisingData::Appearance *appearanceP);
virtual ble_error_t setTxPower(int8_t txPower);
virtual void getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP);
