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

📄 om.c

📁 Vxworks的培训教程,大家分享下啊,
💻 C
字号:
#include "pioLib.h"/* Port C is actually hardwired to Port A.  By changing the state of * one of the first three channels of Port C, we changed the input to * Port A. */STATUS flurbish (state)	BOOL state;	{	return (pioSet (PORT_C, 0, state));	}STATUS dohickey (state)	BOOL state;	{	return (pioSet (PORT_C, 1, state));	}STATUS nevester (state)	BOOL state;	{	return (pioSet (PORT_C, 2, state));	}void monitorOM (msgQId, debug)	MSG_Q_ID msgQId;	BOOL debug;	{	PIO_MSG_Q_DATA msgQData;	int channel;		/* Initialize the PORT B channels to OFF */	for (channel=0; channel<PIO_MAX_CHANNELS_PER_PORT; channel++)		pioSet (PORT_B, channel, OFF);	FOREVER 		{		if (msgQReceive (msgQId, (char *) &msgQData, sizeof (PIO_MSG_Q_DATA), 						WAIT_FOREVER) == ERROR)			{			printf ("msgQReceive failed\n");			return;			}		pioSet (PORT_B, msgQData.channel, msgQData.state);#ifndef NDEBUG		if (debug)			printf ("port %d channel %d state %d time %d\n", msgQData.port,					msgQData.channel, msgQData.state, msgQData.timeStamp);#endif		}	}

⌨️ 快捷键说明

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