连续签到天数:1天 | 签到总天数:140天 | 签到总奖励:2755金币 |
|
马上注册,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册 
×
#include <stdio.h>
#include <message.h>
#include <pio.h>
#define LED_1 (1 << 6)
typedef struct
{
TaskData task;
uint16 change;
}ToggleTask;
static void MyHandle(Task t,MessageId id,Message payload)
{
uint16 change = ((ToggleTask *)t)->change;
PioSet(change,PioGet()^change);
MessageSendLater(t,0,0,500);
}
static ToggleTask toggle = {{MyHandle},LED_1};
int main(void)
{
PioSetDir(LED_1,~0);
MessageSend(&toggle.task,0,0);
MessageLoop();
return 0;
}
编译结果:
Running 'D:/ADK3.0/tools/bin/make -R BLUELAB=D:/ADK3.0/tools -f ledtest.release.mak build'...
Chip detected is gordon, default execution mode for this hardware is assisted
D:/ADK3.0/tools/bin/xap-local-xap-gcc-3.3.3 -BD:/ADK3.0/tools/lib/gcc-lib/xap-local-xap-assisted/3.3.3\\ -mpu -mleaf-optim -mno-function-sizeof -mworkaround-b96516 -g -O -fno-builtin-memcpy -ansi -pedantic -Wall -Wmissing-prototypes -Wstrict-prototypes -Wsign-compare -Wredundant-decls -Werror -ID:/ADK3.0/tools/include/firmware -ID:/ADK3.0/tools/include/standard -ID:/ADK3.0/tools/include/profiles/BlueLab6.4-Release -Wp,-MD,./depend/main -Wp,-MQ,main.o -c main.c -o main.o
main.c: In function `MyHandle':
main.c:21: warning: implicit declaration of function `PioSet'
main.c:21: warning: implicit declaration of function `PioGet'
main.c: In function `main':
main.c:32: warning: implicit declaration of function `PioSetDir'
make: *** [main.o] Error 1
Finished.
前辈们能否告诉我这是什么原因
|
|