`xil_printf`是在Xilinx的软件开发工具套件(Xilinx Software Development Kit,XSDK)中使用的一个输出函数,用于在嵌入式系统中进行输出调试信息。它类似于C语言中的标准库函数`printf`。 以下是`xil_printf`的基本用法示例: ```c #include <stdio.h> #include "xil_printf.h" int main() { int value = 42...
1.依赖的库文件不同 printf使用C标准库头文件stdio.h print/xil_printf使用xilinx定义的头文件xil_printf.h 2.能够输出的格式不同 print只能打印字符串,不可以带参数格式化输出,函数在print.c中定义 xil_printf可以带参量打印,但是不支持打印浮点数,函数在xil_printf.c中定义 printf可以带参量打印,用法和常规的c中...
}while( (data&0x3) !=0);// PRESS ANY KEY TO EXITif( XUartNs550_IsReceiveData(STDIN_BASEADDRESS) )gotorotary_exit;// RESULT TO USERpulses += dir;xil_printf("%s-%d [Exit: press anykey]\r\n", (dir==DIR_RIGHT) ?"Anti-Clockwise":" Clockwise",abs(pulses) ); } rotary_exit: X...
xil_printf("Ctrl: 0x%x\r\n\r\n", ctrl); xil_printf(" Window Start X : %d\r\n",colstart); xil_printf(" Window End X : %d\r\n",colend); xil_printf(" Window Start Y : %d\r\n",rowstart); xil_printf(" Window End Y : %d\r\n",rowend); xil_printf(" Frame Width : ...
{printf("error, RS_AWDT_CTRL set unsuccessful\n\r"); sleep(2);exit(0); }// set initial loadawdt_kick_seconds(seconds);// set watchdog controlunsignedintwdt_control =1<< WD_ENABLE_BIT |0<< AUTO_RELOAD_BIT |1<< WD_MODE_BIT |0xFF<< PRESCALER_BIT;Xil_Out32(WDT_CONTROL, wdt_...
xil_printf("Failed init intc\r\n");returnXST_FAILURE; } Status = XIntc_Connect(IntcInstancePtr, ReadIntrId, (XInterruptHandler)XAxiVdma_ReadIntrHandler, AxiVdmaPtr);if(Status != XST_SUCCESS) { xil_printf("Failed read channel connect intc %d\r\n", Status);returnXST_FAILURE; ...