/*****************************************************************************
 * @file    ble_hci_le.h
 * @brief   STM32WBA BLE API (HCI_LE)
 *          Auto-generated file: do not edit!
 *****************************************************************************
 * @attention
 *
 * Copyright (c) 2018-2025 STMicroelectronics.
 * All rights reserved.
 *
 * This software is licensed under terms that can be found in the LICENSE file
 * in the root directory of this software component.
 * If no LICENSE file comes with this software, it is provided AS-IS.
 *
 *****************************************************************************
 */

#ifndef BLE_HCI_LE_H__
#define BLE_HCI_LE_H__


#include "ble_types.h"

/**
 * @brief HCI_DISCONNECT
 * The HCI_DISCONNECT is used to terminate an existing connection. The
 * Connection_Handle command parameter indicates which connection is to be
 * disconnected. The Reason command parameter indicates the reason for ending
 * the connection. The remote Controller will receive the Reason command
 * parameter in the HCI_DISCONNECTION_COMPLETE_EVENT event. All synchronous
 * connections on a physical link should be disconnected before the ACL
 * connection on the same physical connection is disconnected.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.1.6].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Reason The reason for ending the connection.
 *        Values:
 *        - 0x05: Authentication Failure
 *        - 0x13: Remote User Terminated Connection
 *        - 0x14: Remote Device Terminated Connection due to Low Resources
 *        - 0x15: Remote Device Terminated Connection due to Power Off
 *        - 0x1A: Unsupported Remote Feature
 *        - 0x3B: Unacceptable Connection Parameters
 * @return Value indicating success or error code.
 */
tBleStatus hci_disconnect( uint16_t Connection_Handle,
                           uint8_t Reason );

/**
 * @brief HCI_READ_REMOTE_VERSION_INFORMATION
 * This command will obtain the values for the version information for the
 * remote device identified by the Connection_Handle parameter. The
 * Connection_Handle must be a Connection_Handle for an ACL or LE connection.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.1.23].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_remote_version_information( uint16_t Connection_Handle );

/**
 * @brief HCI_SET_EVENT_MASK
 * The Set_Event_Mask command is used to control which events are generated by
 * the HCI for the Host. If the bit in the Event_Mask is set to a one, then the
 * event associated with that bit will be enabled. For an LE Controller, the LE
 * Meta Event bit in the Event_Mask shall enable or disable all LE events in
 * the LE Meta Event. The Host has to deal with each event that occurs. The
 * event mask allows the Host to control how much it is interrupted.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.1].
 * 
 * @param Event_Mask Event mask. Default: 0x2000FFFFFFFFFFFF
 *        Flags:
 *        - 0x0000000000000000: No events specified
 *        - 0x0000000000000010: Disconnection Complete Event
 *        - 0x0000000000000080: Encryption Change Event
 *        - 0x0000000000000800: Read Remote Version Information Complete Event
 *        - 0x0000000000008000: Hardware Error Event
 *        - 0x0000000002000000: Data Buffer Overflow Event [not supported on
 *          STM32WB]
 *        - 0x0000800000000000: Encryption Key Refresh Complete Event
 *        - 0x2000000000000000: LE Meta-Event
 * @return Value indicating success or error code.
 */
tBleStatus hci_set_event_mask( const uint8_t* Event_Mask );

/**
 * @brief HCI_RESET
 * The Reset command resets the Link Layer on an LE Controller. The Reset
 * command shall not affect the used HCI transport layer since the HCI
 * transport layers may have reset mechanisms of their own. After the reset is
 * completed, the current operational state is lost, the Controller enters
 * standby mode and the Controller automatically reverts to the default values
 * for the parameters for which default values are defined in the
 * specification.
 * Note: The Reset command does not necessarily perform a hardware reset. This
 * is implementation defined.
 * The Host shall not send additional HCI commands before the Command Complete
 * event related to the Reset command has been received.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.2].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_reset( void );

/**
 * @brief HCI_READ_CONNECTION_ACCEPT_TIMEOUT
 * This command reads the value for the Connection Accept Timeout configuration
 * parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.13].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_connection_accept_timeout( uint16_t* Connection_Accept_Timeout );

/**
 * @brief HCI_WRITE_CONNECTION_ACCEPT_TIMEOUT
 * This command writes the value for the Connection Accept Timeout
 * configuration parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.14].
 * 
 * @param Connection_Accept_Timeout Connection Accept Timeout measured in
 *        number of baseband slots.
 *        Interval Length = N * 0.625 ms.
 *        Values:
 *        - 0x00A0 (100.000 ms)  ... 0xB540 (29000.000 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_write_connection_accept_timeout( uint16_t Connection_Accept_Timeout );

/**
 * @brief HCI_READ_TRANSMIT_POWER_LEVEL
 * This command reads the values for the Transmit_Power_Level parameter for the
 * specified Connection_Handle. The Connection_Handle shall be a
 * Connection_Handle for an ACL connection.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.35].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Type Current or maximum transmit power level.
 *        Values:
 *        - 0x00: Read Current Transmit Power Level.
 *        - 0x01: Read Maximum Transmit Power Level.
 * @param[out] Transmit_Power_Level Size: 1 Octet (signed integer).
 *        Units: dBm.
 *        Values:
 *        - -30 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_transmit_power_level( uint16_t Connection_Handle,
                                          uint8_t Type,
                                          uint8_t* Transmit_Power_Level );

/**
 * @brief HCI_SET_CONTROLLER_TO_HOST_FLOW_CONTROL
 * This command is used by the Host to turn flow control on or off for data
 * and/or voice sent in the direction from the Controller to the Host. If flow
 * control is turned off, the Host should not send the
 * Host_Number_Of_Completed_Packets command. That command will be ignored by
 * the Controller if it is sent by the Host and flow control is off. If flow
 * control is turned on for HCI ACL Data Packets and off for HCI synchronous
 * Data Packets, Host_Number_Of_Completed_Packets commands sent by the Host
 * should only contain Connection_Handles for ACL connections. If flow control
 * is turned off for HCI ACL Data Packets and on for HCI synchronous Data
 * Packets, Host_Number_Of_Completed_Packets commands sent by the Host should
 * only contain Connection_Handles for synchronous connections. If flow control
 * is turned on for HCI ACL Data Packets and HCI synchronous Data Packets, the
 * Host will send Host_Number_Of_Completed_Packets commands both for ACL
 * connections and synchronous connections.
 * The Flow_Control_Enable parameter shall only be changed if no connections
 * exist.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.38].
 * 
 * @param Flow_Control_Enable Enable/Disable the Flow Control
 *        Values:
 *        - 0x00: Flow control off in direction from Controller to Host.
 *          Default.
 *        - 0x01: Flow control on for HCI ACL Data Packets and off for HCI
 *          synchronous.Data Packets in direction from Controller to Host.
 *        - 0x02: Flow control off for HCI ACL Data Packets and on for HCI
 *          synchronous.Data Packets in direction from Controller to Host.
 *        - 0x03: Flow control on both for HCI ACL Data Packets and HCI
 *          synchronous.Data Packets in direction from Controller to Host.
 * @return Value indicating success or error code.
 */
tBleStatus hci_set_controller_to_host_flow_control( uint8_t Flow_Control_Enable );

/**
 * @brief HCI_HOST_BUFFER_SIZE
 * The Host_Buffer_Size command is used by the Host to notify the Controller
 * about the maximum size of the data portion of HCI ACL and synchronous Data
 * Packets sent from the Controller to the Host. The Controller shall segment
 * the data to be transmitted from the Controller to the Host according to
 * these sizes, so that the HCI Data Packets will contain data with up to these
 * sizes. The Host_Buffer_Size command also notifies the Controller about the
 * total number of HCI ACL and synchronous Data Packets that can be stored in
 * the data buffers of the Host. If flow control from the Controller to the
 * Host is turned off, and the Host_Buffer_Size command has not been issued by
 * the Host, this means that the Controller will send HCI Data Packets to the
 * Host with any lengths the Controller wants to use, and it is assumed that
 * the data buffer sizes of the Host are unlimited. If flow control from the
 * Controller to the Host is turned on, the Host_Buffer_Size command shall
 * after a power-on or a reset always be sent by the Host before the first
 * Host_Number_Of_Completed_Packets command is sent.
 * The Set Controller To Host Flow Control Command is used to turn flow control
 * on or off.
 * The Host_ACL_Data_Packet_Length command parameter will be used to determine
 * the size of the L2CAP segments contained in ACL Data Packets, which are
 * transferred from the Controller to the Host.
 * The Host_Synchronous_Data_Packet_Length command parameter is used to
 * determine the maximum size of HCI synchronous Data Packets. Both the Host
 * and the Controller shall support command and event packets, where the data
 * portion (excluding header) contained in the packets is 255 octets in size.
 * The Host_Total_Num_ACL_Data_Packets command parameter contains the total
 * number of HCI ACL Data Packets that can be stored in the data buffers of the
 * Host. The Controller will determine how the buffers are to be divided
 * between different Connection_Handles.
 * The Host_Total_Num_Synchronous_Data_Packets command parameter gives the same
 * information for HCI synchronous Data Packets.
 * Note: The Host_ACL_Data_Packet_Length and
 * Host_Synchronous_Data_Packet_Length command parameters do not include the
 * length of the HCI Data Packet header.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.39].
 * 
 * @param Host_ACL_Data_Packet_Length Maximum length (in octets) of the data
 *        portion of each HCI ACL Data Packet that the Host is able to accept.
 *        Values:
 *        - 251 ... 65535
 * @param Host_Synchronous_Data_Packet_Length Maximum length (in octets) of the
 *        data portion of each HCI synchronous Data Packet that the Host is
 *        able to accept. Not used.
 * @param Host_Total_Num_ACL_Data_Packets Total number of HCI ACL Data Packets
 *        that can be stored in the data buffers of the Host.
 *        Values:
 *        - 1 ... 65535
 * @param Host_Total_Num_Synchronous_Data_Packets Total number of HCI
 *        synchronous Data Packets that can be stored in the data buffers of
 *        the Host. Not used.
 * @return Value indicating success or error code.
 */
tBleStatus hci_host_buffer_size( uint16_t Host_ACL_Data_Packet_Length,
                                 uint8_t Host_Synchronous_Data_Packet_Length,
                                 uint16_t Host_Total_Num_ACL_Data_Packets,
                                 uint16_t Host_Total_Num_Synchronous_Data_Packets );

/**
 * @brief HCI_HOST_NUMBER_OF_COMPLETED_PACKETS
 * The Host_Number_Of_Completed_Packets command is used by the Host to indicate
 * to the Controller the number of HCI Data Packets that have been completed
 * for each Connection_Handle since the previous
 * Host_Number_Of_Completed_Packets command was sent to the Controller. This
 * means that the corresponding buffer space has been freed in the Host. Based
 * on this information, and the Host_Total_Num_ACL_Data_Packets and
 * Host_Total_Num_Synchronous_Data_Packets command parameters of the
 * Host_Buffer_Size command, the Controller can determine for which
 * Connection_Handles the following HCI Data Packets should be sent to the
 * Host. The command should only be issued by the Host if flow control in the
 * direction from the Controller to the Host is on and there is at least one
 * connection, or if the Controller is in local loopback mode. Otherwise, the
 * command will be ignored by the Controller. When the Host has completed one
 * or more HCI Data Packet(s) it shall send a Host_Number_Of_Completed_Packets
 * command to the Controller, until it finally reports that all pending HCI
 * Data Packets have been completed. The frequency at which this command is
 * sent is manufacturer specific.
 * The Set Controller To Host Flow Control Command is used to turn flow control
 * on or off. If flow control from the Controller to the Host is turned on, the
 * Host_Buffer_Size command shall always be sent by the Host after a power-on
 * or a reset before the first Host_Number_Of_Completed_Packets command is
 * sent.
 * Note: The Host_Number_Of_Completed_Packets command is a special command in
 * the sense that no event is normally generated after the command has
 * completed. The command may be sent at any time by the Host when there is at
 * least one connection, or if the Controller is in local loopback mode
 * independent of other commands. The normal flow control for commands is not
 * used for the Host_Number_Of_Completed_Packets command.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.40].
 * 
 * @param Number_Of_Handles The number of Connection_Handles and
 *        Host_Num_Of_Completed_Packets parameters pairs contained in this
 *        command.
 *        Values:
 *        - 0 ... 255
 * @param Host_Nb_Of_Completed_Pkt_Pair See @ref
 *        Host_Nb_Of_Completed_Pkt_Pair_t
 * @return Value indicating success or error code.
 */
tBleStatus hci_host_number_of_completed_packets( uint8_t Number_Of_Handles,
                                                 const Host_Nb_Of_Completed_Pkt_Pair_t* Host_Nb_Of_Completed_Pkt_Pair );

/**
 * @brief HCI_READ_AFH_CHANNEL_ASSESSMENT_MODE
 * This command reads the value for the AFH_Channel_Assessment_Mode parameter.
 * The AFH_Channel_Assessment_Mode parameter controls whether the Controller's
 * channel assessment scheme is enabled or disabled.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.53].
 * 
 * @param[out] AFH_Channel_Assessment_Mode Controller channel assessment
 *        enable/disable.
 *        Values:
 *        - 0x00: Controller channel assessment disabled
 *        - 0x01: Controller channel assessment enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_afh_channel_assessment_mode( uint8_t* AFH_Channel_Assessment_Mode );

/**
 * @brief HCI_WRITE_AFH_CHANNEL_ASSESSMENT_MODE
 * This command writes the value for the AFH_Channel_Assessment_Mode parameter.
 * The AFH_Channel_Assessment_Mode parameter controls whether the Controller's
 * channel assessment scheme is enabled or disabled.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.54].
 * 
 * @param AFH_Channel_Assessment_Mode Controller channel assessment
 *        enable/disable.
 *        Values:
 *        - 0x00: Controller channel assessment disabled
 *        - 0x01: Controller channel assessment enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_write_afh_channel_assessment_mode( uint8_t AFH_Channel_Assessment_Mode );

/**
 * @brief HCI_SET_EVENT_MASK_PAGE_2
 * The HCI_Set_Event_Mask_Page_2 command is used to control which events are
 * generated by the HCI for the Host. The Event_Mask_Page_2 is a logical
 * extension to the Event_Mask parameter of the HCI_Set_Event_Mask command.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.69].
 * 
 * @param Event_Mask_Page_2 Event mask page 2. Default: 0
 *        Flags:
 *        - 0x0000000000800000: Authenticated Payload Timeout Expired event
 * @return Value indicating success or error code.
 */
tBleStatus hci_set_event_mask_page_2( const uint8_t* Event_Mask_Page_2 );

/**
 * @brief HCI_READ_AUTHENTICATED_PAYLOAD_TIMEOUT
 * This command reads the Authenticated_Payload_Timeout parameter in the
 * Controller on the specified Connection_Handle.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.93].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param[out] Authenticated_Payload_Timeout Maximum amount of time specified
 *        between packets authenticated by a valid MIC.
 *        Time = N * 10 ms
 *        Values:
 *        - 0x0001 (10 ms)  ... 0xFFFF (655350 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_authenticated_payload_timeout( uint16_t Connection_Handle,
                                                   uint16_t* Authenticated_Payload_Timeout );

/**
 * @brief HCI_WRITE_AUTHENTICATED_PAYLOAD_TIMEOUT
 * This command writes the Authenticated_Payload_Timeout parameter in the
 * Controller for the specified Connection_Handle.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.94].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Authenticated_Payload_Timeout Maximum amount of time specified
 *        between packets authenticated by a valid MIC.
 *        Time = N * 10 ms
 *        Values:
 *        - 0x0001 (10 ms)  ... 0xFFFF (655350 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_write_authenticated_payload_timeout( uint16_t Connection_Handle,
                                                    uint16_t Authenticated_Payload_Timeout );

/**
 * @brief HCI_SET_ECOSYSTEM_BASE_INTERVAL
 * This command provides a hint to the Controller specifying the base
 * communication interval the Controller can expect current and future
 * communications to use.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.100].
 * 
 * @param Interval Hint for the base interval of the ecosystem.
 *        Time = N * 1.25 ms
 *        Values:
 *        - 0x0000 (NaN) : Ignore any previous hint
 *        - 0x0002 (2.50 ms)  ... 0x7DF0 (40300.00 ms) : Base interval of the
 *          ecosystem
 * @return Value indicating success or error code.
 */
tBleStatus hci_set_ecosystem_base_interval( uint16_t Interval );

/**
 * @brief HCI_CONFIGURE_DATA_PATH
 * This command is used to request the Controller to configure the data
 * transport path in a given direction between the Controller and the Host.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.3.101].
 * 
 * @param Data_Path_Direction Data path direction.
 *        Values:
 *        - 0x00: Input (Host to Controller)
 *        - 0x01: Output (Controller to Host)
 * @param Data_Path_ID Data path identifier.
 *        Values:
 *        - 0x01 ... 0xFE: Logical channel number; the meaning is vendor-
 *          specific.
 * @param Vendor_Specific_Config_Length Length of Vendor_Specific_Config in
 *        octets
 * @param Vendor_Specific_Config Vendor-specific configuration data for the
 *        data path being configured.
 * @return Value indicating success or error code.
 */
tBleStatus hci_configure_data_path( uint8_t Data_Path_Direction,
                                    uint8_t Data_Path_ID,
                                    uint8_t Vendor_Specific_Config_Length,
                                    const uint8_t* Vendor_Specific_Config );

