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

base program test

parent b51a6616
No related branches found
No related tags found
No related merge requests found
......@@ -67,14 +67,22 @@ int doAwaitEvent(KernelStruct* Colonel, int EventID) {
void UART1Event(int* Uart1Status, char* bTX, char* bRX ){
int* Uart1Flag = (int *)(UART1_BASE | UART_FLAG_OFFSET);
int* Uart1IDClr = (int *)(UART1_BASE | UART_INTR_OFFSET);
int intClr = *Uart1IDClr;
int flagval = *Uart1Flag;
*bTX = (*Uart1Status & (1<<5 | 1<<3));
*bRX = (*Uart1Status & (1<< 4));
// turn off whoever is on
bwprintf(COM2,"UART1E: UART1Ctrl %d\n\r",((*Uart1Status)<<24)>>24);
bwprintf(COM2,"UART1E: %d %d\n\r",((*Uart1Status)<<24)>>24,(intClr<<28)>>28);
if(flagval & TXFE_MASK) *Uart1Status &= ~(1<<5);
if(flagval & CTS_MASK) *Uart1Status &= ~(1<<3);
if(flagval & RXFF_MASK) *Uart1Status &= ~(1<<4);
/*
if(flagval & TXFE_MASK) *Uart1Status &= ~(1<<5);
if(flagval & CTS_MASK) *Uart1Status &= ~(1<<3);
if(flagval & RXFF_MASK) *Uart1Status &= ~(1<<4);
*/
bwprintf(COM2,"UART1E: %d %d\n\r",((*Uart1Status)<<24)>>24,(intClr<<28)>>28);
}
void ProcessEvent(KernelStruct* Colonel, int EventID) { //TODOTODO when use this
......
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