Skip to content

Commit 4d70877

Browse files
committed
Removing 500ms delay inCyH4TransportDriver init; fixing warning about order of BT POWER in declarations
1 parent 0e6ede8 commit 4d70877

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,7 @@ void CyH4TransportDriver::initialize()
127127
bt_power = 0;
128128
rtos::ThisThread::sleep_for(1ms);
129129

130-
cy_rslt_t rslt = cyhal_uart_init(&uart, tx, rx, NULL, NULL);
131-
// MBED_WARNING
130+
cyhal_uart_init(&uart, tx, rx, NULL, NULL);
132131

133132
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 };
134133
cyhal_uart_configure(&uart, &uart_cfg);
@@ -155,7 +154,6 @@ void CyH4TransportDriver::initialize()
155154
bt_device_wake = WAKE_EVENT_ACTIVE_HIGH;
156155
}
157156
sleep_manager_unlock_deep_sleep();
158-
// rtos::ThisThread::sleep_for(500ms);
159157
}
160158

161159
void CyH4TransportDriver::terminate()
@@ -170,10 +168,6 @@ void CyH4TransportDriver::terminate()
170168
CYHAL_ISR_PRIORITY_DEFAULT,
171169
false
172170
);
173-
cyhal_uart_register_callback(&uart,
174-
NULL,
175-
NULL
176-
);
177171

178172
// DigitalInOut does not appear to have Destructor nor does it have a
179173
// free() func (though the protected gpio_t does) so must call directly

connectivity/drivers/ble/FEATURE_BLE/COMPONENT_CYW43XXX/CyH4TransportDriver.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class CyH4TransportDriver : public CordioHCITransportDriver {
100100

101101
mbed::DigitalInOut bt_host_wake;
102102
mbed::DigitalInOut bt_device_wake;
103-
mbed::DigitalInOut bt_power;
104103
bool bt_host_wake_active;
105104

106105
#if (defined(MBED_TICKLESS) && DEVICE_SLEEP && DEVICE_LPTICKER)
@@ -112,6 +111,7 @@ class CyH4TransportDriver : public CordioHCITransportDriver {
112111
uint8_t dev_wake_irq_event;
113112

114113
bool holding_deep_sleep_lock;
114+
mbed::DigitalInOut bt_power;
115115

116116
};
117117

0 commit comments

Comments
 (0)