/**
 * @brief HCI_READ_LOCAL_VERSION_INFORMATION
 * This command reads the values for the version information for the local
 * Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.1].
 * 
 * @param[out] HCI_Version Version of the HCI Specification supported by the
 *        Controller. See Bluetooth Assigned Numbers.
 * @param[out] HCI_Subversion Revision of the HCI implementation in the
 *        Controller. This value is vendor-specific.
 * @param[out] LMP_Version Version of the Current LMP supported by the
 *        Controller. See Bluetooth Assigned Numbers.
 * @param[out] Company_Identifier Company identifier for the manufacturer of
 *        the Controller. See Bluetooth Assigned Numbers.
 * @param[out] LMP_Subversion Subversion of the Current LMP in the Controller.
 *        This value is vendor-specific.
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_local_version_information( uint8_t* HCI_Version,
                                               uint16_t* HCI_Subversion,
                                               uint8_t* LMP_Version,
                                               uint16_t* Company_Identifier,
                                               uint16_t* LMP_Subversion );

/**
 * @brief HCI_READ_LOCAL_SUPPORTED_COMMANDS
 * This command reads the list of HCI commands supported for the local
 * Controller. This command shall return the Supported_Commands configuration
 * parameter. It is implied that if a command is listed as supported, the
 * feature underlying that command is also supported.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.2].
 * 
 * @param[out] Supported_Commands Bit mask for each HCI Command. If a bit is 1,
 *        the Controller supports the corresponding command and the features
 *        required for the command.
 *        Unsupported or undefined commands shall be set to 0.
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_local_supported_commands( uint8_t* Supported_Commands );

/**
 * @brief HCI_READ_LOCAL_SUPPORTED_FEATURES
 * This command requests a list of the supported features for the local
 * Controller. This command will return a list of the LMP features. For details
 * see Part C, Link Manager Protocol Specification.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.3].
 * 
 * @param[out] LMP_Features Bit Mask List of LMP features.
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_local_supported_features( uint8_t* LMP_Features );

/**
 * @brief HCI_READ_BD_ADDR
 * On an LE Controller, this command shall read the Public Device Address.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.6].
 * 
 * @param[out] BD_ADDR BD_ADDR (Bluetooth Device Address) of the device.
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_bd_addr( uint8_t* BD_ADDR );

/**
 * @brief HCI_READ_LOCAL_SUPPORTED_CODECS_V2
 * This command reads a list of the Bluetooth SIG approved codecs supported by
 * the Controller, as well as vendor specific codecs, which are defined by an
 * individual manufacturer.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.8].
 * 
 * @param[out] Num_Supported_Standard_Codecs Length of Standard_Codec in octets
 * @param[out] Standard_Codec Standard codec ID and Transport
 * @param[out] Num_Supported_Vendor_Specific_Codecs Length of
 *        Vendor_Specific_Codec in octets
 * @param[out] Vendor_Specific_Codec Vendor specific codec ID and Transport
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_local_supported_codecs_v2( uint8_t* Num_Supported_Standard_Codecs,
                                               uint8_t* Standard_Codec,
                                               uint8_t* Num_Supported_Vendor_Specific_Codecs,
                                               uint8_t* Vendor_Specific_Codec );

/**
 * @brief HCI_READ_LOCAL_SUPPORTED_CODEC_CAPABILITIES
 * This command returns a list of codec capabilities supported by the
 * Controller for a given codec. Only capabilities for the codec specified by
 * the Codec_ID parameter and that match the transport specified by the
 * Logical_Transport_Type parameter and direction specified by the Direction
 * parameter are returned.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.10].
 * 
 * @param Codec_ID Codec Identifier
 *        - Octet 0: See Assigned Numbers
 *        - Octets 1 to 2: Company ID, see Assigned Numbers for Company
 *        Identifier. Shall be ignored if octet 0 is not 0xFF.
 *        - Octets 3 to 4: Vendor-defined codec ID. Shall be ignored if octet 0
 *        is not 0xFF.
 * @param Logical_Transport_Type Codec transport type.
 *        Values:
 *        - 0x02: LE CIS
 *        - 0x03: LE BIS
 * @param Direction Codec direction.
 *        Values:
 *        - 0x00: Input (Host to Controller)
 *        - 0x01: Output (Controller to Host)
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_local_supported_codec_capabilities( const uint8_t* Codec_ID,
                                                        uint8_t Logical_Transport_Type,
                                                        uint8_t Direction,
                                                        uint8_t* Num_Codec_Capabilities,
                                                        uint8_t* Codec_Capabilities );

/**
 * @brief HCI_READ_LOCAL_SUPPORTED_CONTROLLER_DELAY
 * This command returns the range of supported Controller delays for the codec
 * specified by the Codec_ID parameter on a given transport type specified by
 * the Logical_Transport_Type parameter, in the direction specified by the
 * Direction parameter, and with the codec configuration specified by the
 * Codec_Configuration parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.4.11].
 * 
 * @param Codec_ID Codec Identifier
 *        - Octet 0: See Assigned Numbers
 *        - Octets 1 to 2: Company ID, see Assigned Numbers for Company
 *        Identifier. Shall be ignored if octet 0 is not 0xFF.
 *        - Octets 3 to 4: Vendor-defined codec ID. Shall be ignored if octet 0
 *        is not 0xFF.
 * @param Logical_Transport_Type Codec transport type.
 *        Values:
 *        - 0x02: LE CIS
 *        - 0x03: LE BIS
 * @param Direction Codec direction.
 *        Values:
 *        - 0x00: Input (Host to Controller)
 *        - 0x01: Output (Controller to Host)
 * @param Codec_Configuration_Length Length of Codec_Configuration in octets
 * @param Codec_Configuration Codec-specific configuration data.
 * @param[out] Min_Controller_Delay Minimum Controller delay in us.
 *        Values:
 *        - 0 ... 4000000
 * @param[out] Max_Controller_Delay Maximum Controller delay in us.
 *        Values:
 *        - 0 ... 4000000
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_local_supported_controller_delay( const uint8_t* Codec_ID,
                                                      uint8_t Logical_Transport_Type,
                                                      uint8_t Direction,
                                                      uint8_t Codec_Configuration_Length,
                                                      const uint8_t* Codec_Configuration,
                                                      uint8_t* Min_Controller_Delay,
                                                      uint8_t* Max_Controller_Delay );

/**
 * @brief HCI_READ_RSSI
 * This command reads the Received Signal Strength Indication (RSSI) value from
 * a Controller. For an LE transport, a Connection_Handle is used as the Handle
 * command parameter and return parameter. The meaning of the RSSI metric is an
 * absolute receiver signal strength value in dBm to +/- 6 dB accuracy. If the
 * RSSI cannot be read, the RSSI metric shall be set to 127.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.5.4].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param[out] RSSI RSSI (signed integer).
 *        Units: dBm.
 *        Values:
 *        - 127: RSSI not available
 *        - -127 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_read_rssi( uint16_t Connection_Handle,
                          uint8_t* RSSI );

/**
 * @brief HCI_LE_SET_EVENT_MASK
 * The LE_Set_Event_Mask command is used to control which LE events are
 * generated by the HCI for the Host. If the bit in the LE_Event_Mask is set to
 * a one, then the event associated with that bit will be enabled. The Host has
 * to deal with each event that is generated by an LE Controller. The event
 * mask allows the Host to control which events will interrupt it.
 * For LE events to be generated, the LE Meta-Event bit in the Event_Mask shall
 * also be set. If that bit is not set, then LE events shall not be generated,
 * regardless of how the LE_Event_Mask is set.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.1].
 * 
 * @param LE_Event_Mask LE event mask. Default: 0x000000C7FFF7F85F. Note that
 *        the BLE stack ignores the bits which represent events it does not
 *        support (according to its variant).
 *        Flags:
 *        - 0x0000000000000000: No LE events specified
 *        - 0x0000000000000001: LE Connection Complete event
 *        - 0x0000000000000002: LE Advertising Report event
 *        - 0x0000000000000004: LE Connection Update Complete event
 *        - 0x0000000000000008: LE Read Remote Features Complete event
 *        - 0x0000000000000010: LE Long Term Key Request event
 *        - 0x0000000000000020: LE Remote Connection Parameter Request event
 *        - 0x0000000000000040: LE Data Length Change event
 *        - 0x0000000000000080: LE Read Local P-256 Public Key Complete event
 *        - 0x0000000000000100: LE Generate DHKey Complete event
 *        - 0x0000000000000200: LE Enhanced Connection Complete event
 *        - 0x0000000000000400: LE Directed Advertising Report event
 *        - 0x0000000000000800: LE PHY Update Complete event
 *        - 0x0000000000001000: LE Extended Advertising Report event
 *        - 0x0000000000002000: LE Periodic Advertising Sync Established event
 *        - 0x0000000000004000: LE Periodic Advertising Report event
 *        - 0x0000000000008000: LE Periodic Advertising Sync Lost event
 *        - 0x0000000000010000: LE Scan Timeout event
 *        - 0x0000000000020000: LE Advertising Set Terminated event
 *        - 0x0000000000040000: LE Scan Request Received event
 *        - 0x0000000000080000: LE Channel Selection Algorithm event
 *        - 0x0000000000100000: LE Connectionless IQ Report event
 *        - 0x0000000000200000: LE Connection IQ Report event
 *        - 0x0000000000400000: LE CTE Request Failed event
 *        - 0x0000000000800000: LE Periodic Advertising Sync Transfer Received
 *          event
 *        - 0x0000000001000000: LE CIS Established event
 *        - 0x0000000002000000: LE CIS Request event
 *        - 0x0000000004000000: LE Create BIG Complete event
 *        - 0x0000000008000000: LE Terminate BIG Complete event
 *        - 0x0000000010000000: LE BIG Sync Established event
 *        - 0x0000000020000000: LE BIG Sync Lost event
 *        - 0x0000000040000000: LE Request Peer SCA Complete event
 *        - 0x0000000080000000: LE Path Loss Threshold event
 *        - 0x0000000100000000: LE Transmit Power Reporting event
 *        - 0x0000000200000000: LE BIGInfo Advertising Report event
 *        - 0x0000000400000000: LE Subrate Change event
 *        - 0x0000000800000000: LE Periodic Advertising Sync Established event
 *          [v2]
 *        - 0x0000001000000000: LE Periodic Advertising Report event [v2]
 *        - 0x0000002000000000: LE Periodic Advertising Sync Transfer Received
 *          event [v2]
 *        - 0x0000004000000000: LE Periodic Advertising Subevent Data Request
 *          event
 *        - 0x0000008000000000: LE Periodic Advertising Response Report event
 *        - 0x0000010000000000: LE Enhanced Connection Complete event [v2]
 *        - 0x0000020000000000: LE CIS Established event [v2]
 *        - 0x0000040000000000: LE Read All Remote Features Complete event
 *        - 0x0000080000000000: LE CS Read Remote Supported Capabilities
 *          Complete event
 *        - 0x0000100000000000: LE CS Read Remote FAE Table Complete event
 *        - 0x0000200000000000: LE CS Security Enable Complete event
 *        - 0x0000400000000000: LE CS Config Complete event
 *        - 0x0000800000000000: LE CS Procedure Enable Complete event
 *        - 0x0001000000000000: LE CS Subevent Result event
 *        - 0x0002000000000000: LE CS Subevent Result Continue event
 *        - 0x0004000000000000: LE CS Test End Complete event
 *        - 0x0008000000000000: LE Monitored Advertisers Report event
 *        - 0x0010000000000000: LE Frame Space Update Complete event
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_event_mask( const uint8_t* LE_Event_Mask );

/**
 * @brief HCI_LE_READ_BUFFER_SIZE
 * The LE_Read_Buffer_Size command is used to read the maximum size of the data
 * portion of HCI LE ACL Data Packets sent from the Host to the Controller.
 * The Host will segment the data transmitted to the Controller according to
 * these values, so that the HCI Data Packets will contain data with up to this
 * size. The LE_Read_Buffer_Size command also returns the total number of HCI
 * LE ACL Data Packets that can be stored in the data buffers of the
 * Controller. The LE_Read_Buffer_Size command must be issued by the Host
 * before it sends any data to an LE Controller (see Section 4.1.1).
 * If the Controller returns a length value of zero, the Host shall use the
 * Read_Buffer_Size command to determine the size of the data buffers.
 * Note: Both the Read_Buffer_Size and LE_Read_Buffer_Size commands may return
 * buffer length and number of packets parameter values that are nonzero.
 * The HC_LE_ACL_Data_Packet_Length return parameter shall be used to determine
 * the size of the L2CAP PDU segments contained in ACL Data Packets, which are
 * transferred from the Host to the Controller to be broken up into packets by
 * the Link Layer. Both the Host and the Controller shall support command and
 * event packets, where the data portion (excluding header) contained in the
 * packets is 255 octets in size. The HC_Total_Num_LE_ACL_Data_Packets return
 * parameter contains the total number of HCI ACL Data Packets that can be
 * stored in the data buffers of the Controller. The Host determines how the
 * buffers are to be divided between different Connection Handles.
 * Note: The HC_LE_ACL_Data_Packet_Length return parameter does not include the
 * length of the HCI Data Packet header.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.2].
 * 
 * @param[out] HC_LE_ACL_Data_Packet_Length Used to determine the maximum size
 *        of the L2CAP PDU segments that are contained in ACL data packets, and
 *        which are transferred from the Host to the Controller to be broken up
 *        into packets by the Link Layer.
 *        Values:
 *        - 0x0000: No dedicated LE Buffer exists.
 *        - 0x001B ... 0x00FF: Maximum length (in octets) of the data portion
 *          of each HCI ACL data packet.
 * @param[out] HC_Total_Num_LE_ACL_Data_Packets Contains the total number of
 *        HCI ACL Data packets that can be stored in the data buffers of the
 *        Controller.
 *        Values:
 *        - 0x00: No dedicated LE Buffer exists.
 *        - 0x01 ... 0xFF: The total number of HCI ACL data packets that can be
 *          stored in the data buffers of the Controller.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_buffer_size( uint16_t* HC_LE_ACL_Data_Packet_Length,
                                    uint8_t* HC_Total_Num_LE_ACL_Data_Packets );

/**
 * @brief HCI_LE_READ_LOCAL_SUPPORTED_FEATURES
 * This command requests the list of the supported LE features for the
 * Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.3].
 * 
 * @param[out] LE_Features Bit Mask List of LE features. See Bluetooth Core
 *        specification.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_local_supported_features( uint8_t* LE_Features );

/**
 * @brief HCI_LE_SET_RANDOM_ADDRESS
 * The LE_Set_Random_Address command is used by the Host to set the LE Random
 * Device Address in the Controller (see [Vol 6] Part B, Section 1.3).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.4].
 * 
 * @param Random_Address Random Device Address.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_random_address( const uint8_t* Random_Address );

/**
 * @brief HCI_LE_SET_ADVERTISING_PARAMETERS
 * The LE_Set_Advertising_Parameters command is used by the Host to set the
 * advertising parameters.
 * The Advertising_Interval_Min shall be less than or equal to the
 * Advertising_Interval_Max.
 * The Advertising_Interval_Min and Advertising_Interval_Max should not be the
 * same value to enable the Controller to determine the best advertising
 * interval given other activities.
 * For high duty cycle directed advertising, i.e. when Advertising_Type is 0x01
 * (ADV_DIRECT_IND, high duty cycle), the Advertising_Interval_Min and
 * Advertising_Interval_Max parameters are not used and shall be ignored.
 * The Advertising_Type is used to determine the packet type that is used for
 * advertising when advertising is enabled.
 * The Advertising_Interval_Min and Advertising_Interval_Max shall not be set
 * to less than 0x00A0 (100 ms) if the Advertising_Type is set to 0x02
 * (ADV_SCAN_IND) or 0x03 (ADV_NONCONN_IND). The Own_Address_Type determines if
 * the advertising packets are identified with the Public Device Address of the
 * device, or a Random Device Address as written by the LE_Set_Random_Address
 * command.
 * If directed advertising is performed, i.e. when Advertising_Type is set to
 * 0x01 (ADV_DIRECT_IND, high duty cycle) or 0x04 (ADV_DIRECT_IND, low duty
 * cycle mode), then the Direct_Address_Type and Direct_Address shall be valid,
 * otherwise they shall be ignored by the Controller and not used.
 * The Advertising_Channel_Map is a bit field that indicates the advertising
 * channels that shall be used when transmitting advertising packets. At least
 * one channel bit shall be set in the Advertising_Channel_Map parameter.
 * The Advertising_Filter_Policy parameter shall be ignored when directed
 * advertising is enabled.
 * The Host shall not issue this command when advertising is enabled in the
 * Controller; if it is the Command Disallowed error code shall be used.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.5].
 * 
 * @param Advertising_Interval_Min Minimum advertising interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0020 (20.000 ms)  ... 0x4000 (10240.000 ms)
 * @param Advertising_Interval_Max Maximum advertising interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0020 (20.000 ms)  ... 0x4000 (10240.000 ms)
 * @param Advertising_Type Advertising type.
 *        Values:
 *        - 0x00: ADV_IND (Connectable undirected advertising)
 *        - 0x01: ADV_DIRECT_IND, high duty cycle (Connectable high duty cycle
 *          directed advertising)
 *        - 0x02: ADV_SCAN_IND (Scannable undirected advertising)
 *        - 0x03: ADV_NONCONN_IND (Non connectable undirected advertising)
 *        - 0x04: ADV_DIRECT_IND_LDC, low duty cycle (Connectable low duty
 *          cycle directed advertising)
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Peer_Address_Type Address type of the peer device.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Peer_Address Public Device Address, Random Device Address, Public
 *        Identity Address, or Random (static) Identity Address of the device
 *        to be connected.
 * @param Advertising_Channel_Map Advertising channel map.
 *        Flags:
 *        - 0x01: Channel 37 shall be used
 *        - 0x02: Channel 38 shall be used
 *        - 0x04: Channel 39 shall be used
 * @param Advertising_Filter_Policy Advertising filter policy.
 *        Values:
 *        - 0x00: Allow Scan Request from Any, Allow Connect Request from Any
 *        - 0x01: Allow Scan Request from Filter Accept List Only, Allow
 *          Connect Request from Any
 *        - 0x02: Allow Scan Request from Any, Allow Connect Request from
 *          Filter Accept List Only
 *        - 0x03: Allow Scan Request from Filter Accept List Only, Allow
 *          Connect Request from Filter Accept List Only
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_advertising_parameters( uint16_t Advertising_Interval_Min,
                                              uint16_t Advertising_Interval_Max,
                                              uint8_t Advertising_Type,
                                              uint8_t Own_Address_Type,
                                              uint8_t Peer_Address_Type,
                                              const uint8_t* Peer_Address,
                                              uint8_t Advertising_Channel_Map,
                                              uint8_t Advertising_Filter_Policy );

/**
 * @brief HCI_LE_READ_ADVERTISING_PHYSICAL_CHANNEL_TX_POWER
 * The LE_Read_Advertising_Physical_Channel_Tx_Power command is used by the
 * Host to read the transmit power level used for LE advertising physical
 * channel packets.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.6].
 * 
 * @param[out] Transmit_Power_Level Size: 1 Octet (signed integer)
 *        Units: dBm
 *        Accuracy: +/- 4 dBm
 *        Values:
 *        - -20 ... 10
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_advertising_physical_channel_tx_power( uint8_t* Transmit_Power_Level );

/**
 * @brief HCI_LE_SET_ADVERTISING_DATA
 * The LE_Set_Advertising_Data command is used to set the data used in
 * advertising packets that have a data field.
 * Only the significant part of the Advertising_Data is transmitted in the
 * advertising packets, as defined in [Vol 3] Part C, Section 11.,
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.7].
 * 
 * @param Advertising_Data_Length The number of significant octets in the
 *        following data field
 * @param Advertising_Data 31 octets of data formatted as defined in [Vol 3]
 *        Part C, Section 11.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_advertising_data( uint8_t Advertising_Data_Length,
                                        const uint8_t* Advertising_Data );

/**
 * @brief HCI_LE_SET_SCAN_RESPONSE_DATA
 * This command is used to provide data used in Scanning Packets that have a
 * data field.
 * Only the significant part of the Scan_Response_Data is transmitted in the
 * Scanning Packets, as defined in [Vol 3] Part C, Section 11.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.8].
 * 
 * @param Scan_Response_Data_Length The number of significant octets in the
 *        following data field
 * @param Scan_Response_Data 31 octets of data formatted as defined in [Vol 3]
 *        Part C, Section 11.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_scan_response_data( uint8_t Scan_Response_Data_Length,
                                          const uint8_t* Scan_Response_Data );

/**
 * @brief HCI_LE_SET_ADVERTISING_ENABLE
 * The LE_Set_Advertising_Enable command is used to request the Controller to
 * start or stop advertising. The Controller manages the timing of
 * advertisements as per the advertising parameters given in the
 * LE_Set_Advertising_Parameters command.
 * The Controller shall continue advertising until the Host issues an
 * LE_Set_Advertising_Enable command with Advertising_Enable set to 0x00
 * (Advertising is disabled) or until a connection is created or until the
 * Advertising is timed out due to high duty cycle Directed Advertising. In
 * these cases, advertising is then disabled.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.9].
 * 
 * @param Advertising_Enable Enable/disable advertising.
 *        Values:
 *        - 0x00: Advertising is disabled
 *        - 0x01: Advertising is enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_advertising_enable( uint8_t Advertising_Enable );

/**
 * @brief HCI_LE_SET_SCAN_PARAMETERS
 * The LE_Set_Scan_Parameters command is used to set the scan parameters.
 * The LE_Scan_Type parameter controls the type of scan to perform.
 * The LE_Scan_Interval and LE_Scan_Window parameters are recommendations from
 * the Host on how long (LE_Scan_Window) and how frequently (LE_Scan_Interval)
 * the Controller should scan (See [Vol 6] Part B, Section 4.4.3). The
 * LE_Scan_Window parameter shall always be set to a value smaller or equal to
 * the value set for the LE_Scan_Interval parameter. If they are set to the
 * same value scanning should be run continuously.
 * The Own_Address_Type parameter determines the address used (Public or Random
 * Device Address) when performing active scan.
 * The Host shall not issue this command when scanning is enabled in the
 * Controller; if it is the Command Disallowed error code shall be used.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.10].
 * 
 * @param LE_Scan_Type Passive or active scanning. With passive scanning, no
 *        scan request PDUs are sent.
 *        Values:
 *        - 0x00: Passive scanning
 *        - 0x01: Active scanning
 * @param LE_Scan_Interval This is defined as the time interval from when the
 *        Controller started its last LE scan until it begins the subsequent LE
 *        scan.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0004 (2.500 ms)  ... 0x4000 (10240.000 ms)
 * @param LE_Scan_Window Amount of time for the duration of the LE scan.
 *        LE_Scan_Window shall be less than or equal to LE_Scan_Interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0004 (2.500 ms)  ... 0x4000 (10240.000 ms)
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Scanning_Filter_Policy The scanning filter policy determines how the
 *        scanner's Link Layer processes advertising and scan response PDUs.
 *        There is a choice of two primary filter policies: unfiltered and
 *        filtered.
 *        Unfiltered: the Link Layer processes all advertising and scan
 *        response PDUs (i.e., the Filter Accept List is not used).
 *        Filtered: the Link Layer processes advertising and scan response PDUs
 *        only from devices in the Filter Accept List.
 *        With extended scanning filter policies, a directed advertising PDU
 *        accepted by the primary filter policy shall nevertheless be ignored
 *        unless either the TargetA field is identical to the scanner's device
 *        address, or TargetA field is a resolvable private address.
 *        Values:
 *        - 0x00: Basic unfiltered scanning filter policy
 *        - 0x01: Basic filtered scanning filter policy
 *        - 0x02: Extended unfiltered scanning filter policy
 *        - 0x03: Extended filtered scanning filter policy
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_scan_parameters( uint8_t LE_Scan_Type,
                                       uint16_t LE_Scan_Interval,
                                       uint16_t LE_Scan_Window,
                                       uint8_t Own_Address_Type,
                                       uint8_t Scanning_Filter_Policy );

/**
 * @brief HCI_LE_SET_SCAN_ENABLE
 * The LE_Set_Scan_Enable command is used to start scanning. Scanning is used
 * to discover advertising devices nearby.
 * The Filter_Duplicates parameter controls whether the Link Layer shall filter
 * duplicate advertising reports to the Host, or if the Link Layer should
 * generate advertising reports for each packet received.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.11].
 * 
 * @param LE_Scan_Enable Enable/disable scan.
 *        Values:
 *        - 0x00: Scanning disabled
 *        - 0x01: Scanning enabled
 * @param Filter_Duplicates Enable/disable duplicate filtering.
 *        Values:
 *        - 0x00: Duplicate filtering disabled
 *        - 0x01: Duplicate filtering enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_scan_enable( uint8_t LE_Scan_Enable,
                                   uint8_t Filter_Duplicates );

/**
 * @brief HCI_LE_CREATE_CONNECTION
 * The LE_Create_Connection command is used to create a Link Layer connection
 * to a connectable advertiser.
 * The LE_Scan_Interval and LE_Scan_Window parameters are recommendations from
 * the Host on how long (LE_Scan_Window) and how frequently (LE_Scan_Interval)
 * the Controller should scan. The LE_Scan_Window parameter shall be set to a
 * value smaller or equal to the value set for the LE_Scan_Interval parameter.
 * If both are set to the same value, scanning should run continuously.
 * The Initiator_Filter_Policy is used to determine whether the Filter Accept
 * List is used. If the Filter Accept List is not used, the Peer_Address_Type
 * and the Peer_Address parameters specify the address type and address of the
 * advertising device to connect to.
 * The Link Layer shall set the address in the CONNECT_REQ packets to either
 * the Public Device Address or the Random Device Addressed based on the
 * Own_Address_Type parameter.
 * The Conn_Interval_Min and Conn_Interval_Max parameters define the minimum
 * and maximum allowed connection interval. The Conn_Interval_Min parameter
 * shall not be greater than the Conn_Interval_Max parameter.
 * The Conn_Latency parameter defines the maximum allowed connection latency.
 * The Supervision_Timeout parameter defines the link supervision timeout for
 * the connection. The Supervision_Timeout in milliseconds shall be larger than
 * (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is given
 * in milliseconds.
 * The Minimum_CE_Length and Maximum_CE_Length parameters are informative
 * parameters providing the Controller with the expected minimum and maximum
 * length of the connection events. The Minimum_CE_Length parameter shall be
 * less than or equal to the Maximum_CE_Length parameter.
 * The Host shall not issue this command when another LE_Create_Connection is
 * pending in the Controller; if this does occur the Controller shall return
 * the Command Disallowed error code shall be used.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.12].
 * 
 * @param LE_Scan_Interval This is defined as the time interval from when the
 *        Controller started its last LE scan until it begins the subsequent LE
 *        scan.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0004 (2.500 ms)  ... 0x4000 (10240.000 ms)
 * @param LE_Scan_Window Amount of time for the duration of the LE scan.
 *        LE_Scan_Window shall be less than or equal to LE_Scan_Interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0004 (2.500 ms)  ... 0x4000 (10240.000 ms)
 * @param Initiator_Filter_Policy Initiator filter policy.
 *        Values:
 *        - 0x00: Filter Accept List is not used to determine which advertiser
 *          to connect to
 *        - 0x01: Filter Accept List is used to determine which advertiser to
 *          connect to (Peer_Address_Type and Peer_Address are ignored)
 * @param Peer_Address_Type Address type
 *        0x00 Public Device Address
 *        0x01 Random Device Address
 *        0x02 Public Identity Address (Corresponds to Resolved Private
 *        Address)
 *        0x03 Random (Static) Identity Address (Corresponds to Resolved
 *        Private Address)
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Public Identity Address
 *        - 0x03: Random (Static) Identity Address
 * @param Peer_Address Public Device Address or Random Device Address of the
 *        device to be connected.
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Conn_Interval_Min Minimum value for the connection event interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0x0C80 (4000.00 ms)
 * @param Conn_Interval_Max Maximum value for the connection event interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0x0C80 (4000.00 ms)
 * @param Conn_Latency Maximum Peripheral latency for the connection in number
 *        of connection events.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Supervision_Timeout Supervision timeout for the LE Link.
 *        It shall be a multiple of 10 ms and larger than (1 +
 *        connPeripheralLatency) * connInterval * 2.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x0C80 (32000 ms)
 * @param Minimum_CE_Length Information parameter about the minimum length of
 *        connection needed for this LE connection.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0000 (0.000 ms)  ... 0xFFFF (40959.375 ms)
 * @param Maximum_CE_Length Information parameter about the maximum length of
 *        connection needed for this LE connection.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0000 (0.000 ms)  ... 0xFFFF (40959.375 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_create_connection( uint16_t LE_Scan_Interval,
                                     uint16_t LE_Scan_Window,
                                     uint8_t Initiator_Filter_Policy,
                                     uint8_t Peer_Address_Type,
                                     const uint8_t* Peer_Address,
                                     uint8_t Own_Address_Type,
                                     uint16_t Conn_Interval_Min,
                                     uint16_t Conn_Interval_Max,
                                     uint16_t Conn_Latency,
                                     uint16_t Supervision_Timeout,
                                     uint16_t Minimum_CE_Length,
                                     uint16_t Maximum_CE_Length );

/**
 * @brief HCI_LE_CREATE_CONNECTION_CANCEL
 * The LE_Create_Connection_Cancel command is used to cancel the
 * LE_Create_Connection command. This command shall only be issued after the
 * LE_Create_Connection command has been issued, a Command Status event has
 * been received for the LE Create Connection command and before the LE
 * Connection Complete event.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.13].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_create_connection_cancel( void );

/**
 * @brief HCI_LE_READ_FILTER_ACCEPT_LIST_SIZE
 * This command is used to read the total number of Filter Accept List entries
 * that can be stored in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.14].
 * 
 * @param[out] Filter_Accept_List_Size Total number of Filter Accept List
 *        entries that can be stored in the Controller.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_filter_accept_list_size( uint8_t* Filter_Accept_List_Size );

/**
 * @brief HCI_LE_CLEAR_FILTER_ACCEPT_LIST
 * This command is used to clear the Filter Accept List stored in the
 * Controller.
 * This command can be used at any time except when:
 * - the advertising filter policy uses the Filter Accept List and advertising
 * is enabled.
 * - the scanning filter policy uses the Filter Accept List and scanning is
 * enabled.
 * - the initiator filter policy uses the Filter Accept List and an
 * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is
 * pending.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.15].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_clear_filter_accept_list( void );

/**
 * @brief HCI_LE_ADD_DEVICE_TO_FILTER_ACCEPT_LIST
 * This command is used to add a single device to the Filter Accept List stored
 * in the Controller.
 * This command can be used at any time except when:
 * - the advertising filter policy uses the Filter Accept List and advertising
 * is enabled.
 * - the scanning filter policy uses the Filter Accept List and scanning is
 * enabled.
 * - the initiator filter policy uses the Filter Accept List and an
 * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is
 * pending.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.16].
 * 
 * @param Address_Type Address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0xFF: Devices sending anonymous advertisements
 * @param Address Public Device Address or Random Device Address.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_add_device_to_filter_accept_list( uint8_t Address_Type,
                                                    const uint8_t* Address );

/**
 * @brief HCI_LE_REMOVE_DEVICE_FROM_FILTER_ACCEPT_LIST
 * This command is used to remove a single device from the Filter Accept List
 * stored in the Controller.
 * This command can be used at any time except when:
 * - the advertising filter policy uses the Filter Accept List and advertising
 * is enabled.
 * - the scanning filter policy uses the Filter Accept List and scanning is
 * enabled.
 * - the initiator filter policy uses the Filter Accept List and an
 * HCI_LE_Create_Connection or HCI_LE_Extended_Create_Connection command is
 * pending.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.17].
 * 
 * @param Address_Type Address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0xFF: Devices sending anonymous advertisements
 * @param Address Public Device Address or Random Device Address.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remove_device_from_filter_accept_list( uint8_t Address_Type,
                                                         const uint8_t* Address );

/**
 * @brief HCI_LE_CONNECTION_UPDATE
 * The LE_Connection_Update command is used to change the Link Layer connection
 * parameters of a connection. This command is supported only on Central side.
 * The Conn_Interval_Min and Conn_Interval_Max parameters are used to define
 * the minimum and maximum allowed connection interval. The Conn_Interval_Min
 * parameter shall not be greater than the Conn_Interval_Max parameter.
 * The Conn_Latency parameter shall define the maximum allowed connection
 * latency.
 * The Supervision_Timeout parameter shall define the link supervision timeout
 * for the LE link. The Supervision_Timeout in milliseconds shall be larger
 * than (1 + Conn_Latency) * Conn_Interval_Max * 2, where Conn_Interval_Max is
 * given in milliseconds.
 * The Minimum_CE_Length and Maximum_CE_Length are information parameters
 * providing the Controller with a hint about the expected minimum and maximum
 * length of the connection events. The Minimum_CE_Length shall be less than or
 * equal to the Maximum_CE_Length.
 * The actual parameter values selected by the Link Layer may be different from
 * the parameter values provided by the Host through this command.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.18].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Conn_Interval_Min Minimum value for the connection event interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0x0C80 (4000.00 ms)
 * @param Conn_Interval_Max Maximum value for the connection event interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0x0C80 (4000.00 ms)
 * @param Conn_Latency Maximum Peripheral latency for the connection in number
 *        of connection events.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Supervision_Timeout Supervision timeout for the LE Link.
 *        It shall be a multiple of 10 ms and larger than (1 +
 *        connPeripheralLatency) * connInterval * 2.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x0C80 (32000 ms)
 * @param Minimum_CE_Length Information parameter about the minimum length of
 *        connection needed for this LE connection.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0000 (0.000 ms)  ... 0xFFFF (40959.375 ms)
 * @param Maximum_CE_Length Information parameter about the maximum length of
 *        connection needed for this LE connection.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0000 (0.000 ms)  ... 0xFFFF (40959.375 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_connection_update( uint16_t Connection_Handle,
                                     uint16_t Conn_Interval_Min,
                                     uint16_t Conn_Interval_Max,
                                     uint16_t Conn_Latency,
                                     uint16_t Supervision_Timeout,
                                     uint16_t Minimum_CE_Length,
                                     uint16_t Maximum_CE_Length );

/**
 * @brief HCI_LE_SET_HOST_CHANNEL_CLASSIFICATION
 * The LE_Set_Host_Channel_Classification command allows the Host to specify a
 * channel classification for data channels based on its "local information".
 * This classification persists until overwritten with a subsequent
 * LE_Set_Host_Channel_Classification command or until the Controller is reset
 * using the Reset command (see [Vol 6] Part B, Section 4.5.8.1).
 * If this command is used, the Host should send it within 10 seconds of
 * knowing that the channel classification has changed. The interval between
 * two successive commands sent shall be at least one second.
 * This command shall only be used when the local device supports the Central
 * role.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.19].
 * 
 * @param LE_Channel_Map This parameter contains 37 1-bit fields.
 *        The nth such field (in the range 0 to 36) contains the value for the
 *        link layer channel index n.
 *        Channel n is bad = 0.
 *        Channel n is unknown = 1.
 *        The most significant bits are reserved and shall be set to 0.
 *        At least one channel shall be marked as unknown.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_host_channel_classification( const uint8_t* LE_Channel_Map );

/**
 * @brief HCI_LE_READ_CHANNEL_MAP
 * The LE_Read_Channel_Map command returns the current Channel_Map for the
 * specified Connection_Handle. The returned value indicates the state of the
 * Channel_Map specified by the last transmitted or received Channel_Map (in a
 * CONNECT_REQ or LL_CHANNEL_MAP_REQ message) for the specified
 * Connection_Handle, regardless of whether the Central has received an
 * acknowledgment.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.20].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param[out] LE_Channel_Map This parameter contains 37 1-bit fields.
 *        The nth such field (in the range 0 to 36) contains the value for the
 *        link layer channel index n.
 *        Channel n is unused = 0.
 *        Channel n is used = 1.
 *        The most significant bits are reserved and shall be set to 0.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_channel_map( uint16_t Connection_Handle,
                                    uint8_t* LE_Channel_Map );

/**
 * @brief HCI_LE_READ_REMOTE_FEATURES
 * This command requests a list of the used LE features from the remote device.
 * This command shall return a list of the used LE features. For details see
 * [Vol 6] Part B, Section 4.6.
 * This command may be issued on both the Central and Peripheral.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.21].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_remote_features( uint16_t Connection_Handle );

/**
 * @brief HCI_LE_ENCRYPT
 * The LE_Encrypt command is used to request the Controller to encrypt the
 * Plaintext_Data in the command using the Key given in the command and returns
 * the Encrypted_Data to the Host. The AES-128 bit block cypher is defined in
 * NIST Publication FIPS-197
 * (http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.22].
 * 
 * @param Key 128 bit key for the encryption of the data given in the command.
 * @param Plaintext_Data 128 bit data block that is requested to be encrypted.
 * @param[out] Encrypted_Data 128 bit encrypted data block.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_encrypt( const uint8_t* Key,
                           const uint8_t* Plaintext_Data,
                           uint8_t* Encrypted_Data );

/**
 * @brief HCI_LE_RAND
 * The LE_Rand command is used to request the Controller to generate 8 octets
 * of random data to be sent to the Host. The Random_Number shall be generated
 * according to [Vol 2] Part H, Section 2 if the LE Feature (LL Encryption) is
 * supported.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.23].
 * 
 * @param[out] Random_Number Random Number
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_rand( uint8_t* Random_Number );

/**
 * @brief HCI_LE_ENABLE_ENCRYPTION
 * The LE_Enable_Encryption command is used to authenticate the given
 * encryption key associated with the remote device specified by the connection
 * handle, and once authenticated will encrypt the connection. The parameters
 * are as defined in [Vol 3] Part H, Section 2.4.4.
 * If the connection is already encrypted then the Controller shall pause
 * connection encryption before attempting to authenticate the given encryption
 * key, and then re-encrypt the connection. While encryption is paused no user
 * data shall be transmitted.
 * On an authentication failure, the connection shall be automatically
 * disconnected by the Link Layer. If this command succeeds, then the
 * connection shall be encrypted.
 * This command shall only be used when the local device's role is Central.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.24].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Random_Number 64 bit random number.
 * @param Encrypted_Diversifier 16 bit encrypted diversifier.
 * @param Long_Term_Key 128 bit long term key.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_enable_encryption( uint16_t Connection_Handle,
                                     const uint8_t* Random_Number,
                                     uint16_t Encrypted_Diversifier,
                                     const uint8_t* Long_Term_Key );

/**
 * @brief HCI_LE_LONG_TERM_KEY_REQUEST_REPLY
 * The LE_Long_Term_Key_Request_Reply command is used to reply to an LE Long
 * Term Key Request event from the Controller, and specifies the Long_Term_Key
 * parameter that shall be used for this Connection_Handle. The Long_Term_Key
 * is used as defined in [Vol 6] Part B, Section 5.1.3.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.25].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Long_Term_Key 128 bit long term key.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_long_term_key_request_reply( uint16_t Connection_Handle,
                                               const uint8_t* Long_Term_Key );

/**
 * @brief HCI_LE_LONG_TERM_KEY_REQUEST_NEGATIVE_REPLY
 * The LE_Long_Term_Key_Request_Negative_Reply command is used to reply to an
 * LE Long Term Key Request event from the Controller if the Host cannot
 * provide a Long Term Key for this Connection_Handle.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.26].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_long_term_key_request_negative_reply( uint16_t Connection_Handle );

/**
 * @brief HCI_LE_READ_SUPPORTED_STATES
 * The LE_Read_Supported_States command reads the states and state combinations
 * that the link layer supports. See [Vol 6] Part B, Section 1.1.1.
 * LE_States is an 8-octet bit field. If a bit is set to 1 then this state or
 * state combination is supported by the Controller. Multiple bits in LE_States
 * may be set to 1 to indicate support for multiple state and state
 * combinations.
 * All the Advertising type with the Initiate State combinations shall be set
 * only if the corresponding Advertising types and Central role combination are
 * set.
 * All the Scanning types and the Initiate State combinations shall be set only
 * if the corresponding Scanning types and Central role combination are set.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.27].
 * 
 * @param[out] LE_States State or state combination is supported by the
 *        Controller.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_supported_states( uint8_t* LE_States );

/**
 * @brief HCI_LE_RECEIVER_TEST
 * This command is used to start a test where the DUT receives test reference
 * packets at a fixed interval. The tester generates the test reference
 * packets.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.28].
 * 
 * @param RX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_receiver_test( uint8_t RX_Frequency );

/**
 * @brief HCI_LE_TRANSMITTER_TEST
 * This command is used to start a test where the DUT generates test reference
 * packets at a fixed interval.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.29].
 * 
 * @param TX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @param Length_Of_Test_Data Length in bytes of payload data in each packet.
 *        Values:
 *        - 0x00 ... 0x25: for BO variant
 *        - 0x00 ... 0xFF: otherwise
 * @param Packet_Payload Type of packet payload.
 *        Values:
 *        - 0x00: Pseudo-Random bit sequence 9
 *        - 0x01: Pattern of alternating bits '11110000'
 *        - 0x02: Pattern of alternating bits '10101010'
 *        - 0x03: Pseudo-Random bit sequence 15
 *        - 0x04: Pattern of All '1' bits
 *        - 0x05: Pattern of All '0' bits
 *        - 0x06: Pattern of alternating bits '00001111'
 *        - 0x07: Pattern of alternating bits '0101'
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_transmitter_test( uint8_t TX_Frequency,
                                    uint8_t Length_Of_Test_Data,
                                    uint8_t Packet_Payload );

/**
 * @brief HCI_LE_TEST_END
 * This command is used to stop any test which is in progress. The
 * Number_Of_Packets for a transmitter test is reported as 0x0000. The
 * Number_Of_Packets is an unsigned number and contains the number of received
 * packets.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.30].
 * 
 * @param[out] Number_Of_Packets Number of packets received
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_test_end( uint16_t* Number_Of_Packets );

/**
 * @brief HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_REPLY
 * This command is used to reply to the
 * HCI_LE_Remote_Connection_Parameter_Request event. This indicates that the
 * Host has accepted the remote device's request to change connection
 * parameters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.31].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Interval_Min Minimum value for the connection event interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0x0C80 (4000.00 ms)
 * @param Interval_Max Maximum value for the connection event interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0x0C80 (4000.00 ms)
 * @param Max_Latency Maximum Peripheral latency for the connection in number
 *        of connection events.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Timeout Supervision timeout for the LE Link.
 *        It shall be a multiple of 10 ms and larger than (1 +
 *        connPeripheralLatency) * connInterval * 2.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x0C80 (32000 ms)
 * @param Min_CE_Length Information parameter about the minimum length of
 *        connection needed for this LE connection.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0000 (0.000 ms)  ... 0xFFFF (40959.375 ms)
 * @param Max_CE_Length Information parameter about the maximum length of
 *        connection needed for this LE connection.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x0000 (0.000 ms)  ... 0xFFFF (40959.375 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remote_connection_parameter_request_reply( uint16_t Connection_Handle,
                                                             uint16_t Interval_Min,
                                                             uint16_t Interval_Max,
                                                             uint16_t Max_Latency,
                                                             uint16_t Timeout,
                                                             uint16_t Min_CE_Length,
                                                             uint16_t Max_CE_Length );

/**
 * @brief HCI_LE_REMOTE_CONNECTION_PARAMETER_REQUEST_NEGATIVE_REPLY
 * This command is used to reply to the
 * HCI_LE_Remote_Connection_Parameter_Request event. This indicates that the
 * Host has rejected the remote device's request to change connection
 * parameters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.32].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Reason Reason that the connection parameter request was rejected (see
 *        "Status error codes" section)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remote_connection_parameter_request_negative_reply( uint16_t Connection_Handle,
                                                                      uint8_t Reason );

/**
 * @brief HCI_LE_SET_DATA_LENGTH
 * The LE_Set_Data_Length command allows the Host to suggest maximum
 * transmission packet size and maximum packet transmission time
 * (connMaxTxOctets and connMaxTxTime - see Bluetooth spec. Vol 6 [Part B]
 * 4.5.10) to be used for a given connection. The Controller may use smaller or
 * larger values based on local information.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.33].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param TxOctets Preferred maximum number of payload octets that the local
 *        Controller should include in a single Link Layer packet on this
 *        connection.
 *        Values:
 *        - 0x001B ... 0x00FB
 * @param TxTime Preferred maximum number of microseconds that the local
 *        Controller should use to transmit a single Link Layer packet on this
 *        connection.
 *        Values:
 *        - 0x0148 ... 0x4290
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_data_length( uint16_t Connection_Handle,
                                   uint16_t TxOctets,
                                   uint16_t TxTime );

/**
 * @brief HCI_LE_READ_SUGGESTED_DEFAULT_DATA_LENGTH
 * This command allows the Host to read the Host's suggested values
 * (SuggestedMaxTxOctets and SuggestedMaxTxTime) for the Controller's maximum
 * transmitted number of payload octets and maximum packet transmission time to
 * be used for new connections.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.34].
 * 
 * @param[out] SuggestedMaxTxOctets The Host's suggested value for the
 *        Controller's maximum transmitted number of payload octets to be used
 *        for new connections.
 *        Values:
 *        - 0x001B ... 0x00FB
 * @param[out] SuggestedMaxTxTime The Host's suggested value for the
 *        Controller's maximum packet transmission time to be used for new
 *        connections.
 *        Values:
 *        - 0x0148 ... 0x4290
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_suggested_default_data_length( uint16_t* SuggestedMaxTxOctets,
                                                      uint16_t* SuggestedMaxTxTime );

/**
 * @brief HCI_LE_WRITE_SUGGESTED_DEFAULT_DATA_LENGTH
 * This command allows the Host to specify its suggested values for the
 * Controller's maximum transmission number of payload octets and maximum
 * packet transmission time to be used for new connections. The Controller may
 * use smaller or larger values for connInitialMaxTxOctets and
 * connInitialMaxTxTime based on local information.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.35].
 * 
 * @param SuggestedMaxTxOctets The Host's suggested value for the Controller's
 *        maximum transmitted number of payload octets to be used for new
 *        connections.
 *        Values:
 *        - 0x001B ... 0x00FB
 * @param SuggestedMaxTxTime The Host's suggested value for the Controller's
 *        maximum packet transmission time to be used for new connections.
 *        Values:
 *        - 0x0148 ... 0x4290
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_write_suggested_default_data_length( uint16_t SuggestedMaxTxOctets,
                                                       uint16_t SuggestedMaxTxTime );

/**
 * @brief HCI_LE_READ_LOCAL_P256_PUBLIC_KEY
 * This command is used to return the local P-256 public key from the
 * Controller. The Controller shall generate a new P-256 public/private key
 * pair upon receipt of this command.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.36].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_local_p256_public_key( void );

/**
 * @brief HCI_LE_GENERATE_DHKEY
 * This command is used to initiate generation of a Diffie-Hellman key in the
 * Controller for use over the LE transport. This command takes the remote
 * P-256 public key as input. The Diffie-Hellman key generation uses the
 * private key generated by LE_Read_Local_P256_Public_Key command.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.37].
 * 
 * @param Remote_P256_Public_Key The remote P-256 public key in X, Y format:
 *        Octets 31-0: X coordinate
 *        Octets 63-32: Y coordinate
 *        Little Endian Format
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_generate_dhkey( const uint8_t* Remote_P256_Public_Key );

/**
 * @brief HCI_LE_ADD_DEVICE_TO_RESOLVING_LIST
 * This command is used to add one device to the list of address translations
 * used to resolve Resolvable Private Addresses in the Controller.
 * This command cannot be used when address translation is enabled in the
 * Controller and:
 * - Advertising is enabled
 * - Scanning is enabled
 * - Create connection command is outstanding
 * This command can be used at any time when address translation is disabled in
 * the Controller.
 * When a Controller cannot add a device to the resolving list because the list
 * is full, it shall respond with error code 0x07 (Memory Capacity Exceeded).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.38].
 * 
 * @param Peer_Identity_Address_Type Identity address type
 *        Values:
 *        - 0x00: Public Identity Address
 *        - 0x01: Random (static) Identity Address
 * @param Peer_Identity_Address Public or Random (static) Identity Address of
 *        the peer device
 * @param Peer_IRK IRK of the peer device
 * @param Local_IRK IRK of the local device
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_add_device_to_resolving_list( uint8_t Peer_Identity_Address_Type,
                                                const uint8_t* Peer_Identity_Address,
                                                const uint8_t* Peer_IRK,
                                                const uint8_t* Local_IRK );

/**
 * @brief HCI_LE_REMOVE_DEVICE_FROM_RESOLVING_LIST
 * This command is used to remove one device from the list of address
 * translations used to resolve Resolvable Private Addresses in the controller.
 * This command cannot be used when address translation is enabled in the
 * Controller and:
 * - Advertising is enabled
 * - Scanning is enabled
 * - Create connection command is outstanding
 * This command can be used at any time when address translation is disabled in
 * the Controller.
 * When a Controller cannot remove a device from the resolving list because it
 * is not found, it shall respond with error code 0x02 (Unknown Connection
 * Identifier).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.39].
 * 
 * @param Peer_Identity_Address_Type Identity address type
 *        Values:
 *        - 0x00: Public Identity Address
 *        - 0x01: Random (static) Identity Address
 * @param Peer_Identity_Address Public or Random (static) Identity Address of
 *        the peer device
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remove_device_from_resolving_list( uint8_t Peer_Identity_Address_Type,
                                                     const uint8_t* Peer_Identity_Address );

/**
 * @brief HCI_LE_CLEAR_RESOLVING_LIST
 * This command is used to remove all devices from the list of address
 * translations used to resolve Resolvable Private Addresses in the Controller.
 * This command cannot be used when address translation is enabled in the
 * Controller and:
 * - Advertising is enabled
 * - Scanning is enabled
 * - Create connection command is outstanding
 * This command can be used at any time when address translation is disabled in
 * the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.40].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_clear_resolving_list( void );

/**
 * @brief HCI_LE_READ_RESOLVING_LIST_SIZE
 * This command is used to read the total number of address translation entries
 * in the resolving list that can be stored in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.41].
 * 
 * @param[out] Resolving_List_Size Number of address translation entries in the
 *        resolving list
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_resolving_list_size( uint8_t* Resolving_List_Size );

/**
 * @brief HCI_LE_READ_PEER_RESOLVABLE_ADDRESS
 * This command is used to get the current peer Resolvable Private Address
 * being used for the corresponding peer Public and Random (static) Identity
 * Address. The peer's resolvable address being used may change after the
 * command is called.
 * This command can be used at any time.
 * When a Controller cannot find a Resolvable Private Address associated with
 * the Peer Identity Address, it shall respond with error code 0x02 (Unknown
 * Connection Identifier).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.42].
 * 
 * @param Peer_Identity_Address_Type Identity address type
 *        Values:
 *        - 0x00: Public Identity Address
 *        - 0x01: Random (static) Identity Address
 * @param Peer_Identity_Address Public or Random (static) Identity Address of
 *        the peer device
 * @param[out] Peer_Resolvable_Address Resolvable Private Address being used by
 *        the peer device
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_peer_resolvable_address( uint8_t Peer_Identity_Address_Type,
                                                const uint8_t* Peer_Identity_Address,
                                                uint8_t* Peer_Resolvable_Address );

/**
 * @brief HCI_LE_READ_LOCAL_RESOLVABLE_ADDRESS
 * This command is used to get the current local Resolvable Private Address
 * being used for the corresponding peer Identity Address. The local's
 * resolvable address being used may change after the command is called.
 * This command can be used at any time.
 * When a Controller cannot find a Resolvable Private Address associated with
 * the Peer Identity Address, it shall respond with error code 0x02 (Unknown
 * Connection Identifier).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.43].
 * 
 * @param Peer_Identity_Address_Type Identity address type
 *        Values:
 *        - 0x00: Public Identity Address
 *        - 0x01: Random (static) Identity Address
 * @param Peer_Identity_Address Public or Random (static) Identity Address of
 *        the peer device
 * @param[out] Local_Resolvable_Address Resolvable Private Address being used
 *        by the local device
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_local_resolvable_address( uint8_t Peer_Identity_Address_Type,
                                                 const uint8_t* Peer_Identity_Address,
                                                 uint8_t* Local_Resolvable_Address );

/**
 * @brief HCI_LE_SET_ADDRESS_RESOLUTION_ENABLE
 * This command is used to enable resolution of Resolvable Private Addresses in
 * the Controller. This causes the Controller to use the resolving list
 * whenever the Controller receives a local or peer Resolvable Private Address.
 * This command can be used at any time except when:
 * - Advertising is enabled
 * - Scanning is enabled
 * - Create connection command is outstanding
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.44].
 * 
 * @param Address_Resolution_Enable Enable/disable address resolution in the
 *        controller.
 *        0x00: Address Resolution in controller disabled (default),
 *        0x01: Address Resolution in controller enabled
 *        Values:
 *        - 0x00: Address Resolution in controller disabled (default)
 *        - 0x01: Address Resolution in controller enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_address_resolution_enable( uint8_t Address_Resolution_Enable );

/**
 * @brief HCI_LE_SET_RESOLVABLE_PRIVATE_ADDRESS_TIMEOUT
 * This command is used to set the length of time the controller uses a
 * Resolvable Private Address before a new resolvable private address is
 * generated and starts being used. This timeout applies to all addresses
 * generated by the controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.45].
 * 
 * @param RPA_Timeout RPA_Timeout measured in seconds.
 *        Range for N: 0x0001 - 0xA1B8 (1 sec - approximately 11.5 hours)
 *        Default: N= 0x0384 (900 secs or 15 minutes)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_resolvable_private_address_timeout( uint16_t RPA_Timeout );

/**
 * @brief HCI_LE_READ_MAXIMUM_DATA_LENGTH
 * This command allows the Host to read the Controller's maximum supported
 * payload octets and packet duration times for transmission and reception
 * (supportedMaxTxOctets and supportedMaxTxTime, supportedMaxRxOctets, and
 * supportedMaxRxTime.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.46].
 * 
 * @param[out] supportedMaxTxOctets Maximum number of payload octets that the
 *        local Controller supports for transmission of a single Link Layer
 *        packet on a data connection.
 *        Values:
 *        - 0x001B ... 0x00FB
 * @param[out] supportedMaxTxTime Maximum time, in microseconds, that the local
 *        Controller supports for transmission of a single Link Layer packet on
 *        a data connection.
 *        Values:
 *        - 0x0148 ... 0x4290
 * @param[out] supportedMaxRxOctets Maximum number of payload octets that the
 *        local Controller supports for reception of a single Link Layer packet
 *        on a data connection.
 *        Values:
 *        - 0x001B ... 0x00FB
 * @param[out] supportedMaxRxTime Maximum time, in microseconds, that the local
 *        Controller supports for reception of a single Link Layer packet on a
 *        data connection.
 *        Values:
 *        - 0x0148 ... 0x4290
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_maximum_data_length( uint16_t* supportedMaxTxOctets,
                                            uint16_t* supportedMaxTxTime,
                                            uint16_t* supportedMaxRxOctets,
                                            uint16_t* supportedMaxRxTime );

/**
 * @brief HCI_LE_READ_PHY
 * This command is used to read the current transmitter PHY and receiver PHY on
 * the connection identified by the Connection_Handle.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.47].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param[out] TX_PHY Transmitter PHY in use.
 *        Values:
 *        - 0x01: The transmitter PHY for the connection is LE 1M
 *        - 0x02: The transmitter PHY for the connection is LE 2M
 *        - 0x03: The transmitter PHY for the connection is LE Coded [not
 *          supported on STM32WB]
 * @param[out] RX_PHY Receiver PHY in use.
 *        Values:
 *        - 0x01: The receiver PHY for the connection is LE 1M
 *        - 0x02: The receiver PHY for the connection is LE 2M
 *        - 0x03: The receiver PHY for the connection is LE Coded [not
 *          supported on STM32WB]
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_phy( uint16_t Connection_Handle,
                            uint8_t* TX_PHY,
                            uint8_t* RX_PHY );

/**
 * @brief HCI_LE_SET_DEFAULT_PHY
 * This command allows the Host to specify its preferred values for the
 * transmitter PHY and receiver PHY to be used for all subsequent connections
 * over the LE transport.
 * The ALL_PHYS parameter is a bit field that allows the Host to specify, for
 * each
 * direction, whether it has no preference among the PHYs that the Controller
 * supports in a given direction or whether it has specified particular PHYs
 * that it prefers in the TX_PHYS or RX_PHYS parameter.
 * The TX_PHYS parameter is a bit field that indicates the transmitter PHYs
 * that the Host prefers the Controller to use. If the ALL_PHYS parameter
 * specifies that the Host has no preference, the TX_PHYS parameter is ignored;
 * otherwise at least one bit shall be set to 1.
 * The RX_PHYS parameter is a bit field that indicates the receiver PHYs that
 * the Host prefers the Controller to use. If the ALL_PHYS parameter specifies
 * that the Host has no preference, the RX_PHYS parameter is ignored; otherwise
 * at least one bit shall be set to 1.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.48].
 * 
 * @param ALL_PHYS Preferences for TX PHY and RX PHY.
 *        Flags:
 *        - 0x01: The Host has no preference among the transmitter PHYs
 *          supported by the Controller
 *        - 0x02: The Host has no preference among the receiver PHYs supported
 *          by the Controller
 * @param TX_PHYS Preferences for TX PHY.
 *        Flags:
 *        - 0x01: The Host prefers to use the LE 1M transmitter PHY (possibly
 *          among others)
 *        - 0x02: The Host prefers to use the LE 2M transmitter PHY (possibly
 *          among others)
 *        - 0x04: The Host prefers to use the LE Coded transmitter PHY
 *          (possibly among others) [not supported on STM32WB]
 * @param RX_PHYS Preferences for RX PHY.
 *        Flags:
 *        - 0x01: The Host prefers to use the LE 1M receiver PHY (possibly
 *          among others)
 *        - 0x02: The Host prefers to use the LE 2M receiver PHY (possibly
 *          among others)
 *        - 0x04: The Host prefers to use the LE Coded receiver PHY (possibly
 *          among others) [not supported on STM32WB]
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_default_phy( uint8_t ALL_PHYS,
                                   uint8_t TX_PHYS,
                                   uint8_t RX_PHYS );

/**
 * @brief HCI_LE_SET_PHY
 * This command is used to set the PHY preferences for the connection
 * identified by the Connection_Handle. The Controller might not be able to
 * make the change (e.g. because the peer does not support the requested PHY)
 * or may decide that the current PHY is preferable.
 * The ALL_PHYS parameter is a bit field that allows the Host to specify, for
 * each direction, whether it has no preference among the PHYs that the
 * Controller supports in a given direction or whether it has specified
 * particular PHYs that it prefers in the TX_PHYS or RX_PHYS parameter.
 * The TX_PHYS parameter is a bit field that indicates the transmitter PHYs
 * that the Host prefers the Controller to use. If the ALL_PHYS parameter
 * specifies that the Host has no preference, the TX_PHYS parameter is ignored;
 * otherwise at least one bit shall be set to 1.
 * The RX_PHYS parameter is a bit field that indicates the receiver PHYs that
 * the Host prefers the Controller to use. If the ALL_PHYS parameter specifies
 * that the Host has no preference, the RX_PHYS parameter is ignored; otherwise
 * at least one bit shall be set to 1.
 * If, for at least one direction, the Host has specified a preference and the
 * current PHY is not one of those preferred, the Controller shall request a
 * change. Otherwise the Controller may, but need not, request a change.
 * The PHY preferences provided by the LE Set PHY command override those
 * provided via the LE Set Default PHY command (Section 7.8.48) or any
 * preferences previously set using the LE Set PHY command on the same
 * connection.
 * The PHY_options parameter is a bit field that allows the Host to specify
 * options for PHYs. The default value for a new connection shall be all zero
 * bits. The Controller may override any preferred coding for transmitting on
 * the LE Coded PHY.
 * The Host may specify a preferred coding even if it prefers not to use the LE
 * Coded transmitter PHY since the Controller may override the PHY preference.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.49].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param ALL_PHYS Preferences for TX PHY and RX PHY.
 *        Flags:
 *        - 0x01: The Host has no preference among the transmitter PHYs
 *          supported by the Controller
 *        - 0x02: The Host has no preference among the receiver PHYs supported
 *          by the Controller
 * @param TX_PHYS Preferences for TX PHY.
 *        Flags:
 *        - 0x01: The Host prefers to use the LE 1M transmitter PHY (possibly
 *          among others)
 *        - 0x02: The Host prefers to use the LE 2M transmitter PHY (possibly
 *          among others)
 *        - 0x04: The Host prefers to use the LE Coded transmitter PHY
 *          (possibly among others) [not supported on STM32WB]
 * @param RX_PHYS Preferences for RX PHY.
 *        Flags:
 *        - 0x01: The Host prefers to use the LE 1M receiver PHY (possibly
 *          among others)
 *        - 0x02: The Host prefers to use the LE 2M receiver PHY (possibly
 *          among others)
 *        - 0x04: The Host prefers to use the LE Coded receiver PHY (possibly
 *          among others) [not supported on STM32WB]
 * @param PHY_options Bit field used to specify options for PHYs [not used on
 *        STM32WB].
 *        Values:
 *        - 0x0000: the Host has no preferred coding when transmitting on the
 *          LE Coded PHY
 *        - 0x0001: the Host prefers that S=2 coding be used when transmitting
 *          on the LE Coded PHY
 *        - 0x0002: the Host prefers that S=8 coding be used when transmitting
 *          on the LE Coded PHY
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_phy( uint16_t Connection_Handle,
                           uint8_t ALL_PHYS,
                           uint8_t TX_PHYS,
                           uint8_t RX_PHYS,
                           uint16_t PHY_options );

/**
 * @brief HCI_LE_RECEIVER_TEST_V2
 * This command is used to start a test where the DUT receives test reference
 * packets at a fixed interval. The tester generates the test reference
 * packets.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.28].
 * 
 * @param RX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @param PHY PHY to be used by the receiver.
 *        Values:
 *        - 0x01: Receiver set to use the LE 1M PHY
 *        - 0x02: Receiver set to use the LE 2M PHY
 *        - 0x03: Receiver set to use the LE Coded PHY [not supported on
 *          STM32WB]
 * @param Modulation_Index Modulation index capability of the transmitter
 *        Values:
 *        - 0x00: Assume transmitter will have a standard modulation index
 *        - 0x01: Assume transmitter will have a stable modulation index
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_receiver_test_v2( uint8_t RX_Frequency,
                                    uint8_t PHY,
                                    uint8_t Modulation_Index );

/**
 * @brief HCI_LE_TRANSMITTER_TEST_V2
 * This command is used to start a test where the DUT generates test reference
 * packets at a fixed interval.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.29].
 * 
 * @param TX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @param Length_Of_Test_Data Length in bytes of payload data in each packet.
 *        Values:
 *        - 0x00 ... 0x25: for BO variant
 *        - 0x00 ... 0xFF: otherwise
 * @param Packet_Payload Type of packet payload.
 *        Values:
 *        - 0x00: Pseudo-Random bit sequence 9
 *        - 0x01: Pattern of alternating bits '11110000'
 *        - 0x02: Pattern of alternating bits '10101010'
 *        - 0x03: Pseudo-Random bit sequence 15
 *        - 0x04: Pattern of All '1' bits
 *        - 0x05: Pattern of All '0' bits
 *        - 0x06: Pattern of alternating bits '00001111'
 *        - 0x07: Pattern of alternating bits '0101'
 * @param PHY PHY to use for test packet
 *        Values:
 *        - 0x01: Transmitter set to use the LE 1M PHY
 *        - 0x02: Transmitter set to use the LE 2M PHY
 *        - 0x03: Transmitter set to use the LE Coded PHY with S=8 data coding
 *          [not supported on STM32WB]
 *        - 0x04: Transmitter set to use the LE Coded PHY with S=2 data coding
 *          [not supported on STM32WB]
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_transmitter_test_v2( uint8_t TX_Frequency,
                                       uint8_t Length_Of_Test_Data,
                                       uint8_t Packet_Payload,
                                       uint8_t PHY );

/**
 * @brief HCI_LE_SET_ADVERTISING_SET_RANDOM_ADDRESS
 * This command is used by the Host to set the random device address specified
 * by the Random_Address parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.52].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Random_Address Random Device Address.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_advertising_set_random_address( uint8_t Advertising_Handle,
                                                      const uint8_t* Random_Address );

/**
 * @brief HCI_LE_SET_EXTENDED_ADVERTISING_PARAMETERS
 * This command is used by the Host to set the extended advertising parameters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.53].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Adv_Event_Properties Type of advertising event.
 *        Flags:
 *        - 0x0001: Connectable advertising
 *        - 0x0002: Scannable advertising
 *        - 0x0004: Directed advertising
 *        - 0x0008: High Duty Cycle Directed Connectable advertising
 *        - 0x0010: Use legacy advertising PDUs
 *        - 0x0020: Anonymous advertising
 *        - 0x0040: Include TxPower in at least one advertising PDU
 * @param Primary_Adv_Interval_Min Minimum advertising interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x000020 (20.000 ms)  ... 0xFFFFFF (10485759.375 ms)
 * @param Primary_Adv_Interval_Max Maximum advertising interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x000020 (20.000 ms)  ... 0xFFFFFF (10485759.375 ms)
 * @param Primary_Adv_Channel_Map Advertising channel map.
 *        Flags:
 *        - 0x01: Channel 37 shall be used
 *        - 0x02: Channel 38 shall be used
 *        - 0x04: Channel 39 shall be used
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Peer_Address_Type Address type of the peer device.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Peer_Address Public Device Address, Random Device Address, Public
 *        Identity Address, or Random (static) Identity Address of the device
 *        to be connected.
 * @param Adv_Filter_Policy Advertising filter policy
 *        Values:
 *        - 0x00: Process scan and connection requests from all devices (i.e.,
 *          the Filter Accept List is not in use)
 *        - 0x01: Process connection requests from all devices and scan
 *          requests only from devices that are in the Filter Accept List.
 *        - 0x02: Process scan requests from all devices and connection
 *          requests only from devices that are in the Filter Accept List.
 *        - 0x03: Process scan and connection requests only from devices in the
 *          Filter Accept List.
 * @param Adv_TX_Power Advertising TX power. Units: dBm.
 *        Values:
 *        - 127: Host has no preference
 *        - -127 ... 20
 * @param Primary_Adv_PHY Primary advertising PHY.
 *        Values:
 *        - 0x01: Primary advertisement PHY is LE 1M
 *        - 0x03: Primary advertisement PHY is LE Coded [not supported on
 *          STM32WB]
 * @param Secondary_Adv_Max_Skip Secondary advertising maximum skip.
 *        Values:
 *        - 0x00: AUX_ADV_IND shall be sent prior to the next advertising event
 *        - 0x01 ... 0xFF: Maximum advertising events the Controller can skip
 *          before sending the AUX_ADV_IND packets on the secondary advertising
 *          physical channel
 * @param Secondary_Adv_PHY Secondary advertising PHY.
 *        Values:
 *        - 0x01: Secondary advertisement PHY is LE 1M
 *        - 0x02: Secondary advertisement PHY is LE 2M
 *        - 0x03: Secondary advertisement PHY is LE Coded [not supported on
 *          STM32WB]
 * @param Adv_SID Value of the Advertising SID subfield in the ADI field of the
 *        PDU.
 *        Values:
 *        - 0x00 ... 0x0F
 * @param Scan_Req_Notification_Enable Scan request notifications.
 *        Values:
 *        - 0x00: Scan request notifications disabled
 *        - 0x01: Scan request notifications enabled
 * @param[out] Selected_TX_Power Power level selected by the Controller. Units:
 *        dBm.
 *        Values:
 *        - -127 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_advertising_parameters( uint8_t Advertising_Handle,
                                                       uint16_t Adv_Event_Properties,
                                                       const uint8_t* Primary_Adv_Interval_Min,
                                                       const uint8_t* Primary_Adv_Interval_Max,
                                                       uint8_t Primary_Adv_Channel_Map,
                                                       uint8_t Own_Address_Type,
                                                       uint8_t Peer_Address_Type,
                                                       const uint8_t* Peer_Address,
                                                       uint8_t Adv_Filter_Policy,
                                                       uint8_t Adv_TX_Power,
                                                       uint8_t Primary_Adv_PHY,
                                                       uint8_t Secondary_Adv_Max_Skip,
                                                       uint8_t Secondary_Adv_PHY,
                                                       uint8_t Adv_SID,
                                                       uint8_t Scan_Req_Notification_Enable,
                                                       uint8_t* Selected_TX_Power );

/**
 * @brief HCI_LE_SET_EXTENDED_ADVERTISING_DATA
 * This command is used to set the data used in extended advertising PDUs that
 * have a data field.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.54].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Operation Advertising operation.
 *        Values:
 *        - 0x00: Intermediate fragment of fragmented extended advertising data
 *        - 0x01: First fragment of fragmented extended advertising data
 *        - 0x02: Last fragment of fragmented extended advertising data
 *        - 0x03: Complete extended advertising data
 *        - 0x04: Unchanged data (just update the Advertising DID)
 * @param Fragment_Preference Fragment preference.
 *        Values:
 *        - 0x00: The Controller may fragment all data
 *        - 0x01: The Controller should not fragment or should minimize
 *          fragmentation of data
 * @param Advertising_Data_Length Length of Advertising_Data in octets
 * @param Advertising_Data Data formatted as defined in Bluetooth spec. [Vol 3,
 *        Part C, 11].
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_advertising_data( uint8_t Advertising_Handle,
                                                 uint8_t Operation,
                                                 uint8_t Fragment_Preference,
                                                 uint8_t Advertising_Data_Length,
                                                 const uint8_t* Advertising_Data );

/**
 * @brief HCI_LE_SET_EXTENDED_SCAN_RESPONSE_DATA
 * This command is used to provide scan response data used in scanning response
 * PDUs during extended advertising.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.55].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Operation Scan response operation.
 *        Values:
 *        - 0x00: Intermediate fragment of fragmented scan response data
 *        - 0x01: First fragment of fragmented scan response data
 *        - 0x02: Last fragment of fragmented scan response data
 *        - 0x03: Complete scan response data
 * @param Fragment_Preference Fragment preference.
 *        Values:
 *        - 0x00: The Controller may fragment all data
 *        - 0x01: The Controller should not fragment or should minimize
 *          fragmentation of data
 * @param Scan_Response_Data_Length Length of Scan_Response_Data in octets
 * @param Scan_Response_Data Data formatted as defined in Bluetooth spec. [Vol
 *        3, Part C, 11].
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_scan_response_data( uint8_t Advertising_Handle,
                                                   uint8_t Operation,
                                                   uint8_t Fragment_Preference,
                                                   uint8_t Scan_Response_Data_Length,
                                                   const uint8_t* Scan_Response_Data );

/**
 * @brief HCI_LE_SET_EXTENDED_ADVERTISING_ENABLE
 * This command is used to request the Controller to enable or disable one or
 * more advertising sets using the advertising sets identified by the
 * Advertising_Handle[i] parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.56].
 * 
 * @param Enable Enable/disable advertising.
 *        Values:
 *        - 0x00: Advertising is disabled
 *        - 0x01: Advertising is enabled
 * @param Num_Sets Number of advertising sets.
 *        Values:
 *        - 0x00: Disable all advertising sets
 *        - 0x01 ... 0x3F: Number of advertising sets to enable or disable
 * @param Adv_Set See @ref Adv_Set_t
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_advertising_enable( uint8_t Enable,
                                                   uint8_t Num_Sets,
                                                   const Adv_Set_t* Adv_Set );

/**
 * @brief HCI_LE_READ_MAXIMUM_ADVERTISING_DATA_LENGTH
 * This command is used to read the maximum length of data supported by the
 * Controller for use as advertisement data or scan response data in an
 * extended advertising event.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.57].
 * 
 * @param[out] Max_Advertising_Data_Length Maximum supported advertising data
 *        length.
 *        Values:
 *        - 0x001F ... 0x0672
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_maximum_advertising_data_length( uint16_t* Max_Advertising_Data_Length );

/**
 * @brief HCI_LE_READ_NUMBER_OF_SUPPORTED_ADVERTISING_SETS
 * This command is used to read the maximum number of advertising sets
 * supported by the Controller at the same time during extended advertising.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.58].
 * 
 * @param[out] Num_Supported_Advertising_Sets Number of advertising sets
 *        supported at the same time.
 *        Values:
 *        - 0x01 ... 0xF0
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_number_of_supported_advertising_sets( uint8_t* Num_Supported_Advertising_Sets );

/**
 * @brief HCI_LE_REMOVE_ADVERTISING_SET
 * This command is used to remove an advertising set from the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.59].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remove_advertising_set( uint8_t Advertising_Handle );

/**
 * @brief HCI_LE_CLEAR_ADVERTISING_SETS
 * This command is used to remove all existing advertising sets from the
 * Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.60].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_clear_advertising_sets( void );

/**
 * @brief HCI_LE_SET_PERIODIC_ADVERTISING_PARAMETERS
 * This command is used by the Host to set the parameters for periodic
 * advertising.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.61].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Periodic_Adv_Interval_Min Minimum advertising interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0xFFFF (81918.75 ms)
 * @param Periodic_Adv_Interval_Max Maximum advertising interval.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0006 (7.50 ms)  ... 0xFFFF (81918.75 ms)
 * @param Periodic_Adv_Properties Properties.
 *        Flags:
 *        - 0x0040: Include TxPower in the advertising PDU
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_periodic_advertising_parameters( uint8_t Advertising_Handle,
                                                       uint16_t Periodic_Adv_Interval_Min,
                                                       uint16_t Periodic_Adv_Interval_Max,
                                                       uint16_t Periodic_Adv_Properties );

/**
 * @brief HCI_LE_SET_PERIODIC_ADVERTISING_DATA
 * This command is used to set the data used in periodic advertising PDUs.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.62].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Operation Advertising operation.
 *        Values:
 *        - 0x00: Intermediate fragment of fragmented extended advertising data
 *        - 0x01: First fragment of fragmented extended advertising data
 *        - 0x02: Last fragment of fragmented extended advertising data
 *        - 0x03: Complete extended advertising data
 *        - 0x04: Unchanged data (just update the Advertising DID)
 * @param Advertising_Data_Length Length of Advertising_Data in octets
 * @param Advertising_Data Data formatted as defined in Bluetooth spec. [Vol 3,
 *        Part C, 11].
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_periodic_advertising_data( uint8_t Advertising_Handle,
                                                 uint8_t Operation,
                                                 uint8_t Advertising_Data_Length,
                                                 const uint8_t* Advertising_Data );

/**
 * @brief HCI_LE_SET_PERIODIC_ADVERTISING_ENABLE
 * This command is used to request the Controller to enable or disable the
 * periodic advertising for the advertising set specified by the
 * Advertising_Handle parameter (ordinary advertising is not affected).
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.63].
 * 
 * @param Enable Enable/disable advertising.
 *        Flags:
 *        - 0x01: Enable periodic advertising
 *        - 0x02: Include the ADI field in AUX_SYNC_IND PDUs
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_periodic_advertising_enable( uint8_t Enable,
                                                   uint8_t Advertising_Handle );

/**
 * @brief HCI_LE_SET_EXTENDED_SCAN_PARAMETERS
 * This command is used to set the extended scan parameters to be used on the
 * advertising physical channels.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.64].
 * 
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Scanning_Filter_Policy The scanning filter policy determines how the
 *        scanner's Link Layer processes advertising and scan response PDUs.
 *        There is a choice of two primary filter policies: unfiltered and
 *        filtered.
 *        Unfiltered: the Link Layer processes all advertising and scan
 *        response PDUs (i.e., the Filter Accept List is not used).
 *        Filtered: the Link Layer processes advertising and scan response PDUs
 *        only from devices in the Filter Accept List.
 *        With extended scanning filter policies, a directed advertising PDU
 *        accepted by the primary filter policy shall nevertheless be ignored
 *        unless either the TargetA field is identical to the scanner's device
 *        address, or TargetA field is a resolvable private address.
 *        Flags:
 *        - 0x01: 0 = unfiltered scanning policy; 1 = filtered scanning policy
 *        - 0x02: 0 = Basic filter policy; 1 = Extended filter policy
 *        - 0x04: Decision scanning filter policy mode - bit 0 (not supported)
 *        - 0x08: Decision scanning filter policy mode - bit 1 (not supported)
 * @param Scanning_PHYs Scan PHYs.
 *        Flags:
 *        - 0x01: Scan advertisements on the LE 1M PHY
 *        - 0x04: Scan advertisements on the LE Coded PHY [not supported on
 *          STM32WB]
 * @param Scan_Param_Phy See @ref Scan_Param_Phy_t
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_scan_parameters( uint8_t Own_Address_Type,
                                                uint8_t Scanning_Filter_Policy,
                                                uint8_t Scanning_PHYs,
                                                const Scan_Param_Phy_t* Scan_Param_Phy );

/**
 * @brief HCI_LE_SET_EXTENDED_SCAN_ENABLE
 * This command is used to enable or disable extended scanning.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.65].
 * 
 * @param Enable Enable/disable scan.
 *        Values:
 *        - 0x00: Scanning disabled
 *        - 0x01: Scanning enabled
 * @param Filter_Duplicates Duplicate filtering.
 *        Values:
 *        - 0x00: Duplicate filtering disabled
 *        - 0x01: Duplicate filtering enabled
 *        - 0x02: Duplicate filtering enabled, reset for each scan period
 * @param Duration Scan duration.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x0000 (0 ms) : Scan continuously until explicitly disable
 *        - 0x0001 (10 ms)  ... 0xFFFF (655350 ms) : Scan duration
 * @param Period Scan period.
 *        Time = N * 1.28 s.
 *        Values:
 *        - 0x0000 (0 ms) : Scan continuously
 *        - 0x0001 (1280 ms)  ... 0xFFFF (83884800 ms) : Time interval from
 *          when the Controller started its last Scan_Duration until it begins
 *          the subsequent Scan_Duration
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_scan_enable( uint8_t Enable,
                                            uint8_t Filter_Duplicates,
                                            uint16_t Duration,
                                            uint16_t Period );

/**
 * @brief HCI_LE_EXTENDED_CREATE_CONNECTION
 * This command is used to create an ACL connection to a connectable advertiser
 * by means of extended scanning.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.66].
 * 
 * @param Initiator_Filter_Policy Initiator filter policy.
 *        Values:
 *        - 0x00: Filter Accept List is not used to determine which advertiser
 *          to connect to
 *        - 0x01: Filter Accept List is used to determine which advertiser to
 *          connect to (Peer_Address_Type and Peer_Address are ignored)
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Peer_Address_Type Address type of the peer device.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Peer_Address Public Device Address, Random Device Address, Public
 *        Identity Address, or Random (static) Identity Address of the device
 *        to be connected.
 * @param Initiating_PHYs Initiating PHYs.
 *        Flags:
 *        - 0x01: Scan connectable advertisements on the LE 1M PHY- Connection
 *          parameters for the LE 1M PHY
 *        - 0x02: Connection parameters for the LE 2M PHY
 *        - 0x04: Scan connectable advertisements on the LE Coded PHY [not
 *          supported on STM32WB]
 * @param Init_Param_Phy See @ref Init_Param_Phy_t
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_extended_create_connection( uint8_t Initiator_Filter_Policy,
                                              uint8_t Own_Address_Type,
                                              uint8_t Peer_Address_Type,
                                              const uint8_t* Peer_Address,
                                              uint8_t Initiating_PHYs,
                                              const Init_Param_Phy_t* Init_Param_Phy );

/**
 * @brief HCI_LE_PERIODIC_ADVERTISING_CREATE_SYNC
 * This command is used to synchronize with a periodic advertising train from
 * an advertiser and begin receiving periodic advertising packets.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.67].
 * 
 *        Flags:
 *        - 0x01: 0=Use the Advertising_SID, Advertiser_Address_Type, and
 *          Advertiser_Address parameters to determine which advertiser to
 *          listen to; 1=Use the Periodic Advertiser List to determine which
 *          advertiser to listen to
 *        - 0x02: 0=Reporting initially enabled; 1=Reporting initially disabled
 *        - 0x04: 0=Duplicate filtering initially disabled; 1=Duplicate
 *          filtering initially enabled
 * @param Advertising_SID Value of the Advertising SID subfield in the ADI
 *        field of the PDU.
 *        Values:
 *        - 0x00 ... 0x0F
 * @param Advertiser_Address_Type The address type of the advertiser.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Advertiser_Address Public Device Address, Random Device Address,
 *        Public Identity Address, or Random (static) Identity Address of the
 *        advertiser.
 * @param Skip Maximum number of periodic advertising events that can be
 *        skipped after a successful receive.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Sync_Timeout Synchronization timeout for the periodic advertising
 *        train.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x4000 (163840 ms)
 * @param Sync_CTE_Type Specifies whether to only synchronize to periodic
 *        advertising with certain types of CTE.
 *        Flags:
 *        - 0x01: Do not sync to packets with an AoA Constant Tone Extension
 *        - 0x02: Do not sync to packets with an AoD Constant Tone Extension
 *          with 1 us slots
 *        - 0x04: Do not sync to packets with an AoD Constant Tone Extension
 *          with 2 us slots
 *        - 0x10: Do not sync to packets without a Constant Tone Extension
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_periodic_advertising_create_sync( uint8_t Options,
                                                    uint8_t Advertising_SID,
                                                    uint8_t Advertiser_Address_Type,
                                                    const uint8_t* Advertiser_Address,
                                                    uint16_t Skip,
                                                    uint16_t Sync_Timeout,
                                                    uint8_t Sync_CTE_Type );

/**
 * @brief HCI_LE_PERIODIC_ADVERTISING_CREATE_SYNC_CANCEL
 * This command is used to cancel the HCI_LE_Periodic_Advertising_Create_Sync
 * command while it is pending.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.68].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_periodic_advertising_create_sync_cancel( void );

/**
 * @brief HCI_LE_PERIODIC_ADVERTISING_TERMINATE_SYNC
 * This command is used to stop reception of the periodic advertising train
 * identified by the Sync_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.69].
 * 
 * @param Sync_Handle Handle identifying the periodic advertising train.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_periodic_advertising_terminate_sync( uint16_t Sync_Handle );

/**
 * @brief HCI_LE_ADD_DEVICE_TO_PERIODIC_ADVERTISER_LIST
 * This command is used to add an entry, consisting of a single device address
 * and SID, to the Periodic Advertiser list stored in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.70].
 * 
 * @param Advertiser_Address_Type The address type of the advertiser.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Advertiser_Address Public Device Address, Random Device Address,
 *        Public Identity Address, or Random (static) Identity Address of the
 *        advertiser.
 * @param Advertising_SID Value of the Advertising SID subfield in the ADI
 *        field of the PDU.
 *        Values:
 *        - 0x00 ... 0x0F
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_add_device_to_periodic_advertiser_list( uint8_t Advertiser_Address_Type,
                                                          const uint8_t* Advertiser_Address,
                                                          uint8_t Advertising_SID );

/**
 * @brief HCI_LE_REMOVE_DEVICE_FROM_PERIODIC_ADVERTISER_LIST
 * This command is used to remove one entry from the list of Periodic
 * Advertisers stored in the Controller. Removals from the Periodic Advertisers
 * List take effect immediately.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.71].
 * 
 * @param Advertiser_Address_Type The address type of the advertiser.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Advertiser_Address Public Device Address, Random Device Address,
 *        Public Identity Address, or Random (static) Identity Address of the
 *        advertiser.
 * @param Advertising_SID Value of the Advertising SID subfield in the ADI
 *        field of the PDU.
 *        Values:
 *        - 0x00 ... 0x0F
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remove_device_from_periodic_advertiser_list( uint8_t Advertiser_Address_Type,
                                                               const uint8_t* Advertiser_Address,
                                                               uint8_t Advertising_SID );

/**
 * @brief HCI_LE_CLEAR_PERIODIC_ADVERTISER_LIST
 * This command is used to remove all entries from the list of Periodic
 * Advertisers in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.72].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_clear_periodic_advertiser_list( void );

/**
 * @brief HCI_LE_READ_PERIODIC_ADVERTISER_LIST_SIZE
 * This command is used to read the total number of Periodic Advertiser list
 * entries that can be stored in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.73].
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_periodic_advertiser_list_size( uint8_t* Periodic_Advertiser_List_Size );

/**
 * @brief HCI_LE_READ_TRANSMIT_POWER
 * This command is used to read the minimum and maximum transmit powers
 * supported by the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.74].
 * 
 * @param[out] Min_TX_Power Signed integer.
 *        Units: dBm.
 *        Values:
 *        - -127 ... 20
 * @param[out] Max_TX_Power Signed integer.
 *        Units: dBm.
 *        Values:
 *        - -127 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_transmit_power( uint8_t* Min_TX_Power,
                                       uint8_t* Max_TX_Power );

/**
 * @brief HCI_LE_READ_RF_PATH_COMPENSATION
 * This command is used to read the RF path compensation value parameters used
 * in the Tx power level and RSSI calculation.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.75].
 * 
 * @param[out] RF_TX_Path_Compensation RF TX Path Compensation Value (16-bit
 *        signed integer).
 *        Units: 0.1 dB.
 *        Values:
 *        - -1280 ... 1280
 * @param[out] RF_RX_Path_Compensation RF RX Path Compensation Value (16-bit
 *        signed integer).
 *        Units: 0.1 dB.
 *        Values:
 *        - -1280 ... 1280
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_rf_path_compensation( uint16_t* RF_TX_Path_Compensation,
                                             uint16_t* RF_RX_Path_Compensation );

/**
 * @brief HCI_LE_WRITE_RF_PATH_COMPENSATION
 * This command is used to indicate the RF path gain or loss between the RF
 * transceiver and the antenna contributed by intermediate components. A
 * positive value means a net RF path gain and a negative value means a net RF
 * path loss.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.76].
 * 
 * @param RF_TX_Path_Compensation RF TX Path Compensation Value (16-bit signed
 *        integer).
 *        Units: 0.1 dB.
 *        Values:
 *        - -1280 ... 1280
 * @param RF_RX_Path_Compensation RF RX Path Compensation Value (16-bit signed
 *        integer).
 *        Units: 0.1 dB.
 *        Values:
 *        - -1280 ... 1280
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_write_rf_path_compensation( uint16_t RF_TX_Path_Compensation,
                                              uint16_t RF_RX_Path_Compensation );

/**
 * @brief HCI_LE_SET_PRIVACY_MODE
 * This command is used to allow the Host to specify the privacy mode to be
 * used for a given entry on the resolving list.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.77].
 * 
 * @param Peer_Identity_Address_Type Identity address type
 *        Values:
 *        - 0x00: Public Identity Address
 *        - 0x01: Random (static) Identity Address
 * @param Peer_Identity_Address Public or Random (static) Identity Address of
 *        the peer device
 * @param Privacy_Mode Privacy Mode.
 *        Values:
 *        - 0x00: Use Network Privacy Mode
 *        - 0x01: Use Device Privacy Mode
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_privacy_mode( uint8_t Peer_Identity_Address_Type,
                                    const uint8_t* Peer_Identity_Address,
                                    uint8_t Privacy_Mode );

/**
 * @brief HCI_LE_RECEIVER_TEST_V3
 * This command is used to start a test where the DUT receives test reference
 * packets at a fixed interval. The tester generates the test reference
 * packets.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.28].
 * 
 * @param RX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @param PHY PHY to be used by the receiver.
 *        Values:
 *        - 0x01: Receiver set to use the LE 1M PHY
 *        - 0x02: Receiver set to use the LE 2M PHY
 *        - 0x03: Receiver set to use the LE Coded PHY [not supported on
 *          STM32WB]
 * @param Modulation_Index Modulation index capability of the transmitter
 *        Values:
 *        - 0x00: Assume transmitter will have a standard modulation index
 *        - 0x01: Assume transmitter will have a stable modulation index
 * @param Expected_CTE_Length Expected length of the Constant Tone Extensions
 *        in received test reference packets.
 *        Values:
 *        - 0x00: No Constant Tone Extension expected (default)
 *        - 0x02 ... 0x14: Expected length of the Constant Tone Extension in 8
 *          us units
 * @param Expected_CTE_Type Expected type of the Constant Tone Extensions in
 *        received test reference packets.
 *        Values:
 *        - 0x00: Expect AoA Constant Tone Extension
 *        - 0x01: Expect AoD Constant Tone Extension with 1 us slots
 *        - 0x02: Expect AoD Constant Tone Extension with 2 us slots
 * @param Slot_Durations Slot Durations.
 *        Values:
 *        - 0x01: Switching and sampling slots are 1 us each
 *        - 0x02: Switching and sampling slots are 2 us each
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_receiver_test_v3( uint8_t RX_Frequency,
                                    uint8_t PHY,
                                    uint8_t Modulation_Index,
                                    uint8_t Expected_CTE_Length,
                                    uint8_t Expected_CTE_Type,
                                    uint8_t Slot_Durations,
                                    uint8_t Switching_Pattern_Length,
                                    const uint8_t* Antenna_IDs );

/**
 * @brief HCI_LE_TRANSMITTER_TEST_V3
 * This command is used for testing purpose.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.29].
 * 
 * @param TX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @param Length_Of_Test_Data Length in bytes of payload data in each packet.
 *        Values:
 *        - 0x00 ... 0x25: for BO variant
 *        - 0x00 ... 0xFF: otherwise
 * @param Packet_Payload Type of packet payload.
 *        Values:
 *        - 0x00: Pseudo-Random bit sequence 9
 *        - 0x01: Pattern of alternating bits '11110000'
 *        - 0x02: Pattern of alternating bits '10101010'
 *        - 0x03: Pseudo-Random bit sequence 15
 *        - 0x04: Pattern of All '1' bits
 *        - 0x05: Pattern of All '0' bits
 *        - 0x06: Pattern of alternating bits '00001111'
 *        - 0x07: Pattern of alternating bits '0101'
 * @param PHY PHY to use for test packet
 *        Values:
 *        - 0x01: Transmitter set to use the LE 1M PHY
 *        - 0x02: Transmitter set to use the LE 2M PHY
 *        - 0x03: Transmitter set to use the LE Coded PHY with S=8 data coding
 *          [not supported on STM32WB]
 *        - 0x04: Transmitter set to use the LE Coded PHY with S=2 data coding
 *          [not supported on STM32WB]
 * @param CTE_Length Constant Tone Extension length in 8 us units.
 *        Values:
 *        - 0x02 ... 0x14
 * @param CTE_Type Constant Tone Extension type.
 *        Values:
 *        - 0x00: AoA CTE
 *        - 0x01: AoD CTE with 1 us slots
 *        - 0x02: AoD CTE with 2 us slots
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_transmitter_test_v3( uint8_t TX_Frequency,
                                       uint8_t Length_Of_Test_Data,
                                       uint8_t Packet_Payload,
                                       uint8_t PHY,
                                       uint8_t CTE_Length,
                                       uint8_t CTE_Type,
                                       uint8_t Switching_Pattern_Length,
                                       const uint8_t* Antenna_IDs );

/**
 * @brief HCI_LE_SET_CONNECTIONLESS_CTE_TRANSMIT_PARAMETERS
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param CTE_Length Constant Tone Extension length in 8 us units.
 *        Values:
 *        - 0x02 ... 0x14
 * @param CTE_Type Constant Tone Extension type.
 *        Values:
 *        - 0x00: AoA CTE
 *        - 0x01: AoD CTE with 1 us slots
 *        - 0x02: AoD CTE with 2 us slots
 * @param CTE_Count Number of Constant Tone Extensions to transmit in each
 *        periodic advertising interval.
 *        Values:
 *        - 0x01 ... 0x10
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_connectionless_cte_transmit_parameters( uint8_t Advertising_Handle,
                                                              uint8_t CTE_Length,
                                                              uint8_t CTE_Type,
                                                              uint8_t CTE_Count,
                                                              uint8_t Switching_Pattern_Length,
                                                              const uint8_t* Antenna_IDs );

/**
 * @brief HCI_LE_SET_CONNECTIONLESS_CTE_TRANSMIT_ENABLE
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param CTE_Enable Used to enable or disable Constant Tone Extension.
 *        Values:
 *        - 0x00: Advertising with CTE is disabled (default)
 *        - 0x01: Advertising with CTE is enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_connectionless_cte_transmit_enable( uint8_t Advertising_Handle,
                                                          uint8_t CTE_Enable );

/**
 * @brief HCI_LE_SET_CONNECTIONLESS_IQ_SAMPLING_ENABLE
 * 
 * @param Sync_Handle Handle identifying the periodic advertising train.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Sampling_Enable Used to enable or disable IQ sampling.
 *        Values:
 *        - 0x00: IQ sampling is disabled (default)
 *        - 0x01: IQ sampling is enabled
 * @param Slot_Durations Slot Durations.
 *        Values:
 *        - 0x01: Switching and sampling slots are 1 us each
 *        - 0x02: Switching and sampling slots are 2 us each
 * @param Max_Sampled_CTEs Number of Constant Tone Extensions to sample and
 *        report.
 *        Values:
 *        - 0x00: Sample and report all available CTEs
 *        - 0x01 ... 0x10: The maximum number of CTEs to sample and report in
 *          each periodic advertising interval
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_connectionless_iq_sampling_enable( uint16_t Sync_Handle,
                                                         uint8_t Sampling_Enable,
                                                         uint8_t Slot_Durations,
                                                         uint8_t Max_Sampled_CTEs,
                                                         uint8_t Switching_Pattern_Length,
                                                         const uint8_t* Antenna_IDs );

/**
 * @brief HCI_LE_SET_CONNECTION_CTE_RECEIVE_PARAMETERS
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Sampling_Enable Used to enable or disable IQ sampling.
 *        Values:
 *        - 0x00: IQ sampling is disabled (default)
 *        - 0x01: IQ sampling is enabled
 * @param Slot_Durations Slot Durations.
 *        Values:
 *        - 0x01: Switching and sampling slots are 1 us each
 *        - 0x02: Switching and sampling slots are 2 us each
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_connection_cte_receive_parameters( uint16_t Connection_Handle,
                                                         uint8_t Sampling_Enable,
                                                         uint8_t Slot_Durations,
                                                         uint8_t Switching_Pattern_Length,
                                                         const uint8_t* Antenna_IDs );

/**
 * @brief HCI_LE_SET_CONNECTION_CTE_TRANSMIT_PARAMETERS
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param CTE_Types Allowed Constant Tone Extension response type.
 *        Values:
 *        - 0x00: Allow AoA CTE Response
 *        - 0x01: Allow AoD CTE Response with 1 us slots
 *        - 0x02: Allow AoD CTE Response with 2 us slots
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_connection_cte_transmit_parameters( uint16_t Connection_Handle,
                                                          uint8_t CTE_Types,
                                                          uint8_t Switching_Pattern_Length,
                                                          const uint8_t* Antenna_IDs );

/**
 * @brief HCI_LE_CONNECTION_CTE_REQUEST_ENABLE
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Enable Used to enable or disable Constant Tone Extension Request for
 *        the connection.
 *        Values:
 *        - 0x00: Disable CTE Request (default)
 *        - 0x01: Enable CTE Request
 * @param CTE_Request_Interval Constant Tone Extension Request interval.
 *        Values:
 *        - 0x0000: Initiate the CTE Request procedure once, at the earliest
 *          practical opportunity
 *        - 0x0001 ... 0xFFFF: Requested interval for initiating the CTE
 *          Request procedure in number of underlying connection events
 * @param Requested_CTE_Length Minimum length of the Constant Tone Extension
 *        being requested in 8 us units.
 *        Values:
 *        - 0x02 ... 0x14
 * @param Requested_CTE_Type Constant Tone Extension type.
 *        Values:
 *        - 0x00: AoA CTE
 *        - 0x01: AoD CTE with 1 us slots
 *        - 0x02: AoD CTE with 2 us slots
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_connection_cte_request_enable( uint16_t Connection_Handle,
                                                 uint8_t Enable,
                                                 uint16_t CTE_Request_Interval,
                                                 uint8_t Requested_CTE_Length,
                                                 uint8_t Requested_CTE_Type );

/**
 * @brief HCI_LE_CONNECTION_CTE_RESPONSE_ENABLE
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Enable Used to enable or disable Constant Tone Extension Response for
 *        the connection.
 *        Values:
 *        - 0x00: Disable CTE Response (default)
 *        - 0x01: Enable CTE Response
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_connection_cte_response_enable( uint16_t Connection_Handle,
                                                  uint8_t Enable );

/**
 * @brief HCI_LE_READ_ANTENNA_INFORMATION
 * 
 * @param[out] Supported_Switching_Sampling_Rates Supported switching and
 *        sampling rates.
 *        Flags:
 *        - 0x01: 1 us switching supported for AoD transmission
 *        - 0x02: 1 us sampling supported for AoD reception
 *        - 0x04: 1 us switching and sampling supported for AoA reception
 * @param[out] Num_Antennae Number of antennae supported by the Controller.
 *        Values:
 *        - 0x01 ... 0x4B
 * @param[out] Max_Switching_Pattern_Length Maximum length of antenna switching
 *        pattern supported by the Controller.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param[out] Max_CTE_Length Maximum length of a transmitted Constant Tone
 *        Extension supported in 8 us units.
 *        Values:
 *        - 0x02 ... 0x14
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_antenna_information( uint8_t* Supported_Switching_Sampling_Rates,
                                            uint8_t* Num_Antennae,
                                            uint8_t* Max_Switching_Pattern_Length,
                                            uint8_t* Max_CTE_Length );

/**
 * @brief HCI_LE_SET_PERIODIC_ADVERTISING_RECEIVE_ENABLE
 * This command is used to enable or disable reports for the periodic
 * advertising train identified by the Sync_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.88].
 * 
 * @param Sync_Handle Handle identifying the periodic advertising train.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Enable Used to determine whether reporting and duplicate filtering
 *        are enabled or disabled.
 *        Flags:
 *        - 0x01: Reporting enabled
 *        - 0x02: Duplicate filtering enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_periodic_advertising_receive_enable( uint16_t Sync_Handle,
                                                           uint8_t Enable );

/**
 * @brief HCI_LE_PERIODIC_ADVERTISING_SYNC_TRANSFER
 * This command is used to instruct the Controller to send synchronization
 * information about the periodic advertising train identified by the
 * Sync_Handle parameter to a connected device..
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.89].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Service_Data A value provided by the Host.
 * @param Sync_Handle Handle identifying the periodic advertising train.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_periodic_advertising_sync_transfer( uint16_t Connection_Handle,
                                                      uint16_t Service_Data,
                                                      uint16_t Sync_Handle );

/**
 * @brief HCI_LE_PERIODIC_ADVERTISING_SET_INFO_TRANSFER
 * This command is used to instruct the Controller to send synchronization
 * information about the periodic advertising in an advertising set to a
 * connected device.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.90].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Service_Data A value provided by the Host.
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_periodic_advertising_set_info_transfer( uint16_t Connection_Handle,
                                                          uint16_t Service_Data,
                                                          uint8_t Advertising_Handle );

/**
 * @brief HCI_LE_SET_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS
 * This command is used to specify how the Controller will process periodic
 * advertising synchronization information received from the device identified
 * by the Connection_Handle parameter (the "transfer mode").
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.91].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Mode Action to be taken when periodic advertising synchronization
 *        information is received.
 *        Values:
 *        - 0x00: No attempt is made to synchronize to the periodic advertising
 *          and no HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is
 *          sent to the Host.
 *        - 0x01: An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event
 *          is sent to the Host. HCI_LE_Periodic_Advertising_Report events will
 *          be disabled.
 *        - 0x02: An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event
 *          is sent to the Host. HCI_LE_Periodic_Advertising_Report events will
 *          be enabled with duplicate filtering disabled.
 *        - 0x03: An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event
 *          is sent to the Host. HCI_LE_Periodic_Advertising_Report events will
 *          be enabled with duplicate filtering enabled.
 * @param Skip Maximum number of periodic advertising events that can be
 *        skipped after a successful receive.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Sync_Timeout Synchronization timeout for the periodic advertising
 *        train.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x4000 (163840 ms)
 * @param CTE_Type Specifies whether to only synchronize to periodic
 *        advertising with certain types of CTE.
 *        Flags:
 *        - 0x01: Do not sync to packets with an AoA Constant Tone Extension
 *        - 0x02: Do not sync to packets with an AoD Constant Tone Extension
 *          with 1 us slots
 *        - 0x04: Do not sync to packets with an AoD Constant Tone Extension
 *          with 2 us slots
 *        - 0x10: Do not sync to packets without a Constant Tone Extension
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_periodic_advertising_sync_transfer_parameters( uint16_t Connection_Handle,
                                                                     uint8_t Mode,
                                                                     uint16_t Skip,
                                                                     uint16_t Sync_Timeout,
                                                                     uint8_t CTE_Type );

/**
 * @brief HCI_LE_SET_DEFAULT_PERIODIC_ADVERTISING_SYNC_TRANSFER_PARAMETERS
 * This command is used to specify the initial value for the mode, skip,
 * timeout, and Constant Tone Extension type (set by the
 * HCI_LE_Set_Periodic_Advertising_Sync_Transfer_Parameters command) to be used
 * for all subsequent connections over the LE transport.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.92].
 * 
 * @param Mode Action to be taken when periodic advertising synchronization
 *        information is received.
 *        Values:
 *        - 0x00: No attempt is made to synchronize to the periodic advertising
 *          and no HCI_LE_Periodic_Advertising_Sync_Transfer_Received event is
 *          sent to the Host.
 *        - 0x01: An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event
 *          is sent to the Host. HCI_LE_Periodic_Advertising_Report events will
 *          be disabled.
 *        - 0x02: An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event
 *          is sent to the Host. HCI_LE_Periodic_Advertising_Report events will
 *          be enabled with duplicate filtering disabled.
 *        - 0x03: An HCI_LE_Periodic_Advertising_Sync_Transfer_Received event
 *          is sent to the Host. HCI_LE_Periodic_Advertising_Report events will
 *          be enabled with duplicate filtering enabled.
 * @param Skip Maximum number of periodic advertising events that can be
 *        skipped after a successful receive.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Sync_Timeout Synchronization timeout for the periodic advertising
 *        train.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x4000 (163840 ms)
 * @param CTE_Type Specifies whether to only synchronize to periodic
 *        advertising with certain types of CTE.
 *        Flags:
 *        - 0x01: Do not sync to packets with an AoA Constant Tone Extension
 *        - 0x02: Do not sync to packets with an AoD Constant Tone Extension
 *          with 1 us slots
 *        - 0x04: Do not sync to packets with an AoD Constant Tone Extension
 *          with 2 us slots
 *        - 0x10: Do not sync to packets without a Constant Tone Extension
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_default_periodic_advertising_sync_transfer_parameters( uint8_t Mode,
                                                                             uint16_t Skip,
                                                                             uint16_t Sync_Timeout,
                                                                             uint8_t CTE_Type );

/**
 * @brief HCI_LE_GENERATE_DHKEY_V2
 * This command is used to initiate generation of a Diffie-Hellman key in the
 * Controller for use over the LE transport. This command takes the remote
 * P-256 public key as input. The Diffie-Hellman key generation uses the
 * private key generated by the HCI_LE_Read_Local_P-256_Public_Key command or
 * the private debug key.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.37].
 * 
 * @param Remote_P256_Public_Key The remote P-256 public key in X, Y format:
 *        Octets 31-0: X coordinate
 *        Octets 63-32: Y coordinate
 *        Little Endian Format
 * @param Key_Type Type of private key used for the Diffie-Hellman key
 *        generation.
 *        Values:
 *        - 0x00: Use the generated private key
 *        - 0x01: Use the debug private key
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_generate_dhkey_v2( const uint8_t* Remote_P256_Public_Key,
                                     uint8_t Key_Type );

/**
 * @brief HCI_LE_READ_BUFFER_SIZE_V2
 * This command is used to read the maximum size of the data portion of ACL
 * data packets and isochronous data packets sent from the Host to the
 * Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.2].
 * 
 * @param[out] LE_ACL_Data_Packet_Length Used to determine the maximum size of
 *        the L2CAP PDU segments that are contained in ACL data packets, and
 *        which are transferred from the Host to the Controller to be broken up
 *        into packets by the Link Layer.
 *        Values:
 *        - 0x0000: No dedicated LE Buffer exists.
 *        - 0x001B ... 0x00FF: Maximum length (in octets) of the data portion
 *          of each HCI ACL data packet.
 * @param[out] Total_Num_LE_ACL_Data_Packets Contains the total number of HCI
 *        ACL Data packets that can be stored in the data buffers of the
 *        Controller.
 *        Values:
 *        - 0x00: No dedicated LE Buffer exists.
 *        - 0x01 ... 0xFF: The total number of HCI ACL data packets that can be
 *          stored in the data buffers of the Controller.
 * @param[out] ISO_Data_Packet_Length Used to determine the maximum size of the
 *        SDU segments that are contained in isochronous data packets, and
 *        which are transferred from the Host to the Controller.
 *        Values:
 *        - 0x0000: No dedicated ISO Buffer exists.
 *        - 0x0001 ... 0x0FFF: The maximum length (in octets) of the data
 *          portion of each HCI ISO data packet.
 * @param[out] Total_Num_ISO_Data_Packets Contains the total number of
 *        isochronous data packets that can be stored in the data buffers of
 *        the Controller.
 *        Values:
 *        - 0x00: No dedicated ISO Buffer exists.
 *        - 0x01 ... 0xFF: The total number of HCI ISO data packets that can be
 *          stored in the ISO buffers of the Controller.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_buffer_size_v2( uint16_t* LE_ACL_Data_Packet_Length,
                                       uint8_t* Total_Num_LE_ACL_Data_Packets,
                                       uint16_t* ISO_Data_Packet_Length,
                                       uint8_t* Total_Num_ISO_Data_Packets );

/**
 * @brief HCI_LE_READ_ISO_TX_SYNC
 * This command is used to read the TX_Time_Stamp and Time_Offset of a
 * transmitted SDU identified by the Packet_Sequence_Number on a CIS or BIS
 * identified by the Connection_Handle parameter on the Central or Peripheral.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.96].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_iso_tx_sync( uint16_t Connection_Handle,
                                    uint16_t* Packet_Sequence_Number,
                                    uint32_t* TX_Time_Stamp,
                                    uint8_t* Time_Offset );

/**
 * @brief HCI_LE_SET_CIG_PARAMETERS
 * This command is used by a Central's Host to create a CIG and to set the
 * parameters of one or more CISes that are associated with a CIG in the
 * Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.97].
 * 
 * @param CIG_ID CIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param SDU_Interval_C_To_P Interval, in microseconds, of periodic SDUs.
 *        Values:
 *        - 0x0000FF ... 0x0FFFFF
 * @param SDU_Interval_P_To_C Interval, in microseconds, of periodic SDUs.
 *        Values:
 *        - 0x0000FF ... 0x0FFFFF
 * @param Worst_Case_SCA Worst-case sleep clock accuracy.
 *        Values:
 *        - 0x00: 251 ppm to 500 ppm
 *        - 0x01: 151 ppm to 250 ppm
 *        - 0x02: 101 ppm to 150 ppm
 *        - 0x03: 76 ppm to 100 ppm
 *        - 0x04: 51 ppm to 75 ppm
 *        - 0x05: 31 ppm to 50 ppm
 *        - 0x06: 21 ppm to 30 ppm
 *        - 0x07: 0 ppm to 20 ppm
 * @param Packing Preferred method of arranging subevents of multiple CISes.
 *        Values:
 *        - 0x00: Sequential
 *        - 0x01: Interleaved
 * @param Framing Format of the CIS Data PDUs.
 *        Values:
 *        - 0x00: Unframed
 *        - 0x01: Framed
 * @param Max_Transport_Latency_C_To_P Maximum transport latency, in
 *        milliseconds.
 *        Values:
 *        - 0x0005 ... 0x0FA0
 * @param Max_Transport_Latency_P_To_C Maximum transport latency, in
 *        milliseconds.
 *        Values:
 *        - 0x0005 ... 0x0FA0
 * @param CIS_Count Total number of CIS configurations in the CIG.
 *        Values:
 *        - 0x00 ... 0x1F
 * @param CIS_cfg See @ref CIS_cfg_t
 * @param[out] CIS_Count_Ret Total number of CIS configurations added or
 *        modified by this command.
 *        Values:
 *        - 0x00 ... 0x1F
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_cig_parameters( uint8_t CIG_ID,
                                      const uint8_t* SDU_Interval_C_To_P,
                                      const uint8_t* SDU_Interval_P_To_C,
                                      uint8_t Worst_Case_SCA,
                                      uint8_t Packing,
                                      uint8_t Framing,
                                      uint16_t Max_Transport_Latency_C_To_P,
                                      uint16_t Max_Transport_Latency_P_To_C,
                                      uint8_t CIS_Count,
                                      const CIS_cfg_t* CIS_cfg,
                                      uint8_t* CIS_Count_Ret,
                                      uint16_t* Connection_Handle );

/**
 * @brief HCI_LE_SET_CIG_PARAMETERS_TEST
 * This command is used for testing purposes by a Central's Host to create a
 * CIG and to set the parameters of one or more CISes that are associated with
 * a CIG in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.98].
 * 
 * @param CIG_ID CIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param SDU_Interval_C_To_P Interval, in microseconds, of periodic SDUs.
 *        Values:
 *        - 0x0000FF ... 0x0FFFFF
 * @param SDU_Interval_P_To_C Interval, in microseconds, of periodic SDUs.
 *        Values:
 *        - 0x0000FF ... 0x0FFFFF
 * @param FT_C_To_P Flush timeout in multiples of ISO_Interval for each payload
 *        sent from the Central to Peripheral.
 *        Values:
 *        - 0x01 ... 0xFF
 * @param FT_P_To_C Flush timeout in multiples of ISO_Interval for each payload
 *        sent from the Peripheral to Central.
 *        Values:
 *        - 0x01 ... 0xFF
 * @param ISO_Interval Time between consecutive BIG anchor points.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0004 (5.00 ms)  ... 0x0C80 (4000.00 ms)
 * @param Worst_Case_SCA Worst-case sleep clock accuracy.
 *        Values:
 *        - 0x00: 251 ppm to 500 ppm
 *        - 0x01: 151 ppm to 250 ppm
 *        - 0x02: 101 ppm to 150 ppm
 *        - 0x03: 76 ppm to 100 ppm
 *        - 0x04: 51 ppm to 75 ppm
 *        - 0x05: 31 ppm to 50 ppm
 *        - 0x06: 21 ppm to 30 ppm
 *        - 0x07: 0 ppm to 20 ppm
 * @param Packing Preferred method of arranging subevents of multiple CISes.
 *        Values:
 *        - 0x00: Sequential
 *        - 0x01: Interleaved
 * @param Framing Format of the CIS Data PDUs.
 *        Values:
 *        - 0x00: Unframed
 *        - 0x01: Framed
 * @param CIS_Count Total number of CIS configurations in the CIG.
 *        Values:
 *        - 0x00 ... 0x1F
 * @param CIS_tst_cfg See @ref CIS_tst_cfg_t
 * @param[out] CIS_Count_Ret Total number of CIS configurations added or
 *        modified by this command.
 *        Values:
 *        - 0x00 ... 0x1F
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_cig_parameters_test( uint8_t CIG_ID,
                                           const uint8_t* SDU_Interval_C_To_P,
                                           const uint8_t* SDU_Interval_P_To_C,
                                           uint8_t FT_C_To_P,
                                           uint8_t FT_P_To_C,
                                           uint16_t ISO_Interval,
                                           uint8_t Worst_Case_SCA,
                                           uint8_t Packing,
                                           uint8_t Framing,
                                           uint8_t CIS_Count,
                                           const CIS_tst_cfg_t* CIS_tst_cfg,
                                           uint8_t* CIS_Count_Ret,
                                           uint16_t* Connection_Handle );

/**
 * @brief HCI_LE_CREATE_CIS
 * This command is used by the Central's Host to create one or more CISes using
 * the connections identified by the ACL_Connection_Handle arrayed parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.99].
 * 
 * @param CIS_Count Total number of CIS configurations in the CIG.
 *        Values:
 *        - 0x00 ... 0x1F
 * @param CIS_create See @ref CIS_create_t
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_create_cis( uint8_t CIS_Count,
                              const CIS_create_t* CIS_create );

/**
 * @brief HCI_LE_REMOVE_CIG
 * This command is used by the Central's Host to remove the CIG identified by
 * CIG_ID.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.100].
 * 
 * @param CIG_ID CIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remove_cig( uint8_t CIG_ID );

/**
 * @brief HCI_LE_ACCEPT_CIS_REQUEST
 * This command is used by the Peripheral's Host to inform the Controller to
 * accept the request for the CIS that is identified by the Connection_Handle.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.101].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_accept_cis_request( uint16_t Connection_Handle );

/**
 * @brief HCI_LE_REJECT_CIS_REQUEST
 * This command is used by the Peripheral's Host to inform the Controller to
 * reject the request for the CIS that is identified by the Connection_Handle.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.102].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Reason Reason the CIS request was rejected (see "Status error codes"
 *        section).
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_reject_cis_request( uint16_t Connection_Handle,
                                      uint8_t Reason );

/**
 * @brief HCI_LE_CREATE_BIG
 * This command is used to create a BIG with one or more BISes. All BISes in a
 * BIG have the same value for all parameters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.103].
 * 
 * @param BIG_Handle BIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Num_BIS Total number of BISes in the BIG.
 *        Values:
 *        - 0x01 ... 0x1F
 * @param SDU_Interval Interval, in microseconds, of periodic SDUs.
 *        Values:
 *        - 0x0000FF ... 0x0FFFFF
 * @param Max_SDU Maximum size of an SDU in octets.
 *        Values:
 *        - 0x0001 ... 0x0FFF
 * @param Max_Transport_Latency Maximum transport latency, in milliseconds.
 *        Values:
 *        - 0x0005 ... 0x0FA0
 * @param RTN Number of times that every BIS Data PDU should be retransmitted.
 *        Values:
 *        - 0x00 ... 0x1E
 * @param PHY PHY used for transmission of PDUs of BISes in the BIG.
 *        Flags:
 *        - 0x01: The transmitter PHY of packets is LE 1M
 *        - 0x02: The transmitter PHY of packets is LE 2M
 *        - 0x04: The transmitter PHY of packets is LE Coded
 * @param Packing Preferred method of arranging subevents of multiple CISes.
 *        Values:
 *        - 0x00: Sequential
 *        - 0x01: Interleaved
 * @param Framing Format of the CIS Data PDUs.
 *        Values:
 *        - 0x00: Unframed
 *        - 0x01: Framed
 * @param Encryption Encryption mode of the BISes.
 *        Values:
 *        - 0x00: Unencrypted
 *        - 0x01: Encrypted
 * @param Broadcast_Code Code used to encrypt and decrypt BIS payloads.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_create_big( uint8_t BIG_Handle,
                              uint8_t Advertising_Handle,
                              uint8_t Num_BIS,
                              const uint8_t* SDU_Interval,
                              uint16_t Max_SDU,
                              uint16_t Max_Transport_Latency,
                              uint8_t RTN,
                              uint8_t PHY,
                              uint8_t Packing,
                              uint8_t Framing,
                              uint8_t Encryption,
                              const uint8_t* Broadcast_Code );

/**
 * @brief HCI_LE_CREATE_BIG_TEST
 * This command is used for testing purposes to create one or more BISes of a
 * BIG. All BISes in the BIG have the same values for all parameters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.104].
 * 
 * @param BIG_Handle BIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Num_BIS Total number of BISes in the BIG.
 *        Values:
 *        - 0x01 ... 0x1F
 * @param SDU_Interval Interval, in microseconds, of periodic SDUs.
 *        Values:
 *        - 0x0000FF ... 0x0FFFFF
 * @param ISO_Interval Time between consecutive BIG anchor points.
 *        Time = N * 1.25 ms.
 *        Values:
 *        - 0x0004 (5.00 ms)  ... 0x0C80 (4000.00 ms)
 * @param NSE Number of subevents in each interval of each BIS in the BIG.
 *        Values:
 *        - 0x01 ... 0x1F
 * @param Max_SDU Maximum size of an SDU in octets.
 *        Values:
 *        - 0x0001 ... 0x0FFF
 * @param Max_PDU Maximum size, in octets, of payload.
 *        Values:
 *        - 0x0001 ... 0x00FB
 * @param PHY PHY used for transmission of PDUs of BISes in the BIG.
 *        Flags:
 *        - 0x01: The transmitter PHY of packets is LE 1M
 *        - 0x02: The transmitter PHY of packets is LE 2M
 *        - 0x04: The transmitter PHY of packets is LE Coded
 * @param Packing Preferred method of arranging subevents of multiple CISes.
 *        Values:
 *        - 0x00: Sequential
 *        - 0x01: Interleaved
 * @param Framing Format of the CIS Data PDUs.
 *        Values:
 *        - 0x00: Unframed
 *        - 0x01: Framed
 * @param BN Number of new payloads in each interval for each BIS.
 *        Values:
 *        - 0x01 ... 0x07
 * @param IRC Number of times the scheduled payloads are transmitted in a given
 *        event.
 *        Values:
 *        - 0x01 ... 0x0F
 * @param PTO Offset used for pre-transmissions.
 *        Values:
 *        - 0x00 ... 0x0F
 * @param Encryption Encryption mode of the BISes.
 *        Values:
 *        - 0x00: Unencrypted
 *        - 0x01: Encrypted
 * @param Broadcast_Code Code used to encrypt and decrypt BIS payloads.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_create_big_test( uint8_t BIG_Handle,
                                   uint8_t Advertising_Handle,
                                   uint8_t Num_BIS,
                                   const uint8_t* SDU_Interval,
                                   uint16_t ISO_Interval,
                                   uint8_t NSE,
                                   uint16_t Max_SDU,
                                   uint16_t Max_PDU,
                                   uint8_t PHY,
                                   uint8_t Packing,
                                   uint8_t Framing,
                                   uint8_t BN,
                                   uint8_t IRC,
                                   uint8_t PTO,
                                   uint8_t Encryption,
                                   const uint8_t* Broadcast_Code );

/**
 * @brief HCI_LE_TERMINATE_BIG
 * This command is used to terminate a BIG identified by the BIG_Handle
 * parameter. The command also terminates the transmission of all BISes of the
 * BIG, destroys the associated connection handles of the BISes in the BIG and
 * removes the data paths for all BISes in the BIG.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.105].
 * 
 * @param BIG_Handle BIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Reason BIG termination reason (see "Status error codes" section).
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_terminate_big( uint8_t BIG_Handle,
                                 uint8_t Reason );

/**
 * @brief HCI_LE_BIG_CREATE_SYNC
 * This command is used to synchronize to a BIG described in the periodic
 * advertising train specified by the Sync_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.106].
 * 
 * @param BIG_Handle BIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Sync_Handle Handle identifying the periodic advertising train.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Encryption Encryption mode of the BISes.
 *        Values:
 *        - 0x00: Unencrypted
 *        - 0x01: Encrypted
 * @param Broadcast_Code Code used to encrypt and decrypt BIS payloads.
 * @param MSE Maximum number of subevents that should be used to receive data
 *        payloads in each BIS event.
 *        Values:
 *        - 0x00: The Controller can schedule reception of any number of
 *          subevents up to NSE
 *        - 0x01 ... 0x1F
 * @param BIG_Sync_Timeout Synchronization timeout for the BIG.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x4000 (163840 ms)
 * @param Num_BIS Total number of BISes in the BIG.
 *        Values:
 *        - 0x01 ... 0x1F
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_big_create_sync( uint8_t BIG_Handle,
                                   uint16_t Sync_Handle,
                                   uint8_t Encryption,
                                   const uint8_t* Broadcast_Code,
                                   uint8_t MSE,
                                   uint16_t BIG_Sync_Timeout,
                                   uint8_t Num_BIS,
                                   const uint8_t* BIS );

/**
 * @brief HCI_LE_BIG_TERMINATE_SYNC
 * This command is used to stop synchronizing or cancel the process of
 * synchronizing to the BIG identified by the BIG_Handle parameter. The command
 * also terminates the reception of BISes in the BIG specified in the
 * HCI_LE_BIG_Create_Sync command, destroys the associated connection handles
 * of the BISes in the BIG and removes the data paths for all BISes in the BIG.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.107].
 * 
 * @param BIG_Handle BIG identifier.
 *        Values:
 *        - 0x00 ... 0xEF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_big_terminate_sync( uint8_t BIG_Handle );

/**
 * @brief HCI_LE_REQUEST_PEER_SCA
 * This command is used to read the Sleep Clock Accuracy (SCA) of the peer
 * device.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.108].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_request_peer_sca( uint16_t Connection_Handle );

/**
 * @brief HCI_LE_SETUP_ISO_DATA_PATH
 * This command is used to identify and create the isochronous data path
 * between the Host and the Controller for a CIS, CIS configuration, or BIS
 * identified by the Connection_Handle parameter. This command can also be used
 * to configure a codec for each data path. When a connection is created no
 * data paths are set up for that connection.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.109].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Data_Path_Direction ISO data path direction.
 *        Values:
 *        - 0x00: Input (Host to Controller)
 *        - 0x01: Output (Controller to Host)
 * @param Data_Path_ID ISO data path identifier.
 *        Values:
 *        - 0x00: HCI
 *        - 0x01 ... 0xFE: Logical_Channel_Number
 * @param Codec_ID Octet 0 See Assigned Numbers for Coding Format.
 *        Octets 1 to 2 Company ID, see Assigned Numbers for Company Identifier
 *        (Shall be ignored if octet 0 is not 0xFF).
 *        Octets 3 to 4 Vendor-defined codec ID (Shall be ignored if octet 0 is
 *        not 0xFF).
 * @param Controller_Delay Controller delay in microseconds.
 *        Values:
 *        - 0x000000 ... 0x3D0900
 * @param Codec_Configuration_Length Length of Codec_Configuration in octets
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_setup_iso_data_path( uint16_t Connection_Handle,
                                       uint8_t Data_Path_Direction,
                                       uint8_t Data_Path_ID,
                                       const uint8_t* Codec_ID,
                                       const uint8_t* Controller_Delay,
                                       uint8_t Codec_Configuration_Length,
                                       const uint8_t* Codec_Configuration );

/**
 * @brief HCI_LE_REMOVE_ISO_DATA_PATH
 * This command is used to remove the input and/or output data path(s)
 * associated with a CIS, CIS configuration, or BIS identified by the
 * Connection_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.110].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Data_Path_Direction ISO data path direction.
 *        Values:
 *        - 0x00: Input (Host to Controller)
 *        - 0x01: Output (Controller to Host)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_remove_iso_data_path( uint16_t Connection_Handle,
                                        uint8_t Data_Path_Direction );

/**
 * @brief HCI_LE_ISO_TRANSMIT_TEST
 * This command is used for testing purposes to configure an established CIS or
 * BIS specified by the Connection_Handle parameter, and transmit test payloads
 * which are generated by the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.111].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Payload_Type SDU configtration.
 *        Values:
 *        - 0x00: Zero length payload
 *        - 0x01: Variable length payload
 *        - 0x02: Maximum length payload
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_iso_transmit_test( uint16_t Connection_Handle,
                                     uint8_t Payload_Type );

/**
 * @brief HCI_LE_ISO_RECEIVE_TEST
 * This command is used for testing purposes to configure an established CIS or
 * a synchronized BIG specified by the Connection_Handle parameter to receive
 * payloads.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.112].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Payload_Type SDU configtration.
 *        Values:
 *        - 0x00: Zero length payload
 *        - 0x01: Variable length payload
 *        - 0x02: Maximum length payload
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_iso_receive_test( uint16_t Connection_Handle,
                                    uint8_t Payload_Type );

/**
 * @brief HCI_LE_ISO_READ_TEST_COUNTERS
 * This command is used for testing purposes to read the test counters in the
 * Controller which is configured in ISO Receive Test mode for a CIS or BIS
 * specified by the Connection_Handle. Reading the test counters does not reset
 * the test counters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.113].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_iso_read_test_counters( uint16_t Connection_Handle,
                                          uint32_t* Received_SDU_Count,
                                          uint32_t* Missed_SDU_Count,
                                          uint32_t* Failed_SDU_Count );

/**
 * @brief HCI_LE_ISO_TEST_END
 * This command is used for testing purposes to terminate the ISO Transmit
 * and/or Receive Test mode for a CIS or BIS specified by the Connection_Handle
 * parameter but does not terminate the CIS or BIS.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.114].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_iso_test_end( uint16_t Connection_Handle,
                                uint32_t* Received_SDU_Count,
                                uint32_t* Missed_SDU_Count,
                                uint32_t* Failed_SDU_Count );

/**
 * @brief HCI_LE_SET_HOST_FEATURE
 * This command is used by the Host to set or clear a bit controlled by the
 * Host in the Link Layer FeatureSet stored in the Controller.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.115].
 * 
 * @param Bit_Number Bit position in the FeatureSet.
 *        Values:
 *        - 0x00 ... 0x3F
 * @param Bit_Value Bit in the FeatureSet set/reset.
 *        Values:
 *        - 0x00: The Host feature is disabled and so the bit in the FeatureSet
 *          is set to 0
 *        - 0x01: The Host feature is enabled and so the bit in the FeatureSet
 *          is set to 1
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_host_feature( uint8_t Bit_Number,
                                    uint8_t Bit_Value );

/**
 * @brief HCI_LE_READ_ISO_LINK_QUALITY
 * This command returns the values of various counters related to link quality
 * that are associated with the isochronous stream specified by the
 * Connection_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.116].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_iso_link_quality( uint16_t Connection_Handle,
                                         uint32_t* TX_UnACKed_Packets,
                                         uint32_t* TX_Flushed_Packets,
                                         uint32_t* TX_Last_Subevent_Packets,
                                         uint32_t* Retransmitted_Packets,
                                         uint32_t* CRC_Error_Packets,
                                         uint32_t* RX_Unreceived_Packets,
                                         uint32_t* Duplicate_Packets );

/**
 * @brief HCI_LE_ENHANCED_READ_TRANSMIT_POWER_LEVEL
 * This command is used to read the current and maximum transmit power levels
 * of the local Controller on the ACL connection identified by the
 * Connection_Handle parameter and the PHY indicated by the PHY parameter..
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.117].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param PHY Applying PHY.
 *        Values:
 *        - 0x01: LE 1M PHY
 *        - 0x02: LE 2M PHY
 *        - 0x03: LE Coded PHY with S=8 data coding
 *        - 0x04: LE Coded PHY with S=2 data coding
 * @param[out] Current_TX_Power_Level Current transmit power level (signed
 *        integer).
 *        Units: dBm.
 *        Values:
 *        - 127: Current transmit power level is unavailable
 *        - -127 ... 20
 * @param[out] Max_TX_Power_Level Signed integer.
 *        Units: dBm.
 *        Values:
 *        - -127 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_enhanced_read_transmit_power_level( uint16_t Connection_Handle,
                                                      uint8_t PHY,
                                                      uint8_t* Current_TX_Power_Level,
                                                      uint8_t* Max_TX_Power_Level );

/**
 * @brief HCI_LE_READ_REMOTE_TRANSMIT_POWER_LEVEL
 * This command is used to read the transmit power level used by the remote
 * Controller on the ACL connection that is identified by the Connection_Handle
 * parameter and the PHY indicated by the PHY parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.118].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param PHY Applying PHY.
 *        Values:
 *        - 0x01: LE 1M PHY
 *        - 0x02: LE 2M PHY
 *        - 0x03: LE Coded PHY with S=8 data coding
 *        - 0x04: LE Coded PHY with S=2 data coding
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_read_remote_transmit_power_level( uint16_t Connection_Handle,
                                                    uint8_t PHY );

/**
 * @brief HCI_LE_SET_PATH_LOSS_REPORTING_PARAMETERS
 * This command is used to set the path loss threshold reporting parameters for
 * the ACL connection identified by the Connection_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.119].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param High_Threshold High threshold for the path loss.
 *        Units: dB.
 *        Values:
 *        - 255: High Threshold unused
 *        - 0 ... 254
 * @param High_Hysteresis Hysteresis value for the high threshold.
 *        Units: dB.
 * @param Low_Threshold Low threshold for the path loss.
 *        Units: dB.
 * @param Low_Hysteresis Hysteresis value for the low threshold.
 *        Units: dB.
 * @param Min_Time_Spent Minimum time in number of connection events to be
 *        observed once the path loss crosses the threshold before an event is
 *        generated.
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_path_loss_reporting_parameters( uint16_t Connection_Handle,
                                                      uint8_t High_Threshold,
                                                      uint8_t High_Hysteresis,
                                                      uint8_t Low_Threshold,
                                                      uint8_t Low_Hysteresis,
                                                      uint16_t Min_Time_Spent );

/**
 * @brief HCI_LE_SET_PATH_LOSS_REPORTING_ENABLE
 * This command is used to enable or disable path loss reporting for the ACL
 * connection identified by the Connection_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.120].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Enable Reporting enable/disable.
 *        Values:
 *        - 0x00: Reporting disabled
 *        - 0x01: Reporting enabled
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_path_loss_reporting_enable( uint16_t Connection_Handle,
                                                  uint8_t Enable );

/**
 * @brief HCI_LE_SET_TRANSMIT_POWER_REPORTING_ENABLE
 * This command is used to enable or disable the reporting to the local Host of
 * transmit power level changes in the local and remote Controllers for the ACL
 * connection identified by the Connection_Handle parameter.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.121].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Local_Enable Local reporting enable/disable.
 *        Values:
 *        - 0x00: Disable local transmit power reports
 *        - 0x01: Enable local transmit power reports
 * @param Remote_Enable Remote reporting enable/disable.
 *        Values:
 *        - 0x00: Disable remote transmit power reports
 *        - 0x01: Enable remote transmit power reports
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_transmit_power_reporting_enable( uint16_t Connection_Handle,
                                                       uint8_t Local_Enable,
                                                       uint8_t Remote_Enable );

/**
 * @brief HCI_LE_TRANSMITTER_TEST_V4
 * This command is used for testing purpose.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.29].
 * 
 * @param TX_Frequency N = (F - 2402) / 2
 *        Frequency Range : 2402 MHz to 2480 MHz
 *        Values:
 *        - 0x00 ... 0x27
 * @param Length_Of_Test_Data Length in bytes of payload data in each packet.
 *        Values:
 *        - 0x00 ... 0x25: for BO variant
 *        - 0x00 ... 0xFF: otherwise
 * @param Packet_Payload Type of packet payload.
 *        Values:
 *        - 0x00: Pseudo-Random bit sequence 9
 *        - 0x01: Pattern of alternating bits '11110000'
 *        - 0x02: Pattern of alternating bits '10101010'
 *        - 0x03: Pseudo-Random bit sequence 15
 *        - 0x04: Pattern of All '1' bits
 *        - 0x05: Pattern of All '0' bits
 *        - 0x06: Pattern of alternating bits '00001111'
 *        - 0x07: Pattern of alternating bits '0101'
 * @param PHY PHY to use for test packet
 *        Values:
 *        - 0x01: Transmitter set to use the LE 1M PHY
 *        - 0x02: Transmitter set to use the LE 2M PHY
 *        - 0x03: Transmitter set to use the LE Coded PHY with S=8 data coding
 *          [not supported on STM32WB]
 *        - 0x04: Transmitter set to use the LE Coded PHY with S=2 data coding
 *          [not supported on STM32WB]
 * @param CTE_Length Constant Tone Extension length in 8 us units.
 *        Values:
 *        - 0x02 ... 0x14
 * @param CTE_Type Constant Tone Extension type.
 *        Values:
 *        - 0x00: AoA CTE
 *        - 0x01: AoD CTE with 1 us slots
 *        - 0x02: AoD CTE with 2 us slots
 * @param Switching_Pattern_Length Number of Antenna IDs in the pattern.
 *        Values:
 *        - 0x02 ... 0x4B
 * @param Antenna_IDs Antenna ID in the pattern.
 * @param TX_Power_Level Transmit power level (signed integer).
 *        Units: dBm.
 *        Values:
 *        - 126: Minimum transmit power level
 *        - 127: Maximum transmit power level
 *        - -127 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_transmitter_test_v4( uint8_t TX_Frequency,
                                       uint8_t Length_Of_Test_Data,
                                       uint8_t Packet_Payload,
                                       uint8_t PHY,
                                       uint8_t CTE_Length,
                                       uint8_t CTE_Type,
                                       uint8_t Switching_Pattern_Length,
                                       const uint8_t* Antenna_IDs,
                                       uint8_t TX_Power_Level );

/**
 * @brief HCI_LE_SET_DATA_RELATED_ADDRESS_CHANGES
 * This command specifies circumstances when the Controller shall refresh any
 * Resolvable Private Address used by the advertising set identified by the
 * Advertising_Handle parameter, whether or not the address timeout period has
 * been reached. This command may be used while advertising is enabled.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.122].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Change_Reasons Reason(s) for refreshing addresses.
 *        Flags:
 *        - 0x01: Change the address whenever the advertising data changes
 *        - 0x02: Change the address whenever the scan response data changes
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_data_related_address_changes( uint8_t Advertising_Handle,
                                                    uint8_t Change_Reasons );

/**
 * @brief HCI_LE_SET_DEFAULT_SUBRATE
 * This command is used by the Host to set the initial values for the
 * acceptable parameters for subrating requests, as defined by the HCI_LE
 * Subrate_Request command, for all future ACL connections where the Controller
 * is the Central. This command does not affect any existing connection.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.123].
 * 
 * @param Subrate_Min Minimum subrate factor.
 *        Values:
 *        - 0x0001 ... 0x01F4
 * @param Subrate_Max Maximum subrate factor.
 *        Values:
 *        - 0x0001 ... 0x01F4
 * @param Max_Latency Maximum Peripheral latency allowed in requests by a
 *        Peripheral, in units of subrated connection intervals.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Continuation_Number Minimum number of underlying connection events to
 *        remain active after a packet containing a Link Layer PDU with a non-
 *        zero Length field is sent or received in requests by a Peripheral.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Supervision_Timeout Supervision timeout for the LE Link.
 *        It shall be a multiple of 10 ms and larger than (1 +
 *        connPeripheralLatency) * connInterval * 2.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x0C80 (32000 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_default_subrate( uint16_t Subrate_Min,
                                       uint16_t Subrate_Max,
                                       uint16_t Max_Latency,
                                       uint16_t Continuation_Number,
                                       uint16_t Supervision_Timeout );

/**
 * @brief HCI_LE_SUBRATE_REQUEST
 * This command is used by a Central or a Peripheral to request a change to the
 * subrating factor and/or other parameters applied to an existing connection
 * using the Connection Subrate Update procedure.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.124].
 * 
 * @param Connection_Handle Connection handle for which the command applies.
 *        Values:
 *        - 0x0000 ... 0x0EFF
 * @param Subrate_Min Minimum subrate factor.
 *        Values:
 *        - 0x0001 ... 0x01F4
 * @param Subrate_Max Maximum subrate factor.
 *        Values:
 *        - 0x0001 ... 0x01F4
 * @param Max_Latency Maximum Peripheral latency allowed in requests by a
 *        Peripheral, in units of subrated connection intervals.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Continuation_Number Minimum number of underlying connection events to
 *        remain active after a packet containing a Link Layer PDU with a non-
 *        zero Length field is sent or received in requests by a Peripheral.
 *        Values:
 *        - 0x0000 ... 0x01F3
 * @param Supervision_Timeout Supervision timeout for the LE Link.
 *        It shall be a multiple of 10 ms and larger than (1 +
 *        connPeripheralLatency) * connInterval * 2.
 *        Time = N * 10 ms.
 *        Values:
 *        - 0x000A (100 ms)  ... 0x0C80 (32000 ms)
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_subrate_request( uint16_t Connection_Handle,
                                   uint16_t Subrate_Min,
                                   uint16_t Subrate_Max,
                                   uint16_t Max_Latency,
                                   uint16_t Continuation_Number,
                                   uint16_t Supervision_Timeout );

/**
 * @brief HCI_LE_SET_EXTENDED_ADVERTISING_PARAMETERS_V2
 * This command is used by the Host to set the advertising parameters.
 * See Bluetooth spec. v.6.0 [Vol 4, Part E, 7.8.53].
 * 
 * @param Advertising_Handle Used to identify an advertising set.
 *        Values:
 *        - 0x00 ... 0xEF
 * @param Adv_Event_Properties Type of advertising event.
 *        Flags:
 *        - 0x0001: Connectable advertising
 *        - 0x0002: Scannable advertising
 *        - 0x0004: Directed advertising
 *        - 0x0008: High Duty Cycle Directed Connectable advertising
 *        - 0x0010: Use legacy advertising PDUs
 *        - 0x0020: Anonymous advertising
 *        - 0x0040: Include TxPower in at least one advertising PDU
 * @param Primary_Adv_Interval_Min Minimum advertising interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x000020 (20.000 ms)  ... 0xFFFFFF (10485759.375 ms)
 * @param Primary_Adv_Interval_Max Maximum advertising interval.
 *        Time = N * 0.625 ms.
 *        Values:
 *        - 0x000020 (20.000 ms)  ... 0xFFFFFF (10485759.375 ms)
 * @param Primary_Adv_Channel_Map Advertising channel map.
 *        Flags:
 *        - 0x01: Channel 37 shall be used
 *        - 0x02: Channel 38 shall be used
 *        - 0x04: Channel 39 shall be used
 * @param Own_Address_Type Own address type.
 *        Values:
 *        - 0x00: Public Device Address
 *        - 0x01: Random Device Address
 *        - 0x02: Resolvable Private Address if available, otherwise Public
 *          Address
 *        - 0x03: Resolvable Private Address if available, otherwise Random
 *          Address
 * @param Peer_Address_Type Address type of the peer device.
 *        Values:
 *        - 0x00: Public Device Address or Public Identity Address
 *        - 0x01: Random Device Address or Random (static) Identity Address
 * @param Peer_Address Public Device Address, Random Device Address, Public
 *        Identity Address, or Random (static) Identity Address of the device
 *        to be connected.
 * @param Adv_Filter_Policy Advertising filter policy
 *        Values:
 *        - 0x00: Process scan and connection requests from all devices (i.e.,
 *          the Filter Accept List is not in use)
 *        - 0x01: Process connection requests from all devices and scan
 *          requests only from devices that are in the Filter Accept List.
 *        - 0x02: Process scan requests from all devices and connection
 *          requests only from devices that are in the Filter Accept List.
 *        - 0x03: Process scan and connection requests only from devices in the
 *          Filter Accept List.
 * @param Adv_TX_Power Advertising TX power. Units: dBm.
 *        Values:
 *        - 127: Host has no preference
 *        - -127 ... 20
 * @param Primary_Adv_PHY Primary advertising PHY.
 *        Values:
 *        - 0x01: Primary advertisement PHY is LE 1M
 *        - 0x03: Primary advertisement PHY is LE Coded [not supported on
 *          STM32WB]
 * @param Secondary_Adv_Max_Skip Secondary advertising maximum skip.
 *        Values:
 *        - 0x00: AUX_ADV_IND shall be sent prior to the next advertising event
 *        - 0x01 ... 0xFF: Maximum advertising events the Controller can skip
 *          before sending the AUX_ADV_IND packets on the secondary advertising
 *          physical channel
 * @param Secondary_Adv_PHY Secondary advertising PHY.
 *        Values:
 *        - 0x01: Secondary advertisement PHY is LE 1M
 *        - 0x02: Secondary advertisement PHY is LE 2M
 *        - 0x03: Secondary advertisement PHY is LE Coded [not supported on
 *          STM32WB]
 * @param Adv_SID Value of the Advertising SID subfield in the ADI field of the
 *        PDU.
 *        Values:
 *        - 0x00 ... 0x0F
 * @param Scan_Req_Notification_Enable Scan request notifications.
 *        Values:
 *        - 0x00: Scan request notifications disabled
 *        - 0x01: Scan request notifications enabled
 * @param Primary_Adv_PHY_Options Advertising PHY options.
 *        Values:
 *        - 0x00: The Host has no preferred or required coding when
 *          transmitting on the LE Coded PHY
 *        - 0x01: The Host prefers that S=2 coding be used when transmitting on
 *          the LE Coded PHY
 *        - 0x02: The Host prefers that S=8 coding be used when transmitting on
 *          the LE Coded PHY
 *        - 0x03: The Host requires that S=2 coding be used when transmitting
 *          on the LE Coded PHY
 *        - 0x04: The Host requires that S=8 coding be used when transmitting
 *          on the LE Coded PHY
 * @param Secondary_Adv_PHY_Options Advertising PHY options.
 *        Values:
 *        - 0x00: The Host has no preferred or required coding when
 *          transmitting on the LE Coded PHY
 *        - 0x01: The Host prefers that S=2 coding be used when transmitting on
 *          the LE Coded PHY
 *        - 0x02: The Host prefers that S=8 coding be used when transmitting on
 *          the LE Coded PHY
 *        - 0x03: The Host requires that S=2 coding be used when transmitting
 *          on the LE Coded PHY
 *        - 0x04: The Host requires that S=8 coding be used when transmitting
 *          on the LE Coded PHY
 * @param[out] Selected_TX_Power Power level selected by the Controller. Units:
 *        dBm.
 *        Values:
 *        - -127 ... 20
 * @return Value indicating success or error code.
 */
