mqx???????sci????????
???????????? ???????[ 2012/11/28 10:50:32 ] ????????
??????????????????mcu??sci??????mqx??????????????????????????????????д??????????????????????????????????????????????е??????
?????????sci???????????2????????????????£?
????1??????????????????????????????2-3??????0x00????????????????????????
????2?????sci????????????????2-3??????????0x00.???????????32?????????????????33??????
???????????????????????£?
????1????????????????????bsp???г??????????????????У???????????????????????????????????????????????????????????0x00???????
?????????????????????????£????????????????????????????????????????????2?????????????????????????????????????????????
????2?????????????????й??????????????linux???????????????????????????ν???????????sci????????????????sci????η???????????????????????????????????????????????ù?????????????????????????????2???????????????????Щ??????????
????????????????sci??????????sci??????????????????????????????????????????????????????????????????sci????????????????????
???????????ж?mqx??sci???????????Щ??????????sci???????????????????????????????mqx?????Сbug??????????????????????????????????????????????????????????????????????ù????У??????????????????е??????????
???????????????????????????????????????????????
/* open a message queue */
sci1_qid = _msgq_open(QNUM_SCI1_SEND_TASK?? 0);
if(sci1_qid == 0)
{
// printf("
Could not open the server message queue
");
_mqx_exit(0);
}
//open the sci1 channel
sci1_dev = fopen(BASEBOARD_HEATBOARD_CHANNEL?? NULL);
if(sci1_dev == NULL)
{
/* device could not be opened */
_task_block();
}
while (TRUE)
{
/* receive the message with block mode */
msg_ptr = _msgq_receive(sci1_qid?? 0);
if (msg_ptr == NULL)
{
//printf("
Could not receive a message
");
_mqx_exit(0);
}
/* write data to sci1 */
write(sci1_dev?? (&(msg_ptr->DATA))?? (msg_ptr->BYTE_NUM));
/* empty queue - not needed for polled mode */
fflush(sci1_dev);
/* wait for transfer complete flag */
/* after experiment??the mqx3.70 doesn't support this ioctl command ??so remove this sentence */
/*
result = ioctl(sci1_dev?? IO_IOCTL_SERIAL_WAIT_FOR_TC?? NULL );
if(result == IO_ERROR_INVALID_IOCTL_CMD)
{
// ioctl not supported?? use newer MQX version
printf("block sci send
");
_task_block();
} */
_msg_free(msg_ptr); //just for the test.mabe it is error.
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11