////////// // Function Name : UART_Putc // Function Description : This function write character data to uart debugging ch // Input : NONE // Output : NONE // Version : void UART_Putc(char data) { u32 temp; if(data=='\n') { while(1) { Delay(10); temp = Inp32(&g_pUartDebugRegs->rUtrStat); temp&=0x2; if(temp) break; } // Delay(10); Outp8(&g_pUartDebugRegs->rUtxh,'\r'); } while(1) { Delay(5); temp = Inp32(&g_pUartDebugRegs->rUtrStat); temp&=0x02; if(temp) break; } //Delay(10); Outp8(&g_pUartDebugRegs->rUtxh,data); return; }
////////// // Function Name : CF_SetMem // Function Description : // This function sets up data to specified address of memory. // Input : eSize - size of data // uDstAddr - address of destination // uValue - data value // Output : NONE // Version : v0.1 void CF_SetMem(eACCESS_SIZE eSize, u32 uDstAddr, u32 uValue) { switch(eSize) { case eBYTE : // UART_Printf("DstAddr:0x%x, Value:0x%x\n", uDstAddr, uValue); Outp8(uDstAddr, uValue); break; case eHWORD : Outp16(uDstAddr, uValue); break; case eWORD : Outp32(uDstAddr, uValue); break; } }