📄 core timer.c
字号:
///////////////////////////////////////////////////////////////////////////////////////
//NAME: Core Timer.c
//DATE: 9/18/03
//PURPOSE: Core timer example for the ADSP-21262 Ez-kit
//
//USAGE: Sets up the Core Timer using the C-Runtime Environment
// Counts and displays the number of core interrupts serviced.
////////////////////////////////////////////////////////////////////////////////////////
#include <def21262.h>
#include <21262.h>
#include <stdio.h>
#include <signal.h>
int timer_count = 1;
//Timer interrupt service routine
void timer_isr (int sig)
{
printf("Timer interrupt number %d\n",timer_count);
timer_count++;
}
main()
{
interrupts (SIG_TMZ, timer_isr); /* enable low priority timer interrupt */
timer_set(1000, 1000); /* set tperiod and tcount of the timer */
timer_on(); /* start timer */
while(1){};
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -