Zephyr API Documentation  3.0.0
A Scalable Open Source RTOS
3.0.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Defines and Assigned Numbers

Bluetooth Generic Access Profile defines and Assigned Numbers. More...

Macros

#define BT_COMP_ID_LF   0x05f1 /* The Linux Foundation */
 
#define BT_DATA_FLAGS   0x01 /* AD flags */
 
#define BT_DATA_UUID16_SOME   0x02 /* 16-bit UUID, more available */
 
#define BT_DATA_UUID16_ALL   0x03 /* 16-bit UUID, all listed */
 
#define BT_DATA_UUID32_SOME   0x04 /* 32-bit UUID, more available */
 
#define BT_DATA_UUID32_ALL   0x05 /* 32-bit UUID, all listed */
 
#define BT_DATA_UUID128_SOME   0x06 /* 128-bit UUID, more available */
 
#define BT_DATA_UUID128_ALL   0x07 /* 128-bit UUID, all listed */
 
#define BT_DATA_NAME_SHORTENED   0x08 /* Shortened name */
 
#define BT_DATA_NAME_COMPLETE   0x09 /* Complete name */
 
#define BT_DATA_TX_POWER   0x0a /* Tx Power */
 
#define BT_DATA_SM_TK_VALUE   0x10 /* Security Manager TK Value */
 
#define BT_DATA_SM_OOB_FLAGS   0x11 /* Security Manager OOB Flags */
 
#define BT_DATA_SOLICIT16   0x14 /* Solicit UUIDs, 16-bit */
 
#define BT_DATA_SOLICIT128   0x15 /* Solicit UUIDs, 128-bit */
 
#define BT_DATA_SVC_DATA16   0x16 /* Service data, 16-bit UUID */
 
#define BT_DATA_GAP_APPEARANCE   0x19 /* GAP appearance */
 
#define BT_DATA_LE_BT_DEVICE_ADDRESS   0x1b /* LE Bluetooth Device Address */
 
#define BT_DATA_LE_ROLE   0x1c /* LE Role */
 
#define BT_DATA_SOLICIT32   0x1f /* Solicit UUIDs, 32-bit */
 
#define BT_DATA_SVC_DATA32   0x20 /* Service data, 32-bit UUID */
 
#define BT_DATA_SVC_DATA128   0x21 /* Service data, 128-bit UUID */
 
#define BT_DATA_LE_SC_CONFIRM_VALUE   0x22 /* LE SC Confirmation Value */
 
#define BT_DATA_LE_SC_RANDOM_VALUE   0x23 /* LE SC Random Value */
 
#define BT_DATA_URI   0x24 /* URI */
 
#define BT_DATA_LE_SUPPORTED_FEATURES   0x27 /* LE Supported Features */
 
#define BT_DATA_CHANNEL_MAP_UPDATE_IND   0x28 /* Channel Map Update Indication */
 
#define BT_DATA_MESH_PROV   0x29 /* Mesh Provisioning PDU */
 
#define BT_DATA_MESH_MESSAGE   0x2a /* Mesh Networking PDU */
 
#define BT_DATA_MESH_BEACON   0x2b /* Mesh Beacon */
 
#define BT_DATA_BIG_INFO   0x2c /* BIGInfo */
 
#define BT_DATA_BROADCAST_CODE   0x2d /* Broadcast Code */
 
#define BT_DATA_CSIS_RSI   0x2e /* CSIS Random Set ID type */
 
#define BT_DATA_MANUFACTURER_DATA   0xff /* Manufacturer Specific Data */
 
#define BT_LE_AD_LIMITED   0x01 /* Limited Discoverable */
 
#define BT_LE_AD_GENERAL   0x02 /* General Discoverable */
 
#define BT_LE_AD_NO_BREDR   0x04 /* BR/EDR not supported */
 
#define BT_GAP_SCAN_FAST_INTERVAL   0x0060 /* 60 ms */
 
#define BT_GAP_SCAN_FAST_WINDOW   0x0030 /* 30 ms */
 
