test
Dependents: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: ble/GapAdvertisingParams.h
- Revision:
- 785:c74f567162d4
- Parent:
- 780:a910652015cd
- Child:
- 786:d6d7087d8377
--- a/ble/GapAdvertisingParams.h Tue Aug 11 15:13:13 2015 +0100 +++ b/ble/GapAdvertisingParams.h Tue Aug 11 15:13:13 2015 +0100 @@ -94,36 +94,18 @@ return (gapUnits * UNIT_0_625_MS) / 1000; } - AdvertisingType_t getAdvertisingType(void) const { - return _advType; - } - - /** - * @return the advertisement interval (in milliseconds) - */ - uint16_t getInterval(void) const { - return ADVERTISEMENT_DURATION_UNITS_TO_MS(_interval); - } - - /** - * @return the advertisement interval in units advertisement duration units--i.e. 0.625ms units. - */ - uint16_t getIntervalInADVUnits(void) const { - return _interval; - } - - uint16_t getTimeout(void) const { - return _timeout; - } + AdvertisingType_t getAdvertisingType(void) const {return _advType; } + uint16_t getInterval(void) const {return ADVERTISEMENT_DURATION_UNITS_TO_MS(_interval);} + uint16_t getTimeout(void) const {return _timeout; } void setAdvertisingType(AdvertisingType_t newAdvType) {_advType = newAdvType; } - void setInterval(uint16_t newInterval) {_interval = MSEC_TO_ADVERTISEMENT_DURATION_UNITS(newInterval);} + void setInterval(uint16_t newInterval) {_interval = newInterval;} void setTimeout(uint16_t newTimeout) {_timeout = newTimeout; } private: AdvertisingType_t _advType; - uint16_t _interval; /* in ADV duration units (i.e. 0.625ms) */ - uint16_t _timeout; /* in seconds */ + uint16_t _interval; + uint16_t _timeout; }; #endif // ifndef __GAP_ADVERTISING_PARAMS_H__ \ No newline at end of file