📄 configinttimer23.c
字号:
#if defined(__PIC24F__)
#include <p24Fxxxx.h>
#endif
#include <timer.h>
#if defined(_TIMER2) && defined(_TIMER3)
/****************************************************************************
Function Prototype : void ConfigIntTimer23(unsigned int config)
Include : timer.h
Description : This function configures the 32-bit timer interrupt.
Arguments : config - Timer interrupt priority and enable/disable
information as defined below
Timer Interrupt Priority
T23_INT_PRIOR_7
T23_INT_PRIOR_6
T23_INT_PRIOR_5
T23_INT_PRIOR_4
T23_INT_PRIOR_3
T23_INT_PRIOR_2
T23_INT_PRIOR_1
T23_INT_PRIOR_0
Timer Interrupt Enable\Disable
T23_INT_ON
T23_INT_OFF
Return Value : None
Remarks : This function clears the Interrupt Flag (TxIF) bit
and then sets the interrupt priority and enables/disables
the interrupt.
******************************************************************************/
void ConfigIntTimer23(unsigned int config)
{
IFS0bits.T3IF = 0; /* clear IF bit */
IPC2bits.T3IP = (config &0x0007); /* assigning Interrupt Priority */
IEC0bits.T3IE = (config &0x0008)>>3; /* Interrupt Enable /Disable */
}
#else
#warning "Does not build on this target"
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -