2016-05-04 20:12:16 +08:00
|
|
|
/* util.h - Common helpers for Bluetooth drivers */
|
2015-04-13 19:38:44 +08:00
|
|
|
|
|
|
|
/*
|
2016-05-04 20:12:16 +08:00
|
|
|
* Copyright (c) 2016 Intel Corporation
|
2015-04-13 19:38:44 +08:00
|
|
|
*
|
2017-01-19 09:01:01 +08:00
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
2015-04-13 19:38:44 +08:00
|
|
|
*/
|
|
|
|
|
2020-05-01 02:33:38 +08:00
|
|
|
static inline void bt_uart_drain(const struct device *dev)
|
2016-05-04 20:12:16 +08:00
|
|
|
{
|
2020-05-28 00:26:57 +08:00
|
|
|
uint8_t c;
|
2016-01-23 01:38:49 +08:00
|
|
|
|
2016-05-04 20:12:16 +08:00
|
|
|
while (uart_fifo_read(dev, &c, 1)) {
|
|
|
|
continue;
|
|
|
|
}
|
2016-01-23 01:38:49 +08:00
|
|
|
}
|