move setTxPower() and getPermittedTxPowerValues() into Gap.h

This commit is contained in:
Rohit Grover 2015-06-12 17:48:48 +01:00
parent 06fe80d975
commit 8ebf721ef2
3 changed files with 5 additions and 4 deletions

View File

@ -34,8 +34,6 @@ public:
bool requireMITM = true,
Gap::SecurityIOCapabilities_t iocaps = Gap::IO_CAPS_NONE,
const Gap::Passkey_t passkey = NULL) = 0;
virtual ble_error_t setTxPower(int8_t txPower) = 0;
virtual void getPermittedTxPowerValues(const int8_t **, size_t *) = 0;
virtual void waitForEvent(void) = 0;
};

View File

@ -1027,13 +1027,13 @@ BLEDevice::getAppearance(uint16_t *appearanceP)
inline ble_error_t
BLEDevice::setTxPower(int8_t txPower)
{
return transport->setTxPower(txPower);
return transport->getGap().setTxPower(txPower);
}
inline void
BLEDevice::getPermittedTxPowerValues(const int8_t **valueArrayPP, size_t *countP)
{
transport->getPermittedTxPowerValues(valueArrayPP, countP);
transport->getGap().getPermittedTxPowerValues(valueArrayPP, countP);
}
inline ble_error_t

View File

@ -187,6 +187,9 @@ public:
virtual ble_error_t setAppearance(uint16_t appearance) = 0;
virtual ble_error_t getAppearance(uint16_t *appearanceP) = 0;
virtual ble_error_t setTxPower(int8_t txPower) = 0;
virtual void getPermittedTxPowerValues(const int8_t **, size_t *) = 0;
ble_error_t startScan(const GapScanningParams &scanningParams, void (*callback)(const AdvertisementCallbackParams_t *params)) {
ble_error_t err = BLE_ERROR_NONE;
if (callback) {