连续签到天数:1天 | 签到总天数:1052天 | 签到总奖励:14870金币 |
|
发表于 2015-8-14 15:28:04
|
显示全部楼层
楼主你的问题解决了吗?我的8670也是只能发送出去,接收不到数据
void uart_handler(Task task, MessageId id, Message message)
{
UART_DEBUG(("uart handler id=0x%0x\n",id));
switch(id)
{
case SEND_UART_DATA: /*发送 */
{
uart_send(u8SendBuf, 7);
MessageCancelAll(task, SEND_UART_DATA);
}
break;
case MESSAGE_MORE_DATA: /*接收 */
{
Source source = StreamUartSource();
uint16 size = SourceSize(source);
#ifdef DEBUG_UART
uint8* data = (uint8*)SourceMap(source);
uint16 i=0;
UART_DEBUG(("uart received bytes: %d\r\n", size));
for(i = 0; i < size; i++)
UART_DEBUG(("%c\r\n", data[i]));
#endif
SourceDrop(source, size);
}
break;
default:
break;
}
}
每次8670发送出去后handler中会收到0x0822 的消息,电脑发送消息到8670,没有反映
|
|