一、创建消息队列
QueueHandle_t queue_handle;
//创建消息队列 消息队列容量为2 消息的大小为一个字节
queue_handle = xQueueCreate(2,sizeof(uint8_t));
二、发送消息
//句柄 内容 超时时间
xQueueSend(queue_handle,(unsigned char*)&msg,100);
三、接收消息
//句柄 读取buf 阻塞等待
xQueueReceive(queue_handle,&msg,portMAX_DELAY);