File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 5555#include " CordioHCICustomDriver.h"
5656
5757extern BLE_NAMESPACE::CordioHCIDriver& ble_cordio_get_hci_driver ();
58+ extern " C" void hciTrSerialRxIncoming (uint8_t *pBuf, uint8_t len);
5859
5960namespace BLE_NAMESPACE {
6061 struct CordioHCIHook {
@@ -236,6 +237,13 @@ void HCICordioTransportClass::end()
236237 delete bleLoopThread;
237238 bleLoopThread = NULL ;
238239 }
240+ // Reset the callback with the mbed-os default handler to properly handle the following CYW43xxx chip initializations and begins
241+ CordioHCIHook::setDataReceivedHandler (hciTrSerialRxIncoming);
242+
243+ #if (defined(ARDUINO_PORTENTA_H7_M4) || defined(ARDUINO_PORTENTA_H7_M7) || defined(ARDUINO_NICLA_VISION) || defined(ARDUINO_GIGA) || defined(ARDUINO_OPTA)) && !defined(CUSTOM_HCI_DRIVER)
244+ BLE &ble = BLE::Instance ();
245+ ble.shutdown ();
246+ #endif
239247
240248#if !defined(TARGET_STM32H7)
241249 CordioHCIHook::getDriver ().terminate ();
You can’t perform that action at this time.
0 commit comments