High level Bluetooth Low Energy API and radio abstraction layer
Fork of BLE_API by
Revision 518:54731cc463b3, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:52:05 2015 +0100
- Parent:
- 517:3c8170ac2a7f
- Child:
- 519:4af237e9f913
- Commit message:
- Synchronized with git rev 8ebf721e
Author: Rohit Grover
move setTxPower() and getPermittedTxPowerValues() into Gap.h
Changed in this revision
--- a/common/BLEDeviceInstanceBase.h Fri Jun 19 15:52:05 2015 +0100 +++ b/common/BLEDeviceInstanceBase.h Fri Jun 19 15:52:05 2015 +0100 @@ -34,8 +34,6 @@ 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; };
--- a/public/BLEDevice.h Fri Jun 19 15:52:05 2015 +0100 +++ b/public/BLEDevice.h Fri Jun 19 15:52:05 2015 +0100 @@ -1027,13 +1027,13 @@ 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
--- a/public/Gap.h Fri Jun 19 15:52:05 2015 +0100 +++ b/public/Gap.h Fri Jun 19 15:52:05 2015 +0100 @@ -187,6 +187,9 @@ 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) {