From 569fd9ed30ef9f43e929c73f088f171c6211b17f Mon Sep 17 00:00:00 2001 From: Vincent Coubard Date: Thu, 7 Jun 2018 12:29:57 +0100 Subject: [PATCH] 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. --- .../targets/TARGET_CORDIO/driver/CordioHCIDriver.h | 4 ++++ .../targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.h index 10ac769c82..a3b923e270 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCIDriver.h @@ -58,6 +58,10 @@ struct buf_pool_desc_t { * - Access to the write function of the underlying HCITransport driver. */ class CordioHCIDriver { + + // hook for internal tests and passthrough driver + friend class CordioHCIHook; + public: /** * Construct a new instance of an HCI driver. diff --git a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h index a7e7499f21..b33d407909 100644 --- a/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h +++ b/features/FEATURE_BLE/targets/TARGET_CORDIO/driver/CordioHCITransportDriver.h @@ -28,6 +28,10 @@ namespace cordio { * It allow the stack to write data in the HCI channel. */ class CordioHCITransportDriver { + + // hook for internal tests and passthrough driver + friend class CordioHCIHook; + public: /** * Driver destructor.