12#ifndef ZEPHYR_INCLUDE_BLUETOOTH_DATA_H_
13#define ZEPHYR_INCLUDE_BLUETOOTH_DATA_H_
31#define BT_DATA_SERIALIZED_SIZE(data_len) ((data_len) + 2)
59#define BT_DATA(_type, _data, _data_len) \
62 .data_len = (_data_len), \
63 .data = (const uint8_t *)(_data), \
75#define BT_DATA_BYTES(_type, _bytes...) \
76 BT_DATA(_type, ((uint8_t []) { _bytes }), \
77 sizeof((uint8_t []) { _bytes }))
size_t bt_data_serialize(const struct bt_data *input, uint8_t *output)
Serialize a bt_data struct into an advertising structure (a flat array).
size_t bt_data_get_len(const struct bt_data data[], size_t data_count)
Get the total size (in octets) of a given set of bt_data structures.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Bluetooth data.
Definition data.h:40
uint8_t type
Type of scan response data or advertisement data.
Definition data.h:42
uint8_t data_len
Length of scan response data or advertisement data.
Definition data.h:44
const uint8_t * data
Pointer to Scan response or advertisement data.
Definition data.h:46