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 BLE_API by
Revision 661:f1c5136ca57c, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:53:00 2015 +0100
- Parent:
- 660:9d73254fd76b
- Child:
- 662:25a8bce7f2e5
- 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:53:00 2015 +0100
+++ b/common/BLEDeviceInstanceBase.h Fri Jun 19 15:53:00 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:53:00 2015 +0100
+++ b/public/BLEDevice.h Fri Jun 19 15:53:00 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:53:00 2015 +0100
+++ b/public/Gap.h Fri Jun 19 15:53:00 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) {