#define BT_GAP_SCAN_SLOW_INTERVAL_1   0x0800 /* 1.28 s */
 
#define BT_GAP_SCAN_SLOW_WINDOW_1   0x0012 /* 11.25 ms */
 
#define BT_GAP_SCAN_SLOW_INTERVAL_2   0x1000 /* 2.56 s */
 
#define BT_GAP_SCAN_SLOW_WINDOW_2   0x0012 /* 11.25 ms */
 
#define BT_GAP_ADV_FAST_INT_MIN_1   0x0030 /* 30 ms */
 
#define BT_GAP_ADV_FAST_INT_MAX_1   0x0060 /* 60 ms */
 
#define BT_GAP_ADV_FAST_INT_MIN_2   0x00a0 /* 100 ms */
 
#define BT_GAP_ADV_FAST_INT_MAX_2   0x00f0 /* 150 ms */
 
#define BT_GAP_ADV_SLOW_INT_MIN   0x0640 /* 1 s */
 
#define BT_GAP_ADV_SLOW_INT_MAX   0x0780 /* 1.2 s */
 
#define BT_GAP_PER_ADV_FAST_INT_MIN_1   0x0018 /* 30 ms */
 
#define BT_GAP_PER_ADV_FAST_INT_MAX_1   0x0030 /* 60 ms */
 
#define BT_GAP_PER_ADV_FAST_INT_MIN_2   0x0050 /* 100 ms */
 
#define BT_GAP_PER_ADV_FAST_INT_MAX_2   0x0078 /* 150 ms */
 
#define BT_GAP_PER_ADV_SLOW_INT_MIN   0x0320 /* 1 s */
 
#define BT_GAP_PER_ADV_SLOW_INT_MAX   0x03C0 /* 1.2 s */
 
#define BT_GAP_INIT_CONN_INT_MIN   0x0018 /* 30 ms */
 
#define BT_GAP_INIT_CONN_INT_MAX   0x0028 /* 50 ms */
 
#define BT_GAP_ADV_MAX_ADV_DATA_LEN   31
 
#define BT_GAP_ADV_MAX_EXT_ADV_DATA_LEN   1650
 
#define BT_GAP_TX_POWER_INVALID   0x7f
 
#define BT_GAP_RSSI_INVALID   0x7f
 
#define BT_GAP_SID_INVALID   0xff
 
#define BT_GAP_NO_TIMEOUT   0x0000
 
#define BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT   128
 
#define BT_GAP_DATA_LEN_DEFAULT   0x001b /* 27 bytes */
 
#define BT_GAP_DATA_LEN_MAX   0x00fb /* 251 bytes */
 
#define BT_GAP_DATA_TIME_DEFAULT   0x0148 /* 328 us */
 
#define BT_GAP_DATA_TIME_MAX   0x4290 /* 17040 us */
 
#define BT_GAP_SID_MAX   0x0F
 
#define BT_GAP_PER_ADV_MAX_SKIP   0x01F3
 
#define BT_GAP_PER_ADV_MIN_TIMEOUT   0x000A
 
#define BT_GAP_PER_ADV_MAX_TIMEOUT   0x4000
 
#define BT_GAP_PER_ADV_MIN_INTERVAL   0x0006
 
#define BT_GAP_PER_ADV_MAX_INTERVAL   0xFFFF
 
#define BT_GAP_PER_ADV_INTERVAL_TO_MS(interval)   ((interval) * 5 / 4)
 Convert periodic advertising interval (N * 1.25 ms) to milliseconds. More...
 
#define BT_LE_SUPP_FEAT_40_ENCODE(w64)
 Encode 40 least significant bits of 64-bit LE Supported Features into array values in little-endian format. More...
 
#define BT_LE_SUPP_FEAT_32_ENCODE(w64)
 Encode 4 least significant bytes of 64-bit LE Supported Features into 4 bytes long array of values in little-endian format. More...
 
