TC264—外部中断笔记

1.中端特点

智能车信标组,TC264—外部中断笔记

2.中断数量

智能车信标组,TC264—外部中断笔记

3.中断操作参数

/* 获取GPIO对应 MODULE 宏定义L /
#define PIN_GetModule(GPIO_NAME) (Ifx_P
)(0xF0030000u | (GPIO_NAME & 0xFF00))

/* 获取GPIO对应 管脚*** 宏定义Q */
#define PIN_GetIndex(GPIO_NAME) (uint8)(GPIO_NAME & 0x000F)

/* GPIO模式 /
#define PIN_MODE_OUTPUT IfxPort_Mode_outputPushPullGeneral /
!< 推挽输出 /
#define PIN_MODE_OUTPUT_OD IfxPort_Mode_outputOpenDrainGeneral /
!< 开漏输出 /
#define PIN_MODE_INPUT IfxPort_Mode_inputNoPullDevice /
!< 浮空输入 /
#define PIN_MODE_INPUT_PULLUP IfxPort_Mode_inputPullUp /
!< 上拉输入 /
#define PIN_MODE_INPUT_PULLDOWN IfxPort_Mode_inputPullDown /
!< 下拉输入 */

/* GPIO 中断触发模式 /
#define PIN_IRQ_MODE_RISING IfxPort_InputMode_pullDown /
!< 上升沿(下拉)触发中断 /
#define PIN_IRQ_MODE_FALLING IfxPort_InputMode_pullUp /
!< 下降沿(上拉)触发中断 /
#define PIN_IRQ_MODE_RISING_FALLING IfxPort_InputMode_noPullDevice /
!< 双边沿(开漏)触发中断 */

/** GPIO外部中断 组0中断服务函数优先级 范围:1-255 数字越大 优先级越高 注意优先级不要重复 */
#define PIN_INT0_PRIORITY 100

4.使用中断流程

a.初始化中断
智能车信标组,TC264—外部中断笔记b.开启中端服务函数
智能车信标组,TC264—外部中断笔记
c.调用中断智能车信标组,TC264—外部中断笔记

相关文章:

  • 2021-09-09
  • 2021-11-21
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2021-06-05
  • 2022-12-23
  • 2022-12-23
  • 2021-09-25
  • 2021-04-26
  • 2021-08-01
  • 2021-12-08
相关资源
相似解决方案