This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

cc2541 串口收发会被调用两次

Other Parts Discussed in Thread: CC2541
 NPI_InitTransport(NpiSerialCallback);

在NpiSerialCallback函数中判断串口发送过来的数据

numBytes = NPI_RxBufLen(); 

获取了数据的长度

打印数据长度时,如果发送的是LED1ON

就会打印两次第一次是2,第二次是4

意味着NpiSerialCallback函数就被调用了两次?

那么如何解决我一次不能完整接收数据的问题?

按照甜甜的大香瓜的串口收发教程做的