⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dbgserutils.c

📁 vxworks的BSP开发配置文件
💻 C
字号:
/* dbgSerUtils.c - Primitive serial debugging routines for polled I/O *//* Copyright 1999 Intel Corp. *//*modification history--------------------01a,08jul99,jdg  created*//*DESCRIPTIONThis file contains primitive debug routines for doing polled I/O onthe serial port. This may be used as an aid to debugging BSP issuesbefore the operating system is fully initialized.*/#ifdef INCLUDE_EARLY_SERIAL_DEBUG#include <sioLib.h>SIO_CHAN *dbgSerChan;/********************************************************************************* dbgSerInit - Initialize debug serial port support** This routine initializes the serial port.** RETURNS: N/A*/void dbgSerInit (void)    {    dbgSerChan = sysSerialChanGet(0);    sioIoctl(dbgSerChan, SIO_BAUD_SET, (void *)WDB_TTY_BAUD);    }/********************************************************************************* dbgSerOutstr - Send a string out the serial port using polled I/O** This routine sends the specified string out the serial port using* polled I/O. Note that for proper display on terminals, lines of* text should be terminated with a carriage return as well as a line feed.** RETURNS: N/A*/void dbgSerOutstr    (    char *str             /* String to be output */    )    {    while (*str)        {        while (sioPollOutput(dbgSerChan, *str) == EAGAIN)            continue;        str++;        }    }/********************************************************************************* dbgSerLoopback - Copy the input of the serial port to the output** This routine enters an infinite loop reading a character from the* serial port (using polled I/O) and then writing it to the serial* port (using polled I/O).** RETURNS: N/A*/void dbgSerLoopback()    {    char x;    while (1)        {        while (sioPollInput(dbgSerChan, &x) == EAGAIN);        while (sioPollOutput(dbgSerChan, x) == EAGAIN);        }    }#endif /* INCLUDE_EARLY_SERIAL_DEBUG */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -