From 405ae6bb656da53959fa42b50e7806cddc403252 Mon Sep 17 00:00:00 2001 From: Joakim Andersson Date: Mon, 6 Apr 2020 13:56:14 +0200 Subject: [PATCH] Bluetooth: drivers: Convert bluetooth drivers to use k_timeout struct Convert bluetooth drivers to use k_timeout struct Signed-off-by: Joakim Andersson --- drivers/bluetooth/hci/h4.c | 2 +- drivers/bluetooth/hci/ipm_stm32wb.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/bluetooth/hci/h4.c b/drivers/bluetooth/hci/h4.c index fbc3d8af5b7..754c88dded4 100644 --- a/drivers/bluetooth/hci/h4.c +++ b/drivers/bluetooth/hci/h4.c @@ -157,7 +157,7 @@ static void reset_rx(void) rx.discardable = false; } -static struct net_buf *get_rx(int timeout) +static struct net_buf *get_rx(k_timeout_t timeout) { BT_DBG("type 0x%02x, evt 0x%02x", rx.type, rx.evt.evt); diff --git a/drivers/bluetooth/hci/ipm_stm32wb.c b/drivers/bluetooth/hci/ipm_stm32wb.c index f092f95811d..5e1731f8ebf 100644 --- a/drivers/bluetooth/hci/ipm_stm32wb.c +++ b/drivers/bluetooth/hci/ipm_stm32wb.c @@ -228,7 +228,7 @@ void shci_cmd_resp_release(uint32_t flag) void shci_cmd_resp_wait(uint32_t timeout) { - k_sem_take(&ble_sys_wait_cmd_rsp, timeout); + k_sem_take(&ble_sys_wait_cmd_rsp, K_MSEC(timeout)); } void ipcc_reset(void)