mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
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:
committed by
Alin Jerpelea
parent
f992ff37c3
commit
6a30d7ad6b
@@ -184,9 +184,9 @@ static void btuart_rxwork(FAR void *arg)
|
|||||||
{
|
{
|
||||||
FAR struct btuart_upperhalf_s *upper;
|
FAR struct btuart_upperhalf_s *upper;
|
||||||
FAR const struct btuart_lowerhalf_s *lower;
|
FAR const struct btuart_lowerhalf_s *lower;
|
||||||
static FAR struct bt_buf_s *buf;
|
FAR struct bt_buf_s *buf;
|
||||||
static unsigned int hdrlen;
|
unsigned int hdrlen;
|
||||||
static int remaining;
|
int remaining;
|
||||||
ssize_t nread;
|
ssize_t nread;
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
|
|
||||||
@@ -198,9 +198,6 @@ static void btuart_rxwork(FAR void *arg)
|
|||||||
* Read the first byte to get the packet type.
|
* Read the first byte to get the packet type.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buf = NULL;
|
|
||||||
hdrlen = 0;
|
|
||||||
|
|
||||||
nread = btuart_read(upper, &type, 1, 0);
|
nread = btuart_read(upper, &type, 1, 0);
|
||||||
if (nread != 1)
|
if (nread != 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user