#define BT_LE_SUPP_FEAT_24_ENCODE(w64)
 Encode 3 least significant bytes of 64-bit LE Supported Features into 3 bytes long array of values in little-endian format. More...
 
#define BT_LE_SUPP_FEAT_16_ENCODE(w64)
 Encode 2 least significant bytes of 64-bit LE Supported Features into 2 bytes long array of values in little-endian format. More...
 
#define BT_LE_SUPP_FEAT_8_ENCODE(w64)    (((w64) >> 0) & 0xFF)
 Encode the least significant byte of 64-bit LE Supported Features into single byte long array. More...
 
#define BT_LE_SUPP_FEAT_VALIDATE(w64)
 Validate wheather LE Supported Features value does not use bits that are reserved for future use. More...
 

Enumerations

enum  { BT_GAP_LE_PHY_NONE = 0 , BT_GAP_LE_PHY_1M = BIT(0) , BT_GAP_LE_PHY_2M = BIT(1) , BT_GAP_LE_PHY_CODED = BIT(2) }
 
enum  {
  BT_GAP_ADV_TYPE_ADV_IND = 0x00 , BT_GAP_ADV_TYPE_ADV_DIRECT_IND = 0x01 , BT_GAP_ADV_TYPE_ADV_SCAN_IND = 0x02 , BT_GAP_ADV_TYPE_ADV_NONCONN_IND = 0x03 ,
  BT_GAP_ADV_TYPE_SCAN_RSP = 0x04 , BT_GAP_ADV_TYPE_EXT_ADV = 0x05
}
 
enum  {
  BT_GAP_ADV_PROP_CONNECTABLE = BIT(0) , BT_GAP_ADV_PROP_SCANNABLE = BIT(1) , BT_GAP_ADV_PROP_DIRECTED = BIT(2) , BT_GAP_ADV_PROP_SCAN_RESPONSE = BIT(3) ,
  BT_GAP_ADV_PROP_EXT_ADV = BIT(4)
}
 
enum  { BT_GAP_CTE_AOA = 0x00 , BT_GAP_CTE_AOD_1US = 0x01 , BT_GAP_CTE_AOD_2US = 0x02 , BT_GAP_CTE_NONE = 0xFF }
 
enum  {
  BT_GAP_SCA_UNKNOWN = 0 , BT_GAP_SCA_251_500 = 0 , BT_GAP_SCA_151_250 = 1 , BT_GAP_SCA_101_150 = 2 ,
  BT_GAP_SCA_76_100 = 3 , BT_GAP_SCA_51_75 = 4 , BT_GAP_SCA_31_50 = 5 , BT_GAP_SCA_21_30 = 6 ,
  BT_GAP_SCA_0_20 = 7
}
 Peripheral sleep clock accuracy (SCA) in ppm (parts per million) More...
 

Detailed Description

Bluetooth Generic Access Profile defines and Assigned Numbers.

Macro Definition Documentation

◆ BT_COMP_ID_LF

#define BT_COMP_ID_LF   0x05f1 /* The Linux Foundation */

#include <include/bluetooth/gap.h>

Company Identifiers (see Bluetooth Assigned Numbers)

◆ BT_DATA_BIG_INFO

#define BT_DATA_BIG_INFO   0x2c /* BIGInfo */

◆ BT_DATA_BROADCAST_CODE

#define BT_DATA_BROADCAST_CODE   0x2d /* Broadcast Code */

◆ BT_DATA_CHANNEL_MAP_UPDATE_IND

#define BT_DATA_CHANNEL_MAP_UPDATE_IND   0x28 /* Channel Map Update Indication */

◆ BT_DATA_CSIS_RSI

#define BT_DATA_CSIS_RSI   0x2e /* CSIS Random Set ID type */

◆ BT_DATA_FLAGS

#define BT_DATA_FLAGS   0x01 /* AD flags */

#include <include/bluetooth/gap.h>

EIR/AD data type definitions

◆ BT_DATA_GAP_APPEARANCE

