📄 tinit0.c
字号:
//
// Project: Experiment 2.10.3 DSP Timer - Chapter 2
// File name: c_tint0.c
// Function(s): c_tint0()
//
// Description: This timer ISR is the DSP timer interrupt service routine (ISR)
//
// For the book "Real Time Digital Signal Processing:
// Implementation and Application, 2nd Ed"
// By Sen M. Kuo, Bob H. Lee, and Wenshun Tian
// Publisher: John Wiley and Sons, Ltd
//
// Tools used: CCS v.2.12.07
// TMS320VC5510 DSK Rev-C
//
#include "timer.h"
#pragma DATA_SECTION(time, ".bss:example:timer0");
#pragma CODE_SECTION(c_tint0, ".text:example:timer0");
C55xTimer time; // Define timer variable
interrupt void c_tint0(void)
{
time.us += 10; // Each interrupt is 10us
if (time.us == 1000)
{
time.us = 0;
if (time.ms++ == 1000)
{
time.ms = 0;
time.s++;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -