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