#define BT_DATA_GAP_APPEARANCE   0x19 /* GAP appearance */

◆ BT_DATA_LE_BT_DEVICE_ADDRESS

#define BT_DATA_LE_BT_DEVICE_ADDRESS   0x1b /* LE Bluetooth Device Address */

◆ BT_DATA_LE_ROLE

#define BT_DATA_LE_ROLE   0x1c /* LE Role */

◆ BT_DATA_LE_SC_CONFIRM_VALUE

#define BT_DATA_LE_SC_CONFIRM_VALUE   0x22 /* LE SC Confirmation Value */

◆ BT_DATA_LE_SC_RANDOM_VALUE

#define BT_DATA_LE_SC_RANDOM_VALUE   0x23 /* LE SC Random Value */

◆ BT_DATA_LE_SUPPORTED_FEATURES

#define BT_DATA_LE_SUPPORTED_FEATURES   0x27 /* LE Supported Features */

◆ BT_DATA_MANUFACTURER_DATA

#define BT_DATA_MANUFACTURER_DATA   0xff /* Manufacturer Specific Data */

◆ BT_DATA_MESH_BEACON

#define BT_DATA_MESH_BEACON   0x2b /* Mesh Beacon */

◆ BT_DATA_MESH_MESSAGE

#define BT_DATA_MESH_MESSAGE   0x2a /* Mesh Networking PDU */

◆ BT_DATA_MESH_PROV

#define BT_DATA_MESH_PROV   0x29 /* Mesh Provisioning PDU */

◆ BT_DATA_NAME_COMPLETE

#define BT_DATA_NAME_COMPLETE   0x09 /* Complete name */

◆ BT_DATA_NAME_SHORTENED

#define BT_DATA_NAME_SHORTENED   0x08 /* Shortened name */

◆ BT_DATA_SM_OOB_FLAGS

#define BT_DATA_SM_OOB_FLAGS   0x11 /* Security Manager OOB Flags */

◆ BT_DATA_SM_TK_VALUE

#define BT_DATA_SM_TK_VALUE   0x10 /* Security Manager TK Value */

◆ BT_DATA_SOLICIT128

#define BT_DATA_SOLICIT128   0x15 /* Solicit UUIDs, 128-bit */

◆ BT_DATA_SOLICIT16

#define BT_DATA_SOLICIT16   0x14 /* Solicit UUIDs, 16-bit */

◆ BT_DATA_SOLICIT32

#define BT_DATA_SOLICIT32   0x1f /* Solicit UUIDs, 32-bit */

◆ BT_DATA_SVC_DATA128

#define BT_DATA_SVC_DATA128   0x21 /* Service data, 128-bit UUID */

◆ BT_DATA_SVC_DATA16

#define BT_DATA_SVC_DATA16   0x16 /* Service data, 16-bit UUID */

◆ BT_DATA_SVC_DATA32

#define BT_DATA_SVC_DATA32   0x20 /* Service data, 32-bit UUID */

◆ BT_DATA_TX_POWER

#define BT_DATA_TX_POWER   0x0a /* Tx Power */

◆ BT_DATA_URI

#define BT_DATA_URI   0x24 /* URI */

◆ BT_DATA_UUID128_ALL

#define BT_DATA_UUID128_ALL   0x07 /* 128-bit UUID, all listed */

◆ BT_DATA_UUID128_SOME

#define BT_DATA_UUID128_SOME   0x06 /* 128-bit UUID, more available */

◆ BT_DATA_UUID16_ALL

#define BT_DATA_UUID16_ALL   0x03 /* 16-bit UUID, all listed */

◆ BT_DATA_UUID16_SOME

#define BT_DATA_UUID16_SOME   0x02 /* 16-bit UUID, more available */

◆ BT_DATA_UUID32_ALL

#define BT_DATA_UUID32_ALL   0x05 /* 32-bit UUID, all listed */

◆ BT_DATA_UUID32_SOME

#define BT_DATA_UUID32_SOME   0x04 /* 32-bit UUID, more available */

