bt_uart: Remove static variables in btuart_rxwork

to support mulitple bluetooth controllers

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2020-12-27 15:34:36 +08:00 committed by Alin Jerpelea
parent f992ff37c3
commit 6a30d7ad6b

View File

@ -184,9 +184,9 @@ static void btuart_rxwork(FAR void *arg)
{
FAR struct btuart_upperhalf_s *upper;
FAR const struct btuart_lowerhalf_s *lower;
static FAR struct bt_buf_s *buf;
static unsigned int hdrlen;
static int remaining;
FAR struct bt_buf_s *buf;
unsigned int hdrlen;
int remaining;
ssize_t nread;
uint8_t type;
@ -198,9 +198,6 @@ static void btuart_rxwork(FAR void *arg)
* Read the first byte to get the packet type.
*/
buf = NULL;
hdrlen = 0;
nread = btuart_read(upper, &type, 1, 0);
if (nread != 1)
{