-
Notifications
You must be signed in to change notification settings - Fork 1
/
advertising.h
36 lines (21 loc) · 2.38 KB
/
advertising.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#define APP_ADV_INTERVAL 64 /**< The advertising interval (in units of 0.625 ms; this value corresponds to 40 ms). */
#define APP_ADV_TIMEOUT_IN_SECONDS BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED /**< The advertising time-out (in units of seconds). When set to 0, we will never time out. */
//#define APP_TIMER_PRESCALER 15 /**< Value of the RTC1 PRESCALER register. */
//#define APP_TIMER_MAX_TIMERS 6 /**< Maximum number of simultaneously created timers. */
//#define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */
#define SLAVE_LATENCY 0 /**< Slave latency. */
#define CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS) /**< Connection supervisory time-out (4 seconds). */
#define FIRST_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(20000, APP_TIMER_PRESCALER) /**< Time from initiating event (connect or start of notification) to first time sd_ble_gap_conn_param_update is called (15 seconds). */
#define NEXT_CONN_PARAMS_UPDATE_DELAY APP_TIMER_TICKS(5000, APP_TIMER_PRESCALER) /**< Time between each call to sd_ble_gap_conn_param_update after the first call (5 seconds). */
#define MAX_CONN_PARAMS_UPDATE_COUNT 3 /**< Number of attempts before giving up the connection parameter negotiation. */
/****** Definitions for Eddystone advert *********/
// Eddystone common data
#define APP_EDDYSTONE_UUID 0xFEAA /**< UUID for Eddystone beacons according to specification. */
#define APP_EDDYSTONE_RSSI 0xEE /**< 0xEE = -18 dB is the approximate signal strength at 0 m. */
// Eddystone URL data
#define APP_EDDYSTONE_URL_FRAME_TYPE 0x10 /**< URL Frame type is fixed at 0x10. */
#define APP_EDDYSTONE_URL_SCHEME 0x00 /**< 0x00 = "http://www" URL prefix scheme according to specification. */
#define APP_EDDYSTONE_URL_URL 'g', 'o', 'o', '.', 'g', 'l', '/',\
'6', 'M', 'F', 'S', 'U', 'x'
void advertising_init_eddystone(void);
void advertising_init(void);