MW22-02A/APP/Device/device_Other/device_interrupt.h

59 lines
1.7 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __PTZ_IRQ_H_
#define __PTZ_IRQ_H_
#include "ptz_type_select.h"
#include "gd32f4xx.h"
#ifdef PTZ_LIGHT_GEAR_L6235D_AS5047D
//使用L6235D驱动电机并打开霍尔反馈
#define PTZ_L6235D_HALL_FEEDBACK 1
#define PTZ_HALL_DIR 1//需不需要利用HALL判断云台实际转动方向
#define SWITCH_IRQ_V 20.5
#endif
#ifdef PTZ_MEDIUM_WORM_L6235D_AS5047D
//使用L6235D驱动电机并打开霍尔反馈
#define PTZ_L6235D_HALL_FEEDBACK 1
#define SWITCH_IRQ_V 20.5
#endif
#ifdef PTZ_HEAVY_WORM_L6235D_AS5047D
//使用L6235D驱动电机并打开霍尔反馈
#define PTZ_L6235D_HALL_FEEDBACK 1
#define SWITCH_IRQ_V 20.5
#endif
#ifdef PTZ_SUPER_LIGHT_WORM_L6235D_AS5047D_12V
//使用L6235D驱动电机并打开霍尔反馈
#define PTZ_L6235D_HALL_FEEDBACK 1
#define SWITCH_IRQ_V 10.0
#endif
#ifdef PTZ_SUPER_LIGHT_WORM_L6235D_AS5047D_24V
//使用L6235D驱动电机并打开霍尔反馈
#define PTZ_L6235D_HALL_FEEDBACK 1
#define SWITCH_IRQ_V 20.5
#endif
//步进电机
#ifdef PTZ_SUPER_LIGHT_WORM_STEP_DRV8711_AS5047D_12V
#define SWITCH_IRQ_V 10.0 //限制光电开关电压
#endif
//步进电机
#ifdef PTZ_SUPER_LIGHT_WORM_STEP_TMC2160_AS5047D_24V
#define SWITCH_IRQ_V 20
#endif
//中型步进电机
#ifdef PTZ_MEDIUM_WORM_STEP_TMC2160_AS5047D_24V
#define SWITCH_IRQ_V 20
#endif
void ptz_SW_IRQHandler(exti_line_enum sw_linex);
void ptz_H_HALL_IRQHandler(exti_line_enum hall_linex);
void ptz_V_HALL_IRQHandler(exti_line_enum hall_linex);
void EXTI_IRQ_init();
#endif