wersion 1.9
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: