关于ti 的DSP学习的问题
/*
* ======== clock.c ========
* The clock example shows how to use the ti.sysbios.knl.Clock module to
* create one-shot and periodic Clock Instances. Clock Instances are
* essentially functions that run after a certain number of Clock ticks.
*/
#include <xdc/std.h>
#include <xdc/runtime/System.h>
#include <ti/sysbios/BIOS.h>
#include <ti/sysbios/knl/Clock.h>
Void clk0Fxn(UArg arg0);
Void clk1Fxn(UArg arg0);
/*
* ======== main ========
*/
Void main()
{
Clock_Handle clk2;
Clock_Params clkParams;
/* Create a periodic Clock Instance with period = 5 system time units */
Clock_Params_init(&clkParams);
clkParams.period = 5;
clkParams.startFlag = TRUE;
Clock_create(clk0Fxn, 5, &clkParams, NULL);
/* Create an one-shot Clock Instance with timeout = 11 system time units */
clkParams.period = 0;
clkParams.startFlag = FALSE;
clk2 = Clock_create(clk1Fxn, 11, &clkParams, NULL);
Clock_start(clk2);
BIOS_start();
}
/*
* ======== clk0Fxn =======
*/
Void clk0Fxn(UArg arg0)
{
UInt32 time;
time = Clock_getTicks();
System_printf("System time in clk0Fxn = %lu\n", (ULong)time);
}
/*
* ======== clk1Fxn =======
*/
Void clk1Fxn(UArg arg0)
{
UInt32 time;
time = Clock_getTicks();
System_printf("System time in clk1Fxn = %lu\n", (ULong)time);
System_printf("Calling BIOS_exit() from clk1Fxn\n");
BIOS_exit(0);
}
哪位能看懂这个程序,帮忙解释解释,这样我也能有个方向!谢谢!真心的看不懂啊! dsp 图像处理 c语言 程序
[解决办法]
这个程序很表面啊,就是告诉你怎么创建定时器而已,至于细节,sysbios.knl给你封装好了