在使用C6657过程中,在SYS/BIOS操作系统下,有一个定时器中断需要反复启停,我在搜索官方例程和资料时,只发现了有关于定时器中断的配置,没有发现关于定时器中断禁用的资料及例程,请问有相关的函数和资料可供参考吗?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
在使用C6657过程中,在SYS/BIOS操作系统下,有一个定时器中断需要反复启停,我在搜索官方例程和资料时,只发现了有关于定时器中断的配置,没有发现关于定时器中断禁用的资料及例程,请问有相关的函数和资料可供参考吗?
您好,我想做的程序是在第一个硬件中断中启用一个定时器中断,在另一个硬件中断中停用这个定时器中断,如果直接设置,程序编译会报定时器没有被定义,程序代码如下:
Void Syn0(UArg arg) //配置定时器中断并启动
{
Timer_Params timerParams;
Timer_Handle Timer3;
Timer_Params_init(&timerParams);
// 配置周期
timerParams.period = 100; // 0.1ms
timerParams.periodType = Timer_PeriodType_MICROSECS;
// 实例化定时器
Timer3 = Timer_create(3, TimerIsr1, &timerParams, NULL);
}
void Pluse1() //禁用定时器中断
{
Timer_stop(Timer3);
}
编译后报错说Timer3没有被定义
请问之中情况应该怎么解决?如何能定义一个适用全局的句柄呢
我将定时器的配置放在主程序中,但是在中断服务函数中依然提示我变量未被定义。
Description Resource Path Location Type
#20 identifier "Timer3" is undefined main.c /SYSBIOS_Timer line 763 C/C++ Problem
#20 identifier "Timer3" is undefined main.c /SYSBIOS_Timer line 775 C/C++ Problem
gmake: *** [main.obj] Error 1 SYSBIOS_Timer C/C++ Problem
gmake: Target 'all' not remade because of errors. SYSBIOS_Timer C/C++ Problem