18#ifndef IMPL_HCI_DRIVER_H_
19#define IMPL_HCI_DRIVER_H_
23#include "platform/Callback.h"
24#include "ble/common/BLETypes.h"
25#include "ble/driver/CordioHCITransportDriver.h"
26#include "ble/common/blecommon.h"
42 template<
size_t BufferSize,
size_t PoolCount>
44 uint8_t (&buffer)[BufferSize],
45 const wsfBufPoolDesc_t (&pool_desc)[PoolCount]
51 uint8_t* buffer_memory;
67 friend class CordioHCIHook;
140 uint16_t
write(uint8_t type, uint16_t len, uint8_t *pData);
184 uint8_t length, uint8_t type);
221 virtual void do_initialize() = 0;
226 virtual void do_terminate() = 0;
Base class of the HCI driver use by the BLE port of the Cordio stack.
ble_error_t rf_test_start_le_transmitter_test(test_end_handler_t test_end_handler, uint8_t channel, uint8_t length, uint8_t type)
Start BLE transmitter test.
uint16_t write(uint8_t type, uint16_t len, uint8_t *pData)
Write data in the transport channel.
void handle_test_end(bool success, uint16_t packets)
This will be called by host part of the stack to indicate the end of the test.
void initialize()
Initialize the HCI driver.
void set_random_static_address(const ble::address_t &random_static_address)
Allows the driver to set a random static address.
virtual ble_error_t set_tx_power(int8_t level_db)
Set desired transmit power.
void signal_reset_sequence_done()
Signal to the stack that the reset sequence has been done.
virtual bool get_random_static_address(ble::address_t &address)
Get the random static address of the controller.
virtual void handle_reset_sequence(uint8_t *msg)
Handle HCI messages received during the reset sequence.
virtual ~CordioHCIDriver()=default
Driver destructor.
void terminate()
Termination of the driver.
virtual buf_pool_desc_t get_buffer_pool_description()=0
Return the set of memory pool which will be used by the Cordio stack.
ble_error_t rf_test_end()
Complete the test.
CordioHCIDriver(CordioHCITransportDriver &transport_driver)
Construct a new instance of an HCI driver.
virtual void on_host_stack_inactivity()
React to host stack inactivity.
virtual void start_reset_sequence()
Start the reset sequence of the BLE module.
ble_error_t rf_test_start_le_receiver_test(test_end_handler_t test_end_handler, uint8_t channel)
Start BLE receiver test.
mbed::Callback< void(bool, uint16_t)> test_end_handler_t
Callback to inform the caller of the result of the test, the parameters are success and the number of...
buf_pool_desc_t get_default_buffer_pool_description()
Return a default set of memory pool that the Cordio stack can use.
Base class of the HCI transport driver.
Callback class based on template specialization.
ble_error_t
Error codes for the BLE API.
Entry namespace for all BLE API definitions.
Contain description of the memory pool used by the Cordio stack.
size_t buffer_size
Pointer to the buffer memory.
buf_pool_desc_t(uint8_t(&buffer)[BufferSize], const wsfBufPoolDesc_t(&pool_desc)[PoolCount])
Create a new memory pool description.
const wsfBufPoolDesc_t * pool_description
Size of the buffer.
size_t pool_count
Pointer to the first element describing the pool.