Bluetooth: controller: LE Advertising Extensions PDU structs
Add Bluetooth v5.0 LE Advertising Extensions air interface packet structures. Jira: ZEP-2073 Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
05af2424b2
commit
51d6bdb2ff
5 changed files with 82 additions and 1 deletions
|
@ -136,6 +136,8 @@ config BLUETOOTH_CONTROLLER_PHY
|
|||
Enable support for Bluetooth 5.0 PHY Update Procedure in the
|
||||
Controller.
|
||||
|
||||
endif # BLUETOOTH_CONN
|
||||
|
||||
config BLUETOOTH_CONTROLLER_CHAN_SEL_2
|
||||
bool "Channel Selection Algorithm #2"
|
||||
default y
|
||||
|
@ -143,7 +145,14 @@ config BLUETOOTH_CONTROLLER_CHAN_SEL_2
|
|||
Enable support for Bluetooth 5.0 LE Channel Selection Algorithm #2 in
|
||||
the Controller.
|
||||
|
||||
endif # BLUETOOTH_CONN
|
||||
config BLUETOOTH_CONTROLLER_ADV_EXT
|
||||
bool "LE Advertising Extensions"
|
||||
select BLUETOOTH_CONTROLLER_SCAN_REQ_NOTIFY
|
||||
select BLUETOOTH_CONTROLLER_CHAN_SEL_2
|
||||
default y
|
||||
help
|
||||
Enable support for Bluetooth 5.0 LE Advertising Extensions in the
|
||||
Controller.
|
||||
|
||||
config BLUETOOTH_CONTROLLER_ADVANCED_FEATURES
|
||||
bool "Show advanced features"
|
||||
|
|
|
@ -53,6 +53,71 @@ struct pdu_adv_payload_connect_ind {
|
|||
} __packed lldata;
|
||||
} __packed;
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT)
|
||||
struct pdu_adv_payload_com_ext_adv {
|
||||
u8_t ext_hdr_len:6;
|
||||
u8_t adv_mode:2;
|
||||
u8_t ext_hdr_adi_adv_data[254];
|
||||
} __packed;
|
||||
|
||||
enum ext_adv_mode {
|
||||
EXT_ADV_MODE_NON_CONN_NON_SCAN = 0x00,
|
||||
EXT_ADV_MODE_CONN_NON_SCAN = 0x01,
|
||||
EXT_ADV_MODE_NON_CONN_SCAN = 0x02,
|
||||
};
|
||||
|
||||
struct ext_adv_hdr {
|
||||
u8_t adv_addr:1;
|
||||
u8_t tgt_addr:1;
|
||||
u8_t rfu0:1;
|
||||
u8_t adi:1;
|
||||
u8_t aux_ptr:1;
|
||||
u8_t sync_info:1;
|
||||
u8_t tx_pwr:1;
|
||||
u8_t rfu1:1;
|
||||
} __packed;
|
||||
|
||||
struct ext_adv_adi {
|
||||
u16_t did:12;
|
||||
u16_t sid:4;
|
||||
} __packed;
|
||||
|
||||
struct ext_adv_aux_ptr {
|
||||
u8_t chan_idx:6;
|
||||
u8_t ca:1;
|
||||
u8_t offs_units:1;
|
||||
u16_t offs:13;
|
||||
u16_t phy:3;
|
||||
} __packed;
|
||||
|
||||
enum ext_adv_aux_ptr_ca {
|
||||
EXT_ADV_AUX_PTR_CA_500_PPM = 0x00,
|
||||
EXT_ADV_AUX_PTR_CA_50_PPM = 0x01,
|
||||
};
|
||||
|
||||
enum ext_adv_offs_units {
|
||||
EXT_ADV_AUX_PTR_OFFS_UNITS_30 = 0x00,
|
||||
EXT_ADV_AUX_PTR_OFFS_UNITS_300 = 0x01,
|
||||
};
|
||||
|
||||
enum ext_adv_aux_phy {
|
||||
EXT_ADV_AUX_PHY_LE_1M = 0x00,
|
||||
EXT_ADV_AUX_PHY_LE_2M = 0x01,
|
||||
EXT_ADV_AUX_PHY_LE_COD = 0x02,
|
||||
};
|
||||
|
||||
struct ext_adv_sync_info {
|
||||
u16_t sync_pkt_offs:13;
|
||||
u16_t offs_units:1;
|
||||
u16_t rfu:2;
|
||||
u16_t interval;
|
||||
u8_t sca_chm[5];
|
||||
u32_t aa;
|
||||
u8_t crc_init[3];
|
||||
u16_t evt_cntr;
|
||||
} __packed;
|
||||
#endif /* CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT */
|
||||
|
||||
enum pdu_adv_type {
|
||||
PDU_ADV_TYPE_ADV_IND = 0x00,
|
||||
PDU_ADV_TYPE_DIRECT_IND = 0x01,
|
||||
|
@ -86,6 +151,10 @@ struct pdu_adv {
|
|||
struct pdu_adv_payload_scan_req scan_req;
|
||||
struct pdu_adv_payload_scan_rsp scan_rsp;
|
||||
struct pdu_adv_payload_connect_ind connect_ind;
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT)
|
||||
struct pdu_adv_payload_com_ext_adv adv_ext_ind;
|
||||
#endif /* CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT */
|
||||
} __packed payload;
|
||||
} __packed;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_BLUETOOTH_CONTROLLER_LE_PING=n
|
|||
CONFIG_BLUETOOTH_CONTROLLER_DATA_LENGTH=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_PHY=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_CHAN_SEL_2=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_TIFS_HW=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_FAST_ENC=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_CONN_RSSI=n
|
||||
|
|
|
@ -12,6 +12,7 @@ CONFIG_BLUETOOTH_CONTROLLER_PHY_2M=y
|
|||
CONFIG_BLUETOOTH_CONTROLLER_PHY_2M_NRF=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_PHY_CODED=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_CHAN_SEL_2=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_TIFS_HW=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_FAST_ENC=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_CONN_RSSI=y
|
||||
|
|
|
@ -9,6 +9,7 @@ CONFIG_BLUETOOTH_CONTROLLER_LE_PING=n
|
|||
CONFIG_BLUETOOTH_CONTROLLER_DATA_LENGTH=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_PHY=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_CHAN_SEL_2=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_ADV_EXT=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_TIFS_HW=y
|
||||
CONFIG_BLUETOOTH_CONTROLLER_FAST_ENC=n
|
||||
CONFIG_BLUETOOTH_CONTROLLER_CONN_RSSI=n
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue