就是send一次要recieve完之后才能再send吗,为什么连续send两次就hardfault了。
创建的消息队列信息如下:
[C] 纯文本查看 复制代码 #define TXQ_QUEUE_SIZE 8
ULONG txq_queue_area[TXQ_QUEUE_SIZE];
TX_QUEUE txq_queue;
tx_queue_create(&txq_queue, "txq_queue", TX_1_ULONG, txq_queue_area, TXQ_QUEUE_SIZE);
发送方式:
[C] 纯文本查看 复制代码 uint8_t txq_buffer[4] = {1,3,6,9};
tx_queue_send(&txq_queue, txq_buffer, TX_WAIT_FOREVER);
tx_queue_send(&txq_queue, txq_buffer, TX_WAIT_FOREVER);
接收方式:
[C] 纯文本查看 复制代码 uint8_t txq_rx_buffer[10] = {0};
tx_queue_receive(&txq_queue, txq_rx_buffer, TX_WAIT_FOREVER);
|