NimBLE-Arduino 2.1.2
Loading...
Searching...
No Matches
ble_eddystone.h
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20#ifndef H_BLE_EDDYSTONE_
21#define H_BLE_EDDYSTONE_
22
30#include <inttypes.h>
31#ifdef __cplusplus
32extern "C" {
33#endif
34
35struct ble_hs_adv_fields;
36
37#define BLE_EDDYSTONE_MAX_UUIDS16 3
38#define BLE_EDDYSTONE_URL_MAX_LEN 17
39
40#define BLE_EDDYSTONE_URL_SCHEME_HTTP_WWW 0
41#define BLE_EDDYSTONE_URL_SCHEME_HTTPS_WWW 1
42#define BLE_EDDYSTONE_URL_SCHEME_HTTP 2
43#define BLE_EDDYSTONE_URL_SCHEME_HTTPS 3
44
45#define BLE_EDDYSTONE_URL_SUFFIX_COM_SLASH 0x00
46#define BLE_EDDYSTONE_URL_SUFFIX_ORG_SLASH 0x01
47#define BLE_EDDYSTONE_URL_SUFFIX_EDU_SLASH 0x02
48#define BLE_EDDYSTONE_URL_SUFFIX_NET_SLASH 0x03
49#define BLE_EDDYSTONE_URL_SUFFIX_INFO_SLASH 0x04
50#define BLE_EDDYSTONE_URL_SUFFIX_BIZ_SLASH 0x05
51#define BLE_EDDYSTONE_URL_SUFFIX_GOV_SLASH 0x06
52#define BLE_EDDYSTONE_URL_SUFFIX_COM 0x07
53#define BLE_EDDYSTONE_URL_SUFFIX_ORG 0x08
54#define BLE_EDDYSTONE_URL_SUFFIX_EDU 0x09
55#define BLE_EDDYSTONE_URL_SUFFIX_NET 0x0a
56#define BLE_EDDYSTONE_URL_SUFFIX_INFO 0x0b
57#define BLE_EDDYSTONE_URL_SUFFIX_BIZ 0x0c
58#define BLE_EDDYSTONE_URL_SUFFIX_GOV 0x0d
59#define BLE_EDDYSTONE_URL_SUFFIX_NONE 0xff
60
77int ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields,
78 void *uid, int8_t measured_power);
79
104int ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
105 uint8_t url_scheme, char *url_body,
106 uint8_t url_body_len, uint8_t suffix,
107 int8_t measured_power);
108
109#ifdef __cplusplus
110}
111#endif
112
117#endif
int ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields, uint8_t url_scheme, char *url_body, uint8_t url_body_len, uint8_t suffix, int8_t measured_power)
Definition ble_eddystone.c:141
int ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields, void *uid, int8_t measured_power)
Definition ble_eddystone.c:110