Skip to content

Commit 200902a

Browse files
author
Kyle Kearney
committed
Fix deprecated wait_ms warning in Cypress BLE
Migrate to using ThisThread::sleep_for instead.
1 parent ea13fbe commit 200902a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CYW43XXX/CyH4TransportDriver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ void CyH4TransportDriver::initialize()
106106
if (bt_device_wake_name != NC)
107107
bt_device_wake = WAKE_EVENT_ACTIVE_HIGH;
108108
}
109-
wait_ms(500);
109+
rtos::ThisThread::sleep_for(500);
110110
}
111111

112112
void CyH4TransportDriver::terminate() { }

features/FEATURE_BLE/targets/TARGET_Cypress/TARGET_CYW43XXX/HCIDriver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ class HCIDriver : public cordio::CordioHCIDriver {
8282
virtual void do_initialize()
8383
{
8484
bt_power = 1;
85-
wait_ms(500);
85+
rtos::ThisThread::sleep_for(500);
8686
}
8787

8888
virtual void do_terminate() { }
@@ -295,7 +295,7 @@ class HCIDriver : public cordio::CordioHCIDriver {
295295
service_pack_next = &HCIDriver::terminate_service_pack_transfert;;
296296
service_pack_index = 0;
297297
service_pack_transfered = false;
298-
wait_ms(1000);
298+
rtos::ThisThread::sleep_for(1000);
299299
send_service_pack_command();
300300
}
301301

0 commit comments

Comments
 (0)