◆ BT_GAP_ADV_FAST_INT_MAX_1

#define BT_GAP_ADV_FAST_INT_MAX_1   0x0060 /* 60 ms */

◆ BT_GAP_ADV_FAST_INT_MAX_2

#define BT_GAP_ADV_FAST_INT_MAX_2   0x00f0 /* 150 ms */

◆ BT_GAP_ADV_FAST_INT_MIN_1

#define BT_GAP_ADV_FAST_INT_MIN_1   0x0030 /* 30 ms */

◆ BT_GAP_ADV_FAST_INT_MIN_2

#define BT_GAP_ADV_FAST_INT_MIN_2   0x00a0 /* 100 ms */

◆ BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT

#define BT_GAP_ADV_HIGH_DUTY_CYCLE_MAX_TIMEOUT   128

◆ BT_GAP_ADV_MAX_ADV_DATA_LEN

#define BT_GAP_ADV_MAX_ADV_DATA_LEN   31

#include <include/bluetooth/gap.h>

Maximum advertising data length.

◆ BT_GAP_ADV_MAX_EXT_ADV_DATA_LEN

#define BT_GAP_ADV_MAX_EXT_ADV_DATA_LEN   1650

#include <include/bluetooth/gap.h>

Maximum extended advertising data length.

Note
The maximum advertising data length that can be sent by an extended advertiser is defined by the controller.

◆ BT_GAP_ADV_SLOW_INT_MAX

#define BT_GAP_ADV_SLOW_INT_MAX   0x0780 /* 1.2 s */

◆ BT_GAP_ADV_SLOW_INT_MIN

#define BT_GAP_ADV_SLOW_INT_MIN   0x0640 /* 1 s */

◆ BT_GAP_DATA_LEN_DEFAULT

#define BT_GAP_DATA_LEN_DEFAULT   0x001b /* 27 bytes */

◆ BT_GAP_DATA_LEN_MAX

#define BT_GAP_DATA_LEN_MAX   0x00fb /* 251 bytes */

◆ BT_GAP_DATA_TIME_DEFAULT

#define BT_GAP_DATA_TIME_DEFAULT   0x0148 /* 328 us */

◆ BT_GAP_DATA_TIME_MAX

#define BT_GAP_DATA_TIME_MAX   0x4290 /* 17040 us */

◆ BT_GAP_INIT_CONN_INT_MAX

#define BT_GAP_INIT_CONN_INT_MAX   0x0028 /* 50 ms */

◆ BT_GAP_INIT_CONN_INT_MIN

#define BT_GAP_INIT_CONN_INT_MIN   0x0018 /* 30 ms */

◆ BT_GAP_NO_TIMEOUT

#define BT_GAP_NO_TIMEOUT   0x0000

◆ BT_GAP_PER_ADV_FAST_INT_MAX_1

#define BT_GAP_PER_ADV_FAST_INT_MAX_1   0x0030 /* 60 ms */

◆ BT_GAP_PER_ADV_FAST_INT_MAX_2

#define BT_GAP_PER_ADV_FAST_INT_MAX_2   0x0078 /* 150 ms */

◆ BT_GAP_PER_ADV_FAST_INT_MIN_1

#define BT_GAP_PER_ADV_FAST_INT_MIN_1   0x0018 /* 30 ms */

◆ BT_GAP_PER_ADV_FAST_INT_MIN_2

#define BT_GAP_PER_ADV_FAST_INT_MIN_2   0x0050 /* 100 ms */

◆ BT_GAP_PER_ADV_INTERVAL_TO_MS

#define BT_GAP_PER_ADV_INTERVAL_TO_MS (   interval)    ((interval) * 5 / 4)

#include <include/bluetooth/gap.h>

Convert periodic advertising interval (N * 1.25 ms) to milliseconds.

5 / 4 represents 1.25 ms unit.

◆ BT_GAP_PER_ADV_MAX_INTERVAL

#define BT_GAP_PER_ADV_MAX_INTERVAL   0xFFFF

