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: BLE_PowerBank_HeyFaradey
Fork of BLE_API by
Diff: public/Gap.h
- Revision:
- 325:501ad8b8bbe5
- Parent:
- 267:ad6f6f40eb24
- Child:
- 337:e7c2eb38f5cc
--- a/public/Gap.h Mon Mar 23 16:28:09 2015 +0000
+++ b/public/Gap.h Mon Mar 23 16:28:09 2015 +0000
@@ -72,6 +72,9 @@
static uint16_t MSEC_TO_ADVERTISEMENT_DURATION_UNITS(uint32_t durationInMillis) {
return (durationInMillis * 1000) / UNIT_0_625_MS;
}
+ static uint16_t GAP_DURATION_UNITS_TO_MS(uint16_t gapUnits) {
+ return (gapUnits * UNIT_0_625_MS) / 1000;
+ }
typedef void (*EventCallback_t)(void);
typedef void (*ConnectionEventCallback_t)(Handle_t, addr_type_t peerAddrType, const address_t peerAddr, const ConnectionParams_t *);
@@ -85,6 +88,9 @@
virtual ble_error_t setAdvertisingData(const GapAdvertisingData &, const GapAdvertisingData &) = 0;
virtual ble_error_t startAdvertising(const GapAdvertisingParams &) = 0;
virtual ble_error_t stopAdvertising(void) = 0;
+ virtual uint16_t getMinAdvertisingInterval(void) const = 0;
+ virtual uint16_t getMinNonConnectableAdvertisingInterval(void) const = 0;
+ virtual uint16_t getMaxAdvertisingInterval(void) const = 0;
virtual ble_error_t disconnect(DisconnectionReason_t reason) = 0;
virtual ble_error_t getPreferredConnectionParams(ConnectionParams_t *params) = 0;
virtual ble_error_t setPreferredConnectionParams(const ConnectionParams_t *params) = 0;
