blob: 9b2dd60662c826b1da6317061ac495dc616162c7 [file] [log] [blame]
Johan Hedberg58ab2522016-05-04 15:12:16 +03001/* util.h - Common helpers for Bluetooth drivers */
Johan Hedberg2581ad92015-04-13 14:38:44 +03002
3/*
Johan Hedberg58ab2522016-05-04 15:12:16 +03004 * Copyright (c) 2016 Intel Corporation
Johan Hedberg2581ad92015-04-13 14:38:44 +03005 *
David B. Kinderac74d8b2017-01-18 17:01:01 -08006 * SPDX-License-Identifier: Apache-2.0
Johan Hedberg2581ad92015-04-13 14:38:44 +03007 */
8
Tomasz Bursztykae18fcbb2020-04-30 20:33:38 +02009static inline void bt_uart_drain(const struct device *dev)
Johan Hedberg58ab2522016-05-04 15:12:16 +030010{
Kumar Galaa1b77fd2020-05-27 11:26:57 -050011 uint8_t c;
Peter Mitsisa0e45682016-01-22 12:38:49 -050012
Johan Hedberg58ab2522016-05-04 15:12:16 +030013 while (uart_fifo_read(dev, &c, 1)) {
14 continue;
15 }
Peter Mitsisa0e45682016-01-22 12:38:49 -050016}