|
typedef 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 packets received.
|
|
Definition at line 32 of file AP3CordioHCIDriver.h.
◆ test_end_handler_t
Callback to inform the caller of the result of the test, the parameters are success and the number of packets received.
Definition at line 165 of file CordioHCIDriver.h.
◆ do_initialize()
virtual void do_initialize |
( |
| ) |
|
|
virtual |
Initialize the chip.
The transport is up at that time.
Implements CordioHCIDriver.
◆ do_terminate()
virtual void do_terminate |
( |
| ) |
|
|
virtual |
◆ get_buffer_pool_description()
Return the set of memory pool which will be used by the Cordio stack.
Implements CordioHCIDriver.
◆ initialize()
Initialize the HCI driver.
This function start by initializing the transport driver then it delegates what's remain of the initialization to the function do_initialize.
◆ terminate()
Termination of the driver.
It call in sequence:
- do_terminate
- terminate the transport driver.
◆ start_reset_sequence()
virtual void start_reset_sequence |
( |
| ) |
|
|
virtualinherited |
◆ handle_reset_sequence()
virtual void handle_reset_sequence |
( |
uint8_t * |
msg | ) |
|
|
virtualinherited |
Handle HCI messages received during the reset sequence.
- Parameters
-
msg | The HCI message received. |
- Note
- The driver should signal to the stack that the initialization sequence is done by calling the function: signal_reset_sequence_done.
◆ get_random_static_address()
Get the random static address of the controller.
- Parameters
-
[out] | address | MAC address is written here. |
- Returns
- false if the address has not been set and true otherwise.
Reimplemented in NRFCordioHCIDriver.
◆ signal_reset_sequence_done()
void signal_reset_sequence_done |
( |
| ) |
|
|
inherited |
Signal to the stack that the reset sequence has been done.
◆ write()
uint16_t write |
( |
uint8_t |
type, |
|
|
uint16_t |
len, |
|
|
uint8_t * |
pData |
|
) |
| |
|
inherited |
Write data in the transport channel.
- Parameters
-
type | The type of packet to transmit. It might be an HCI command packet, ACL packet or EVT packet. Depending on the type of transport it can prefix the packet itself. |
len | Number of bytes to transmit. |
pData | pointer to the data to transmit. |
- Returns
- The number of bytes which have been transmited.
◆ on_host_stack_inactivity()
virtual void on_host_stack_inactivity |
( |
| ) |
|
|
virtualinherited |
React to host stack inactivity.
The host stack invoke this function when it is inactive. It allows a driver to put its controller to sleep if all the conditions are met.
Any call to write signals to the driver that the host stack is active.
◆ handle_test_end()
void handle_test_end |
( |
bool |
success, |
|
|
uint16_t |
packets |
|
) |
| |
|
inherited |
This will be called by host part of the stack to indicate the end of the test.
- Parameters
-
success | True if the TEST END command was a success. |
packets | Number of packets received during the test. |
◆ rf_test_start_le_receiver_test()
Start BLE receiver test.
Call rf_test_end when you want to stop.
- Parameters
-
test_end_handler | Handler that will be called with the number of packets received. |
channel | Channel to use. |
- Returns
- BLE_ERROR_NONE on success.
◆ rf_test_start_le_transmitter_test()
Start BLE transmitter test.
Call rf_test_end when you want to stop.
- Parameters
-
test_end_handler | Handler that will be called with status and the number of packets set to 0. |
channel | Channel to use. |
length | Size of payload. |
type | Type of pattern to transmit |
- See also
- BLE spec Volume 6 Part F, Section 4.1.5.
- Returns
- BLE_ERROR_NONE on success.
◆ rf_test_end()
Complete the test.
This will trigger the end test event which will call handle_test_end
- Returns
- BLE_ERROR_NONE on success.
◆ set_tx_power()
Set desired transmit power.
Value equal or bigger will be used from available levels. Consult chip documentation for available values. Actual TX power is not guaranteed and is down to the implementation.
- Parameters
-
level_db | Signal level in dBm. |
- Returns
- BLE_ERROR_NONE on success.
◆ get_default_buffer_pool_description()
◆ set_random_static_address()
void set_random_static_address |
( |
const ble::address_t & |
random_static_address | ) |
|
|
protectedinherited |
Allows the driver to set a random static address.
Unlike the HCI command this function reports the random static address to the whole BLE system.
- Parameters
-
random_static_address | The random static address to set. |