tBleStatus hci_le_set_extended_advertising_parameters_v2( uint8_t Advertising_Handle,
                                                          uint16_t Adv_Event_Properties,
                                                          const uint8_t* Primary_Adv_Interval_Min,
                                                          const uint8_t* Primary_Adv_Interval_Max,
                                                          uint8_t Primary_Adv_Channel_Map,
                                                          uint8_t Own_Address_Type,
                                                          uint8_t Peer_Address_Type,
                                                          const uint8_t* Peer_Address,
                                                          uint8_t Adv_Filter_Policy,
                                                          uint8_t Adv_TX_Power,
                                                          uint8_t Primary_Adv_PHY,
                                                          uint8_t Secondary_Adv_Max_Skip,
                                                          uint8_t Secondary_Adv_PHY,
                                                          uint8_t Adv_SID,
                                                          uint8_t Scan_Req_Notification_Enable,
                                                          uint8_t Primary_Adv_PHY_Options,
                                                          uint8_t Secondary_Adv_PHY_Options,
                                                          uint8_t* Selected_TX_Power );

/**
 * @brief HCI_TX_ACL_DATA
 * This function can be used in "LL only" mode to send an ACL data packet.
 * 
 * @return Value indicating success or error code.
 */
tBleStatus hci_tx_acl_data( uint16_t Connection_Handle,
                            uint8_t PB_Flag,
                            uint16_t Data_Length,
                            const uint8_t* Data );


#endif /* BLE_HCI_LE_H__ */
