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.
Dependents: microbit-dal microbit-dal microbit-ble-open microbit-dal ... more
Fork of BLE_API by
Revision 678:783e390717b4, committed 2015-06-19
- Comitter:
- rgrover1
- Date:
- Fri Jun 19 15:53:02 2015 +0100
- Parent:
- 677:09070e7285e5
- Child:
- 679:1077054ea7df
- Commit message:
- Synchronized with git rev 93ef520e
Author: Rohit Grover
GapAdvertisingParams: rename type to AdvertisingType_t
Changed in this revision
| public/GapAdvertisingParams.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/public/GapAdvertisingParams.h Fri Jun 19 15:53:02 2015 +0100
+++ b/public/GapAdvertisingParams.h Fri Jun 19 15:53:02 2015 +0100
@@ -39,30 +39,22 @@
static const unsigned GAP_ADV_PARAMS_INTERVAL_MAX = 0x4000;
static const unsigned GAP_ADV_PARAMS_TIMEOUT_MAX = 0x3FFF;
- /**************************************************************************/
/*!
- \brief
- Encapsulates the peripheral advertising modes, which determine how
- the device appears to other central devices in hearing range
-
- \par
- See the following for more information on advertising types:
-
- \li \c Bluetooth Core Specification 4.0 (Vol. 6), Part B, Section 2.3.1
- \li \c Bluetooth Core Specification 4.0 (Vol. 3), Part C, Section 9.3
- */
- /**************************************************************************/
- enum AdvertisingType {
+ * Encapsulates the peripheral advertising modes, which determine how
+ * the device appears to other central devices in hearing range
+ */
+ enum AdvertisingType_t {
ADV_CONNECTABLE_UNDIRECTED, /**< Vol 3, Part C, Section 9.3.4 and Vol 6, Part B, Section 2.3.1.1 */
ADV_CONNECTABLE_DIRECTED, /**< Vol 3, Part C, Section 9.3.3 and Vol 6, Part B, Section 2.3.1.2 */
ADV_SCANNABLE_UNDIRECTED, /**< Include support for Scan Response payloads, see Vol 6, Part B, Section 2.3.1.4 */
ADV_NON_CONNECTABLE_UNDIRECTED /**< Vol 3, Part C, Section 9.3.2 and Vol 6, Part B, Section 2.3.1.3 */
};
+ typedef enum AdvertisingType_t AdvertisingType; /* deprecated type alias. */
public:
- GapAdvertisingParams(AdvertisingType advType = GapAdvertisingParams::ADV_CONNECTABLE_UNDIRECTED,
- uint16_t interval = GAP_ADV_PARAMS_INTERVAL_MIN_NONCON,
- uint16_t timeout = 0) : _advType(advType), _interval(interval), _timeout(timeout) {
+ GapAdvertisingParams(AdvertisingType_t advType = ADV_CONNECTABLE_UNDIRECTED,
+ uint16_t interval = GAP_ADV_PARAMS_INTERVAL_MIN_NONCON,
+ uint16_t timeout = 0) : _advType(advType), _interval(interval), _timeout(timeout) {
/* Interval checks */
if (_advType == ADV_CONNECTABLE_DIRECTED) {
/* Interval must be 0 in directed connectable mode */
@@ -94,18 +86,18 @@
}
}
- AdvertisingType getAdvertisingType(void) const {return _advType; }
- uint16_t getInterval(void) const {return _interval;}
- uint16_t getTimeout(void) const {return _timeout; }
+ AdvertisingType_t getAdvertisingType(void) const {return _advType; }
+ uint16_t getInterval(void) const {return _interval;}
+ uint16_t getTimeout(void) const {return _timeout; }
- void setAdvertisingType(AdvertisingType newAdvType) {_advType = newAdvType; }
- void setInterval(uint16_t newInterval) {_interval = newInterval;}
- void setTimeout(uint16_t newTimeout) {_timeout = newTimeout; }
+ void setAdvertisingType(AdvertisingType_t newAdvType) {_advType = newAdvType; }
+ void setInterval(uint16_t newInterval) {_interval = newInterval;}
+ void setTimeout(uint16_t newTimeout) {_timeout = newTimeout; }
private:
- AdvertisingType _advType;
- uint16_t _interval;
- uint16_t _timeout;
+ AdvertisingType_t _advType;
+ uint16_t _interval;
+ uint16_t _timeout;
};
#endif // ifndef __GAP_ADVERTISING_PARAMS_H__
\ No newline at end of file
