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

📄 tyshow.c

📁 vxworks 串口通信程序例子 对vxworks下开发串口通信程序很有帮助
💻 C
字号:
/* tyShow.c - list the values of internal variables in a TY_DEV structure (serial device known to the OS)*/  /* Copyright 1984-1998 Wind River Systems, Inc. */   /* modification history --------------------  */  /* DESCRIPTION This library is provided by Wind River Systems Customer Support strictly as an educational example.  This routine is designed to list the values of internal variables in a TY_DEV structure. */  /* includes */  #include "vxWorks.h" #include "ioLib.h" #include "stdio.h" #include "tyLib.h"  /*************************************************************************** * * tyShow * * This routine prints the contents of each field. */  void tyShow      (     TY_DEV * pTyDev     )     {     /* read - ring buffer and semaphores */     printf ("Address of pTyDev->rdBuf     = 0x%08x.\n", &pTyDev->rdBuf);     printf ("Address of pTyDev->rdSyncSem = 0x%08x.\n", &pTyDev->rdSyncSem);     printf ("Address of pTyDev->mutexSem  = 0x%08x.\n\n", &pTyDev->mutexSem);      /* rdState */     printf ("pTyDev->rdState.xoff          = 0x%02x.\n", pTyDev->rdState.xoff);     printf ("pTyDev->rdState.pending       = 0x%02x.\n", pTyDev->rdState.pending);     printf ("pTyDev->rdState.canceled      = 0x%02x.\n", pTyDev->rdState.canceled);     printf ("pTyDev->rdState.canceled      = 0x%02x.\n", pTyDev->rdState.canceled);      /* write - ring buffer and semaphores */     printf ("Address of pTyDev->wrtBuf     = 0x%08x.\n", &pTyDev->wrtBuf);     printf ("Address of pTyDev->wrtSyncSem = 0x%08x.\n\n", &pTyDev->wrtSyncSem);      /* wrtState */     printf ("pTyDev->wrtState.busy           = 0x%02x.\n", pTyDev->wrtState.busy);     printf ("pTyDev->wrtState.xoff           = 0x%02x.\n", pTyDev->wrtState.xoff);     printf ("pTyDev->wrtState.cr             = 0x%02x.\n", pTyDev->wrtState.cr);     printf ("pTyDev->wrtState.canceled       = 0x%02x.\n", pTyDev->wrtState.canceled);     printf ("pTyDev->wrtState.flushingWrtBuf = 0x%02x.\n", pTyDev->wrtState.flushingWrtBuf);     printf ("pTyDev->wrtState.wrtBufBusy     = 0x%02x.\n\n", pTyDev->wrtState.wrtBufBusy);      /* line counters */     printf ("pTyDev->lnNBytes    = 0x%02x.\n",pTyDev->lnNBytes);     printf ("pTyDev->lnBytesLeft = 0x%02x.\n\n",pTyDev->lnBytesLeft);      /* other stuff */     printf ("pTyDev->options                  = 0x%04x.\n", pTyDev->options);     printf ("Address of pTyDev->txStartup     = 0x%08x.\n", &pTyDev->txStartup);     printf ("Address of pTyDev->protoHook     = 0x%08x.\n", &pTyDev->protoHook);     printf ("pTyDev->protoArg                 = 0x%08x.\n", pTyDev->protoArg);     printf ("Address of pTyDev->selWakeupList = 0x%08x.\n", &pTyDev->selWakeupList);     printf ("pTyDev->numOpen                  = 0x%08x.\n", pTyDev->numOpen);     } 

⌨️ 快捷键说明

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