This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6a30d7ad6b94e28518f96dd22c6fae1f3196ae0e Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Sun Dec 27 15:34:36 2020 +0800 bt_uart: Remove static variables in btuart_rxwork to support mulitple bluetooth controllers Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- drivers/wireless/bluetooth/bt_uart.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/wireless/bluetooth/bt_uart.c b/drivers/wireless/bluetooth/bt_uart.c index dae18e6..87c3905 100644 --- a/drivers/wireless/bluetooth/bt_uart.c +++ b/drivers/wireless/bluetooth/bt_uart.c @@ -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) {