From 4d70877b35951bc0ebd2ea3536169d5d0069570a Mon Sep 17 00:00:00 2001 From: "Wheeler Keith (CY CSS ICW Integration)" Date: Wed, 25 Nov 2020 15:30:15 -0800 Subject: [PATCH] Removing 500ms delay inCyH4TransportDriver init; fixing warning about order of BT POWER in declarations --- .../COMPONENT_CYW43XXX/CyH4TransportDriver.cpp | 8 +------- .../FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.cpp b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.cpp index 15520d00b7..69ca5bdb9d 100644 --- a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.cpp +++ b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.cpp @@ -127,8 +127,7 @@ void CyH4TransportDriver::initialize() bt_power = 0; rtos::ThisThread::sleep_for(1ms); - cy_rslt_t rslt = cyhal_uart_init(&uart, tx, rx, NULL, NULL); - // MBED_WARNING + cyhal_uart_init(&uart, tx, rx, NULL, NULL); const cyhal_uart_cfg_t uart_cfg = { .data_bits = 8, .stop_bits = 1, .parity = CYHAL_UART_PARITY_NONE, .rx_buffer = NULL, .rx_buffer_size = 0 }; cyhal_uart_configure(&uart, &uart_cfg); @@ -155,7 +154,6 @@ void CyH4TransportDriver::initialize() bt_device_wake = WAKE_EVENT_ACTIVE_HIGH; } sleep_manager_unlock_deep_sleep(); - // rtos::ThisThread::sleep_for(500ms); } void CyH4TransportDriver::terminate() @@ -170,10 +168,6 @@ void CyH4TransportDriver::terminate() CYHAL_ISR_PRIORITY_DEFAULT, false ); - cyhal_uart_register_callback(&uart, - NULL, - NULL - ); // DigitalInOut does not appear to have Destructor nor does it have a // free() func (though the protected gpio_t does) so must call directly diff --git a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h index 90523f4153..6d7463fd9c 100644 --- a/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h +++ b/connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h @@ -100,7 +100,6 @@ private: mbed::DigitalInOut bt_host_wake; mbed::DigitalInOut bt_device_wake; - mbed::DigitalInOut bt_power; bool bt_host_wake_active; #if (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER) @@ -112,6 +111,7 @@ private: uint8_t dev_wake_irq_event; bool holding_deep_sleep_lock; + mbed::DigitalInOut bt_power; };