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.

CC2540 SimpleBLEPeripheral 数据接收问题



SimpleBLEPeripheral 的程序 从Central发过来的数据从哪接收呢

  • OSAL给接收任务发送一个信号,一个信息到达了,通过设置SYS_EVENT_MSG标志为目地任务.这样引起接受任务的事件处理函数被调用.接收任务然后取回数据通过osal_msg_receive,且处理数据依据接受到的数据.推荐每一个OSAL任务有一个局部消息处理函数(simpleBLEPeripheral应用的消息处理函数是simpleBLEPeripheral_ProcessOSALMsg),决定采取什么行动基于接收的消息类型.一旦接收任务完成处理消息,它必须解除分配内存通过osal_msg_deallocate

    可以参考下链接http://blog.csdn.net/huangfoai/article/details/16970555  3.1.4