API documentation

Header file: lib/bin/bt_ll_acs_nrf53/include/ble_hci_vsc.h
Source files: lib/bin/bt_ll_acs_nrf53/src/ble_hci_vsc.c
group ble_hci_vsc_api

Defines

HCI_OPCODE_VS_SET_PRI_ADV_CHAN_MAX_TX_PWR
HCI_OPCODE_VS_SET_LED_PIN_MAP
HCI_OPCODE_VS_CONFIG_FEM_PIN
HCI_OPCODE_VS_SET_RADIO_FE_CFG
HCI_OPCODE_VS_SET_BD_ADDR
HCI_OPCODE_VS_SET_OP_FLAGS
HCI_OPCODE_VS_SET_ADV_TX_PWR
HCI_OPCODE_VS_SET_CONN_TX_PWR
BLE_HCI_VSC_OP_ISO_LOST_NOTIFY
BLE_HCI_VSC_OP_DIS_POWER_MONITOR

Enums

enum ble_hci_vs_max_tx_power

Host-Controller Interface vendor-specific connection max TX power values.

Values:

enumerator BLE_HCI_VSC_MAX_TX_PWR_0dBm
enumerator BLE_HCI_VSC_MAX_TX_PWR_3dBm
enumerator BLE_HCI_VSC_MAX_TX_PWR_10dBm
enumerator BLE_HCI_VSC_MAX_TX_PWR_20dBm
enum ble_hci_vs_tx_power

Host-Controller Interface vendor-specific connection TX power values.

Values:

enumerator BLE_HCI_VSC_TX_PWR_0dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg1dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg2dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg3dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg4dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg5dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg6dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg7dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg8dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg12dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg16dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg20dBm
enumerator BLE_HCI_VSC_TX_PWR_Neg40dBm
enumerator BLE_HCI_VSC_PRI_EXT_ADV_MAX_TX_PWR_DISABLE
enum ble_hci_vs_led_function_id

Host-Controller Interface vendor-specific LED functions.

Values:

enumerator PAL_LED_ID_CPU_ACTIVE
enumerator PAL_LED_ID_ERROR
enumerator PAL_LED_ID_BLE_TX
enumerator PAL_LED_ID_BLE_RX
enum ble_hci_vs_led_function_mode

Host-Controller Interface vendor-specific LED modes of operation.

Values:

enumerator PAL_LED_MODE_ACTIVE_LOW
enumerator PAL_LED_MODE_ACTIVE_HIGH
enumerator PAL_LED_MODE_DISABLE_TOGGLE

Functions

int ble_hci_vsc_nrf21540_pins_set(struct ble_hci_vs_cp_nrf21540_pins *nrf21540_pins)

Set the pins to be used by the nRF21540 Front End Module (FEM).

Parameters:
  • nrf21540_pins – Pointer to a struct containing the pins.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_radio_high_pwr_mode_set(enum ble_hci_vs_max_tx_power max_tx_power)

Enable VREGRADIO.VREQH in the network core for getting extra TX power.

Note

If the nRF21540 is not used, setting max_tx_power to 10 or 20 will result in +3 dBm.

Parameters:
  • max_tx_power – Max TX power to set.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_bd_addr_set(uint8_t *bd_addr)

Set Bluetooth MAC device address.

Note

This can be used to set a public address for the device. bt_setup_public_id_addr(void) should be called after this function to properly set the address.

Parameters:
  • bd_addr – Bluetooth MAC device address.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_op_flag_set(uint32_t flag_bit, uint8_t setting)

Set the controller operation mode flag.

Parameters:
  • flag_bit – The target bit in operation mode flag.

  • setting – The setting of the bit.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_adv_tx_pwr_set(enum ble_hci_vs_tx_power tx_power)

Set the advertising TX power.

Note

If extended advertising is used, the TX power for both the primary and secondary advertisement channels is changed. In other words, the TX power for all Bluetooth Low Energy channels is changed.

Parameters:
  • tx_power – TX power setting for the advertising. Check ble_hci_vs_tx_power for possible settings.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_conn_tx_pwr_set(uint16_t conn_handle, enum ble_hci_vs_tx_power tx_power)

Set TX power for specific connection.

Note

The TX power for the primary advertisement channels (37, 38 and 39) will not be affected.

Parameters:
  • conn_handle – Specific connection handle for the TX power setting.

  • tx_power – TX power setting for the specific connection handle. Check ble_hci_vs_tx_power for possible settings.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_pri_adv_chan_max_tx_pwr_set(enum ble_hci_vs_tx_power tx_power)

Set the maximum transmit power on primary advertising channels.

Note

BLE channels 37, 38 and 39 are the primary advertising channels.

Parameters:
  • tx_power – TX power setting for the primary advertising channels. Please check ble_hci_vs_tx_power for possible settings. Set to BLE_HCI_VSC_PRI_EXT_ADV_MAX_TX_PWR_DISABLE (-127) for disabling this feature.

Returns:

0 for success, error otherwise.

int ble_hci_vsc_led_pin_map(enum ble_hci_vs_led_function_id id, enum ble_hci_vs_led_function_mode mode, uint16_t pin)

Map LED pin to a specific controller function.

Only support for gpio0 (pin 0-31).

Parameters:
  • id – Describes the LED function. Please check ble_hci_vs_led_function_id for possible IDs.

  • mode – Describes how the pin is toggled. Please check ble_hci_vs_led_function_mode for possible modes.

  • pin – Pin designator of the GPIO.

Returns:

0 for success, error otherwise.

struct ble_hci_vs_cp_nrf21540_pins
#include <ble_hci_vsc.h>

nRF21540 Front End Module (FEM) pin definitions.

struct ble_hci_vs_rp_status
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific response data.

struct ble_hci_vs_cp_set_op_flag
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific structure for setting custom flags.

struct ble_hci_vs_cp_set_bd_addr
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific Bluetooth address.

struct ble_hci_vs_cp_set_adv_tx_pwr
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific advertising TX power.

struct ble_hci_vs_cp_set_conn_tx_pwr
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific connection TX power.

struct ble_hci_vs_cp_set_led_pin_map
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific LED pin mapping.

struct ble_hci_vs_cp_set_radio_fe_cfg
#include <ble_hci_vsc.h>

Host-Controller Interface vendor-specific Front End Module (FEM) configuration.