- 积分
- 15
- 实力分
- 点
- 金钱数
- 两
- 技术分
- 分
- 贡献分
- 分
|
发表于 2008-8-6 20:43:10
|
显示全部楼层
回复 59# BingK 的帖子
GBSTMR timer;
void timer_proc(void) { //每秒运行10次
if (started) {
// REDRAW(); //重绘屏幕
GBS_StartTimerProc(&timer, 262 / 10, timer_proc); //开启计时器,计时频率为每秒10次
SetIllumination(0, 1, cfgBright, 0);
SetIllumination(1, 1, cfgBright, 0);
// ShowMSG(1,(int)"started!1");
}
else
{
GBS_StopTimer(&timer); //停止计时器
// ShowMSG(1,(int)"started!0");
}
//执行一次后就会按频率持续执行
}
我是这样写的..行吗..可是编译后没效果
..下面是判断是否开始
......
if (i=='3')//判断是否按下3键
{
if (started) {
started = 0;
ShowMSG(1,(int)"started!0");
}
else
{
started = 1;
ShowMSG(1,(int)"started!1");
}
}
......
编译后问题是.按3键会切换started值.并显示提示..可是屏幕不会长亮或灭
[ 本帖最后由 illzskn 于 2008-8-6 20:48 编辑 ] |
|