#include <include/bluetooth/gap.h>

Maximum Periodic Advertising Interval (N * 1.25 ms)

◆ BT_GAP_PER_ADV_MAX_SKIP

#define BT_GAP_PER_ADV_MAX_SKIP   0x01F3

◆ BT_GAP_PER_ADV_MAX_TIMEOUT

#define BT_GAP_PER_ADV_MAX_TIMEOUT   0x4000

◆ BT_GAP_PER_ADV_MIN_INTERVAL

#define BT_GAP_PER_ADV_MIN_INTERVAL   0x0006

#include <include/bluetooth/gap.h>

Minimum Periodic Advertising Interval (N * 1.25 ms)

◆ BT_GAP_PER_ADV_MIN_TIMEOUT

#define BT_GAP_PER_ADV_MIN_TIMEOUT   0x000A

◆ BT_GAP_PER_ADV_SLOW_INT_MAX

#define BT_GAP_PER_ADV_SLOW_INT_MAX   0x03C0 /* 1.2 s */

◆ BT_GAP_PER_ADV_SLOW_INT_MIN

#define BT_GAP_PER_ADV_SLOW_INT_MIN   0x0320 /* 1 s */

◆ BT_GAP_RSSI_INVALID

#define BT_GAP_RSSI_INVALID   0x7f

◆ BT_GAP_SCAN_FAST_INTERVAL

#define BT_GAP_SCAN_FAST_INTERVAL   0x0060 /* 60 ms */

◆ BT_GAP_SCAN_FAST_WINDOW

#define BT_GAP_SCAN_FAST_WINDOW   0x0030 /* 30 ms */

◆ BT_GAP_SCAN_SLOW_INTERVAL_1

#define BT_GAP_SCAN_SLOW_INTERVAL_1   0x0800 /* 1.28 s */

◆ BT_GAP_SCAN_SLOW_INTERVAL_2

#define BT_GAP_SCAN_SLOW_INTERVAL_2   0x1000 /* 2.56 s */

◆ BT_GAP_SCAN_SLOW_WINDOW_1

#define BT_GAP_SCAN_SLOW_WINDOW_1   0x0012 /* 11.25 ms */

◆ BT_GAP_SCAN_SLOW_WINDOW_2

#define BT_GAP_SCAN_SLOW_WINDOW_2   0x0012 /* 11.25 ms */

◆ BT_GAP_SID_INVALID

#define BT_GAP_SID_INVALID   0xff

◆ BT_GAP_SID_MAX

#define BT_GAP_SID_MAX   0x0F

◆ BT_GAP_TX_POWER_INVALID

#define BT_GAP_TX_POWER_INVALID   0x7f

◆ BT_LE_AD_GENERAL

#define BT_LE_AD_GENERAL   0x02 /* General Discoverable */

◆ BT_LE_AD_LIMITED

#define BT_LE_AD_LIMITED   0x01 /* Limited Discoverable */

◆ BT_LE_AD_NO_BREDR

#define BT_LE_AD_NO_BREDR   0x04 /* BR/EDR not supported */

◆ BT_LE_SUPP_FEAT_16_ENCODE

#define BT_LE_SUPP_FEAT_16_ENCODE (   w64)

#include <include/bluetooth/gap.h>

Value:
(((w64) >> 0) & 0xFF), \
(((w64) >> 8) & 0xFF),

Encode 2 least significant bytes of 64-bit LE Supported Features into 2 bytes long array of values in little-endian format.

Helper macro to encode 64-bit LE Supported Features value into advertising data. The macro encodes 3 least significant bytes into advertising data. Other 6 bytes are not encoded.

Example of how to encode the 0x000000DFF00DF00D into advertising data.

