make use of GapAdvertisingData::Appearance instead of uint16_t

This commit is contained in:
Rohit Grover 2015-06-18 14:10:19 +01:00
parent 27b54dee36
commit a6b456c75c
2 changed files with 5 additions and 5 deletions

View file

@ -423,7 +423,7 @@ ble_error_t nRF51Gap::getDeviceName(uint8_t *deviceName, unsigned *lengthP)
}
}
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::setAppearance(uint16_t appearance)
}
}
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;

View file

@ -61,8 +61,8 @@ public:
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);