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: LinkNode_SimpleChatwithSerial
Fork of BLE_API by
Diff: ble/GapAdvertisingParams.h
- Revision:
- 778:04488024e560
- Parent:
- 766:03f1a26f132f
- Child:
- 779:6fd9004bc4b7
--- a/ble/GapAdvertisingParams.h Mon Aug 10 15:19:43 2015 +0100
+++ b/ble/GapAdvertisingParams.h Mon Aug 10 15:19:43 2015 +0100
@@ -17,6 +17,8 @@
#ifndef __GAP_ADVERTISING_PARAMS_H__
#define __GAP_ADVERTISING_PARAMS_H__
+ #include "mbed.h"
+
/**************************************************************************/
/*!
\brief
@@ -96,10 +98,11 @@
AdvertisingType_t getAdvertisingType(void) const {return _advType; }
uint16_t getInterval(void) const {return ADVERTISEMENT_DURATION_UNITS_TO_MS(_interval);}
+ uint16_t getIntervalInAdvUnits(void) const {return _interval;}
uint16_t getTimeout(void) const {return _timeout; }
void setAdvertisingType(AdvertisingType_t newAdvType) {_advType = newAdvType; }
- void setInterval(uint16_t newInterval) {_interval = newInterval;}
+ void setInterval(uint16_t newInterval) {_interval = MSEC_TO_ADVERTISEMENT_DURATION_UNITS(newInterval);}
void setTimeout(uint16_t newTimeout) {_timeout = newTimeout; }
private:
