nimble: Allow to define offset for HCI VS commands

This allows to tune starting offset for NimBLE VS HCI commands.
This commit is contained in:
Szymon Janc
2022-02-09 09:54:31 +01:00
parent 9f571c8dd7
commit a82be4f157
2 changed files with 9 additions and 2 deletions
+2 -2
View File
@@ -1063,7 +1063,7 @@ struct ble_hci_le_set_host_feat_cp {
/* --- Vendor specific commands (OGF 0x003F) */
/* Read Random Static Address */
#define BLE_HCI_OCF_VS_RD_STATIC_ADDR (0x0001)
#define BLE_HCI_OCF_VS_RD_STATIC_ADDR (MYNEWT_VAL(BLE_HCI_VS_OCF_OFFSET) + (0x0001))
struct ble_hci_vs_rd_static_addr_rp {
uint8_t addr[6];
} __attribute__((packed));
@@ -1071,7 +1071,7 @@ struct ble_hci_vs_rd_static_addr_rp {
/* Set default transmit power. Actual selected TX power is returned
* in reply. Setting 0xff restores controller reset default.
*/
#define BLE_HCI_OCF_VS_SET_TX_PWR (0x0002)
#define BLE_HCI_OCF_VS_SET_TX_PWR (MYNEWT_VAL(BLE_HCI_VS_OCF_OFFSET) + (0x0002))
struct ble_hci_vs_set_tx_pwr_cp {
int8_t tx_power;
} __attribute__((packed));
+7
View File
@@ -101,6 +101,13 @@ syscfg.defs:
Enables support for NimBLE specific vendor HCI commands
value: 0
BLE_HCI_VS_OCF_OFFSET:
description: >
This defines starting offset for NimBLE specific vendor HCI commands.
Purpose of this is to improve compatibility with other custom
implementations.
value: 0
# Allow periodic sync transfer only if 5.1 or higher
syscfg.restrictions:
- "'BLE_PERIODIC_ADV_SYNC_TRANSFER == 0' || 'BLE_VERSION >= 51'"