Skip to content
Snippets Groups Projects
Commit f1276ee3 authored by Tom Feng's avatar Tom Feng
Browse files

the buffer in trainin notifier gets the byte

parent 89b3a137
Branches backup727
No related tags found
1 merge request!16Withtime
......@@ -125,12 +125,14 @@ void TrainInNotifier(){
//bwprintf(COM2,"TrainIn: after await %d\n\r",Res);
if (Res > -1){
Byte = *(char *)(UART1_BASE);
Printf(COM2,"%s%c[%d;%dH%d%s",SAVE_CURSOR,ESC,25,80+(FIFO.Length<<1),Byte,RESTORE_CURSOR);
FeedBufferByte(&FIFO,(void *)Byte);
if(FIFO.Length = FIFO.Size){
if(FIFO.Length == FIFO.Size){
SendReq.Type = NIN;
SendReq.Len = 10;
SendReq.Chan = COM1;
Send(IServerID,(void*)&SendReq, sizeof(IOReq), (void *)&ReplyMsg, sizeof(int));
Printf(COM2,"%s%c[%d;%dH%d,%d,%d,%d%s",SAVE_CURSOR,ESC,24,80,storage[0],storage[1],storage[2],storage[3],RESTORE_CURSOR);
BufferClear(&FIFO);
}
// *(int *)(UART1_BASE | UART_CTLR_OFFSET) |= ( 1<<4 );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment