Skip to content

Commit 569fd9e

Browse files
committed
Cordio BLE: Add hook to HCI driver and transport.
A friend class living in the namespace ble::vendor::cordio and named CordioHCITransportDriver can be added in applications requiring access to internal data of the HCI driver and HCI transport driver. This is meant to be internal and not easily exploitable by application code.
1 parent d364d36 commit 569fd9e

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ struct buf_pool_desc_t {
5858
* - Access to the write function of the underlying HCITransport driver.
5959
*/
6060
class CordioHCIDriver {
61+
62+
// hook for internal tests and passthrough driver
63+
friend class CordioHCIHook;
64+
6165
public:
6266
/**
6367
* Construct a new instance of an HCI driver.

features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@ namespace cordio {
2828
* It allow the stack to write data in the HCI channel.
2929
*/
3030
class CordioHCITransportDriver {
31+
32+
// hook for internal tests and passthrough driver
33+
friend class CordioHCIHook;
34+
3135
public:
3236
/**
3337
* Driver destructor.

0 commit comments

Comments
 (0)