中断问题

xhh007 2007-07-19 10:32:21
#include <stdio.h>
#include "vxWorks.h"
#include <ArmReg.h>
#include <semLib.h>
#include "sysLib.h"
#include <intLib.h>
#include "taskLib.h"
SEM_ID syncSem;
void inxxxx(void);
void task1(void);
void interruptxxxx(void);
#define INUM_TO_IVEC(intNum) ((VOIDFUNCPTR *) (intNum));

void usrAppInit (void)
{
#ifdef USER_APPL_INIT
USER_APPL_INIT;
#endif

SysInit();
printf(">>system inital ok!!\n");

inxxxx();
}
void inxxxx(void)
{
int x=6;
printf("1\n");
intConnect(INUM_TO_IVEC(6),(VOIDFUNCPTR)interruptxxxx,0);
printf("2\n");
syncSem = semBCreate (SEM_Q_FIFO, SEM_EMPTY);
taskSpawn("sample",100,0,20000,task1,0,0,0,0,0,0,0,0,0,0);
printf("3\n");
}
void task1(void)
{
int i;
semTake (syncSem, WAIT_FOREVER); /* 等待事件的发生 */
while(1)
{
printf("put runled post\n");
scanf("%d ",&i);
RunLED2(i);
}
}
void interruptxxxx(void)
{
semGive (syncSem); /* 通知事件的发生*/
}
编译这样错误
..\usrAppInit.c: In function `inxxxx':
..\usrAppInit.c:58: parse error before `;'
..\usrAppInit.c:61: warning: passing arg 5 of `taskSpawn' from incompatible pointer type
...全文
325 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
siliu 2007-07-19
  • 打赏
  • 举报
回复
#define INUM_TO_IVEC(intNum) ((VOIDFUNCPTR *) (intNum));
后面没有逗号!!!

*****************************************************************************
欢迎使用CSDN论坛专用阅读器 : CSDN Reader(附全部源代码)

http://www.cnblogs.com/feiyun0112/archive/2006/09/20/509783.html

2,179

社区成员

发帖
与我相关
我的任务
社区描述
xworks是美国 Wind River System 公司( 以下简称风河公司 ,即 WRS 公司)推出的一个实时操作系统。
社区管理员
  • VxWorks开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