#define BT_DATA_LE_SUPPORTED_FEATURES
Definition: gap.h:53
#define BT_LE_SUPP_FEAT_16_ENCODE(w64)
Encode 2 least significant bytes of 64-bit LE Supported Features into 2 bytes long array of values in...
Definition: gap.h:291
#define BT_DATA_BYTES(_type, _bytes...)
Helper to declare elements of bt_data arrays.
Definition: bluetooth.h:325
Parameters
w64LE Supported Features value (64-bits)
Returns
The comma separated values for LE Supported Features value that may be used directly as an argument for BT_DATA_BYTES.

◆ BT_LE_SUPP_FEAT_24_ENCODE

#define BT_LE_SUPP_FEAT_24_ENCODE (   w64)

#include <include/bluetooth/gap.h>

Value:
(((w64) >> 0) & 0xFF), \
(((w64) >> 8) & 0xFF), \
(((w64) >> 16) & 0xFF),

Encode 3 least significant bytes of 64-bit LE Supported Features into 3 bytes long array of values in little-endian format.

Helper macro to encode 64-bit LE Supported Features value into advertising data. The macro encodes 3 least significant bytes into advertising data. Other 5 bytes are not encoded.

Example of how to encode the 0x000000DFF00DF00D into advertising data.

#define BT_LE_SUPP_FEAT_24_ENCODE(w64)
Encode 3 least significant bytes of 64-bit LE Supported Features into 3 bytes long array of values in...
Definition: gap.h:267
Parameters
w64LE Supported Features value (64-bits)
Returns
The comma separated values for LE Supported Features value that may be used directly as an argument for BT_DATA_BYTES.

◆ BT_LE_SUPP_FEAT_32_ENCODE

#define BT_LE_SUPP_FEAT_32_ENCODE (   w64)

#include <include/bluetooth/gap.h>

Value:
(((w64) >> 0) & 0xFF), \
(((w64) >> 8) & 0xFF), \
(((w64) >> 16) & 0xFF), \
(((w64) >> 24) & 0xFF)

Encode 4 least significant bytes of 64-bit LE Supported Features into 4 bytes long array of values in little-endian format.

Helper macro to encode 64-bit LE Supported Features value into advertising data. The macro encodes 4 least significant bytes into advertising data. Other 4 bytes are not encoded.

Example of how to encode the 0x000000DFF00DF00D into advertising data.

#define BT_LE_SUPP_FEAT_32_ENCODE(w64)
Encode 4 least significant bytes of 64-bit LE Supported Features into 4 bytes long array of values in...
Definition: gap.h:242
Parameters
w64LE Supported Features value (64-bits)
Returns
The comma separated values for LE Supported Features value that may be used directly as an argument for BT_DATA_BYTES.

◆ BT_LE_SUPP_FEAT_40_ENCODE

#define BT_LE_SUPP_FEAT_40_ENCODE (   w64)

#include <include/bluetooth/gap.h>

Value:
(((w64) >> 0) & 0xFF), \
(((w64) >> 8) & 0xFF), \
(((w64) >> 16) & 0xFF), \
(((w64) >> 24) & 0xFF), \
(((w64) >> 32) & 0xFF)

Encode 40 least significant bits of 64-bit LE Supported Features into array values in little-endian format.

Helper macro to encode 40 least significant bits of 64-bit LE Supported Features value into advertising data. The number of bits that are encoded is a number of LE Supported Features defined by BT 5.3 Core specification.

Example of how to encode the 0x000000DFF00DF00D into advertising data.

#define BT_LE_SUPP_FEAT_40_ENCODE(w64)
Encode 40 least significant bits of 64-bit LE Supported Features into array values in little-endian f...
Definition: gap.h:217
Parameters
w64LE Supported Features value (64-bits)
Returns
The comma separated values for LE Supported Features value that may be used directly as an argument for BT_DATA_BYTES.

◆ BT_LE_SUPP_FEAT_8_ENCODE

#define BT_LE_SUPP_FEAT_8_ENCODE (   w64)     (((w64) >> 0) & 0xFF)

#include <include/bluetooth/gap.h>

Encode the least significant byte of 64-bit LE Supported Features into single byte long array.

