diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.cpp b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.cpp index 4ca36c7b43..5dfbd4a6bd 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.cpp +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.cpp @@ -25,6 +25,7 @@ #include "common/common.h" #include "ble_advdata.h" #include "headers/nrf_ble_hci.h" +#include "ble/pal/ConnectionEventMonitor.h" void radioNotificationStaticCallback(bool param) { @@ -1045,8 +1046,9 @@ ble_error_t nRF5xGap::updateWhiteAndIdentityListInStack() } #endif -void nRF5xGap::set_connection_event_handler(ble::pal::ConnectionEventHandler *connection_event_handler) -{ +void nRF5xGap::set_connection_event_handler( + ConnectionEventMonitor::EventHandler* connection_event_handler +) { _connection_event_handler = connection_event_handler; } diff --git a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.h b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.h index 2e454403ef..e71fdbc937 100644 --- a/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.h +++ b/features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_NRF5/source/nRF5xGap.h @@ -55,8 +55,6 @@ extern "C" { void radioNotificationStaticCallback(bool param); -namespace ble { namespace pal { class ConnectionEventHandler; }} - /**************************************************************************/ /*! \brief @@ -260,7 +258,9 @@ public: /** @note Implements ConnectionEventMonitor. * @copydoc ConnectionEventMonitor::set_connection_event_handler */ - void set_connection_event_handler(ble::pal::ConnectionEventHandler *_connection_event_handler); + void set_connection_event_handler( + ConnectionEventMonitor::EventHandler* connection_event_handler + ); /** * @copydoc ::Gap::processConnectionEvent @@ -285,7 +285,7 @@ public: uint16_t m_connectionHandle; - ble::pal::ConnectionEventHandler* _connection_event_handler; + ConnectionEventMonitor::EventHandler* _connection_event_handler; /* * Allow instantiation from nRF5xn when required.