EM357外部中断:
EM357有四种外部中端,分别为ABCD中断类型。
EM357按键中断例子
- 调用库函数方法实现
在dev0680.h
IRQA类中断
//BUTTON1
//#define BUTTON1 PORTB_PIN(0)
/**
* @brief The GPIO input register for BUTTON0.
*/
//#define BUTTON1_IN GPIO_PAIN
/**
* @brief Point the proper IRQ at the desired pin for BUTTON0.
* @note IRQB is fixed and as such does not need any selection operation.
*/
//#define BUTTON1_SEL() do { } while(0)
/**
* @brief The interrupt service routine for BUTTON0.
*/
//#define BUTTON1_ISR halIrqAIsr
/**
* @brief The interrupt configuration register for BUTTON0.
*/
//#define BUTTON1_INTCFG GPIO_INTCFGA
/**
* @brief The interrupt enable bit for BUTTON0.
*/
//#define BUTTON1_INT_EN_BIT INT_IRQA
/**
* @brief The interrupt flag bit for BUTTON0.
*/
//#define BUTTON1_FLAG_BIT INT_IRQAFLAG
/**
* @brief The missed interrupt bit for BUTTON0.
*/
//#define BUTTON1_MISS_BIT INT_MISSIRQA
IRQB类中断
//BUTTON1