Helper macro to encode 64-bit LE Supported Features value into advertising data. The macro encodes the least significant byte into advertising data. Other 7 bytes are not encoded.

Example of how to encode the 0x000000DFF00DF00D into advertising data.

#define BT_LE_SUPP_FEAT_8_ENCODE(w64)
Encode the least significant byte of 64-bit LE Supported Features into single byte long array.
Definition: gap.h:314
Parameters
w64LE Supported Features value (64-bits)
Returns
The value of least significant byte of LE Supported Features value that may be used directly as an argument for BT_DATA_BYTES.

◆ BT_LE_SUPP_FEAT_VALIDATE

#define BT_LE_SUPP_FEAT_VALIDATE (   w64)

#include <include/bluetooth/gap.h>

Value:
BUILD_ASSERT(!((w64) & (~BIT64_MASK(40))), \
"RFU bit in LE Supported Features are not zeros.")
#define BIT64_MASK(n)
64-bit bit mask with bits 0 through n-1 (inclusive) set, or 0 if n is 0.
Definition: util_macro.h:74

Validate wheather LE Supported Features value does not use bits that are reserved for future use.

Helper macro to check if w64 has zeros as bits 40-63. The macro is compliant with BT 5.3 Core Specifiaction where bits 0-40 has assigned values. In case of invalid value, build time error is reported.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

#include <include/bluetooth/gap.h>

LE PHY types

Enumerator
BT_GAP_LE_PHY_NONE 

Convenience macro for when no PHY is set.

BT_GAP_LE_PHY_1M 

LE 1M PHY

BT_GAP_LE_PHY_2M 

LE 2M PHY

BT_GAP_LE_PHY_CODED 

LE Coded PHY

◆ anonymous enum

anonymous enum

#include <include/bluetooth/gap.h>

Advertising PDU types

Enumerator
BT_GAP_ADV_TYPE_ADV_IND 

Scannable and connectable advertising.

BT_GAP_ADV_TYPE_ADV_DIRECT_IND 

Directed connectable advertising.

BT_GAP_ADV_TYPE_ADV_SCAN_IND 

Non-connectable and scannable advertising.

BT_GAP_ADV_TYPE_ADV_NONCONN_IND 

Non-connectable and non-scannable advertising.

BT_GAP_ADV_TYPE_SCAN_RSP 

Additional advertising data requested by an active scanner.

BT_GAP_ADV_TYPE_EXT_ADV 

Extended advertising, see advertising properties.

◆ anonymous enum

anonymous enum

#include <include/bluetooth/gap.h>

Advertising PDU properties

Enumerator
BT_GAP_ADV_PROP_CONNECTABLE 

Connectable advertising.

BT_GAP_ADV_PROP_SCANNABLE 

Scannable advertising.

BT_GAP_ADV_PROP_DIRECTED 

Directed advertising.

BT_GAP_ADV_PROP_SCAN_RESPONSE 

Additional advertising data requested by an active scanner.

BT_GAP_ADV_PROP_EXT_ADV 

Extended advertising.

◆ anonymous enum

anonymous enum

#include <include/bluetooth/gap.h>

Constant Tone Extension (CTE) types

Enumerator
BT_GAP_CTE_AOA 

Angle of Arrival

BT_GAP_CTE_AOD_1US 

Angle of Departure with 1 us slots

BT_GAP_CTE_AOD_2US 

Angle of Departure with 2 us slots

BT_GAP_CTE_NONE 

No extensions

◆ anonymous enum

anonymous enum

#include <include/bluetooth/gap.h>

Peripheral sleep clock accuracy (SCA) in ppm (parts per million)

Enumerator
BT_GAP_SCA_UNKNOWN 
BT_GAP_SCA_251_500 
BT_GAP_SCA_151_250 
BT_GAP_SCA_101_150 
BT_GAP_SCA_76_100 
BT_GAP_SCA_51_75 
BT_GAP_SCA_31_50 
BT_GAP_SCA_21_30 
BT_GAP_SCA_0_20