|
楼主 |
发表于 2012-5-28 09:16:02
|
显示全部楼层
#include <message.h>
#include <stream.h>
#include <source.h>
#include <sink.h>
#include <panic.h>
#include <string.h>
#include "Uart.h"
void UartInit(Task task)
{
MessageSinkTask(StreamSinkFromSource(StreamUartSource()), task);
}
void UartSendData(const char* s,uint16 length)
{
Sink uart = StreamUartSink();
char * data = (char*)s;
if(uart)
{
if (SinkClaim(uart,length) != 0xFFFF)
{
memcpy(SinkMap(uart),(char *)data,length);
(void)PanicZero(SinkFlush(uart,length));
}
}
}
这个我的串口初始化程序 ,也没见见到你说的PSTOOL,能说的详细点吗? |
|