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.
Fork of BLE_API by
GapAdvertisingParams.h@4:50a31ff5f974, 2013-12-12 (annotated)
- Committer:
- ktownsend
- Date:
- Thu Dec 12 02:20:54 2013 +0000
- Revision:
- 4:50a31ff5f974
- Parent:
- 2:ffc5216bd2cc
- Child:
- 6:425638944835
More GAP refactoring
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| ktownsend | 2:ffc5216bd2cc | 1 | #ifndef __GAP_ADVERTISING_PARAMS_H__ |
| ktownsend | 2:ffc5216bd2cc | 2 | #define __GAP_ADVERTISING_PARAMS_H__ |
| ktownsend | 2:ffc5216bd2cc | 3 | |
| ktownsend | 2:ffc5216bd2cc | 4 | #include "blecommon.h" |
| ktownsend | 2:ffc5216bd2cc | 5 | |
| ktownsend | 4:50a31ff5f974 | 6 | #define GAP_ADV_PARAMS_INTERVAL_MIN (0x0020) |
| ktownsend | 4:50a31ff5f974 | 7 | #define GAP_ADV_PARAMS_INTERVAL_MAX (0x4000) |
| ktownsend | 4:50a31ff5f974 | 8 | #define GAP_ADV_PARAMS_TIMEOUT_MAX (0x3FFF) |
| ktownsend | 4:50a31ff5f974 | 9 | |
| ktownsend | 2:ffc5216bd2cc | 10 | class GapAdvertisingParams |
| ktownsend | 2:ffc5216bd2cc | 11 | { |
| ktownsend | 4:50a31ff5f974 | 12 | public: |
| ktownsend | 4:50a31ff5f974 | 13 | /* See Bluetooth Core Specification 4.0 (Vol. 3), Part C, Section 9.3 */ |
| ktownsend | 4:50a31ff5f974 | 14 | enum ConnectionMode |
| ktownsend | 4:50a31ff5f974 | 15 | { |
| ktownsend | 4:50a31ff5f974 | 16 | NON_CONNECTABLE, /**< Section 9.3.2 */ |
| ktownsend | 4:50a31ff5f974 | 17 | DIRECTED_CONNECTABLE, /**< Section 9.3.3 */ |
| ktownsend | 4:50a31ff5f974 | 18 | UNDIRECTED_CONNECTABLE /**< Section 9.3.4 */ |
| ktownsend | 4:50a31ff5f974 | 19 | }; |
| ktownsend | 4:50a31ff5f974 | 20 | |
| ktownsend | 4:50a31ff5f974 | 21 | GapAdvertisingParams(ConnectionMode connectionMode = GapAdvertisingParams::UNDIRECTED_CONNECTABLE, |
| ktownsend | 4:50a31ff5f974 | 22 | uint16_t interval = GAP_ADV_PARAMS_INTERVAL_MIN, |
| ktownsend | 4:50a31ff5f974 | 23 | uint16_t timeout = 0); |
| ktownsend | 2:ffc5216bd2cc | 24 | virtual ~GapAdvertisingParams(void); |
| ktownsend | 2:ffc5216bd2cc | 25 | |
| ktownsend | 4:50a31ff5f974 | 26 | private: |
| ktownsend | 4:50a31ff5f974 | 27 | ConnectionMode _connectionMode; |
| ktownsend | 2:ffc5216bd2cc | 28 | uint16_t _interval; |
| ktownsend | 2:ffc5216bd2cc | 29 | uint16_t _timeout; |
| ktownsend | 2:ffc5216bd2cc | 30 | }; |
| ktownsend | 2:ffc5216bd2cc | 31 | |
| ktownsend | 2:ffc5216bd2cc | 32 | #endif |
