mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-10-03 13:47:21 +00:00
nimble/host: Add doxygen from ble_eddystone.h
This commit is contained in:
@@ -20,6 +20,13 @@
|
|||||||
#ifndef H_BLE_EDDYSTONE_
|
#ifndef H_BLE_EDDYSTONE_
|
||||||
#define H_BLE_EDDYSTONE_
|
#define H_BLE_EDDYSTONE_
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Eddystone - BLE beacon from Google
|
||||||
|
* @defgroup bt_eddystone Eddystone - BLE beacon from Google
|
||||||
|
* @ingroup bt_host
|
||||||
|
* @{
|
||||||
|
*/
|
||||||
|
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@@ -51,8 +58,47 @@ struct ble_hs_adv_fields;
|
|||||||
#define BLE_EDDYSTONE_URL_SUFFIX_GOV 0x0d
|
#define BLE_EDDYSTONE_URL_SUFFIX_GOV 0x0d
|
||||||
#define BLE_EDDYSTONE_URL_SUFFIX_NONE 0xff
|
#define BLE_EDDYSTONE_URL_SUFFIX_NONE 0xff
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures the device to advertise Eddystone UID beacons.
|
||||||
|
*
|
||||||
|
* @param adv_fields The base advertisement fields to transform into
|
||||||
|
* an eddystone beacon. All configured fields
|
||||||
|
* are preserved; you probably want to clear
|
||||||
|
* this struct before calling this function.
|
||||||
|
* @param uid The 16-byte UID to advertise.
|
||||||
|
*
|
||||||
|
* @return 0 on success;
|
||||||
|
* BLE_HS_EBUSY if advertising is in progress;
|
||||||
|
* BLE_HS_EMSGSIZE if the specified data is too
|
||||||
|
* large to fit in an advertisement;
|
||||||
|
* Other nonzero on failure.
|
||||||
|
*/
|
||||||
int ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields,
|
int ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields,
|
||||||
void *uid);
|
void *uid);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Configures the device to advertise Eddystone URL beacons.
|
||||||
|
*
|
||||||
|
* @param adv_fields The base advertisement fields to transform into
|
||||||
|
* an eddystone beacon. All configured fields
|
||||||
|
* are preserved; you probably want to clear
|
||||||
|
* this struct before calling this function.
|
||||||
|
* @param url_scheme The prefix of the URL; one of the
|
||||||
|
* BLE_EDDYSTONE_URL_SCHEME values.
|
||||||
|
* @param url_body The middle of the URL. Don't include the
|
||||||
|
* suffix if there is a suitable suffix code.
|
||||||
|
* @param url_body_len The string length of the url_body argument.
|
||||||
|
* @param url_suffix The suffix of the URL; one of the
|
||||||
|
* BLE_EDDYSTONE_URL_SUFFIX values; use
|
||||||
|
* BLE_EDDYSTONE_URL_SUFFIX_NONE if the suffix
|
||||||
|
* is embedded in the body argument.
|
||||||
|
*
|
||||||
|
* @return 0 on success;
|
||||||
|
* BLE_HS_EBUSY if advertising is in progress;
|
||||||
|
* BLE_HS_EMSGSIZE if the specified data is too
|
||||||
|
* large to fit in an advertisement;
|
||||||
|
* Other nonzero on failure.
|
||||||
|
*/
|
||||||
int ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
|
int ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
|
||||||
uint8_t url_scheme, char *url_body,
|
uint8_t url_scheme, char *url_body,
|
||||||
uint8_t url_body_len, uint8_t suffix);
|
uint8_t url_body_len, uint8_t suffix);
|
||||||
@@ -61,4 +107,8 @@ int ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @}
|
||||||
|
*/
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -105,21 +105,6 @@ ble_eddystone_set_adv_data_gen(struct ble_hs_adv_fields *adv_fields,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Configures the device to advertise eddystone UID beacons.
|
|
||||||
*
|
|
||||||
* @param adv_fields The base advertisement fields to transform into
|
|
||||||
* an eddystone beacon. All configured fields
|
|
||||||
* are preserved; you probably want to clear
|
|
||||||
* this struct before calling this function.
|
|
||||||
* @param uid The 16-byte UID to advertise.
|
|
||||||
*
|
|
||||||
* @return 0 on success;
|
|
||||||
* BLE_HS_EBUSY if advertising is in progress;
|
|
||||||
* BLE_HS_EMSGSIZE if the specified data is too
|
|
||||||
* large to fit in an advertisement;
|
|
||||||
* Other nonzero on failure.
|
|
||||||
*/
|
|
||||||
int
|
int
|
||||||
ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields, void *uid)
|
ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields, void *uid)
|
||||||
{
|
{
|
||||||
@@ -152,29 +137,6 @@ ble_eddystone_set_adv_data_uid(struct ble_hs_adv_fields *adv_fields, void *uid)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Configures the device to advertise eddystone URL beacons.
|
|
||||||
*
|
|
||||||
* @param adv_fields The base advertisement fields to transform into
|
|
||||||
* an eddystone beacon. All configured fields
|
|
||||||
* are preserved; you probably want to clear
|
|
||||||
* this struct before calling this function.
|
|
||||||
* @param url_scheme The prefix of the URL; one of the
|
|
||||||
* BLE_EDDYSTONE_URL_SCHEME values.
|
|
||||||
* @param url_body The middle of the URL. Don't include the
|
|
||||||
* suffix if there is a suitable suffix code.
|
|
||||||
* @param url_body_len The string length of the url_body argument.
|
|
||||||
* @param url_suffix The suffix of the URL; one of the
|
|
||||||
* BLE_EDDYSTONE_URL_SUFFIX values; use
|
|
||||||
* BLE_EDDYSTONE_URL_SUFFIX_NONE if the suffix
|
|
||||||
* is embedded in the body argument.
|
|
||||||
*
|
|
||||||
* @return 0 on success;
|
|
||||||
* BLE_HS_EBUSY if advertising is in progress;
|
|
||||||
* BLE_HS_EMSGSIZE if the specified data is too
|
|
||||||
* large to fit in an advertisement;
|
|
||||||
* Other nonzero on failure.
|
|
||||||
*/
|
|
||||||
int
|
int
|
||||||
ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
|
ble_eddystone_set_adv_data_url(struct ble_hs_adv_fields *adv_fields,
|
||||||
uint8_t url_scheme, char *url_body,
|
uint8_t url_scheme, char *url_body,
|
||||||
|
|||||||
Reference in New Issue
Block a user