mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-10 07:31:36 +08:00
imxrt:hrt support Up to GPT6
This commit is contained in:
@@ -94,12 +94,28 @@
|
||||
# define HRT_CLOCK_ALL() imxrt_clockall_gpt_bus() /* The Clock Gating macro for this GPT */
|
||||
#elif HRT_TIMER == 2
|
||||
# define HRT_CLOCK_ALL() imxrt_clockall_gpt2_bus() /* The Clock Gating macro for this GPT */
|
||||
#elif HRT_TIMER == 3
|
||||
# define HRT_CLOCK_ALL() imxrt_clockall_gpt3_bus() /* The Clock Gating macro for this GPT */
|
||||
#elif HRT_TIMER == 4
|
||||
# define HRT_CLOCK_ALL() imxrt_clockall_gpt4_bus() /* The Clock Gating macro for this GPT */
|
||||
#elif HRT_TIMER == 5
|
||||
# define HRT_CLOCK_ALL() imxrt_clockall_gpt5_bus() /* The Clock Gating macro for this GPT */
|
||||
#elif HRT_TIMER == 6
|
||||
# define HRT_CLOCK_ALL() imxrt_clockall_gpt6_bus() /* The Clock Gating macro for this GPT */
|
||||
#endif
|
||||
|
||||
#if HRT_TIMER == 1 && defined(CONFIG_IMXRT_GPT1)
|
||||
# error must not set CONFIG_IMXRT_GPT1=y and HRT_TIMER=1
|
||||
#elif HRT_TIMER == 2 && defined(CONFIG_IMXRT_GPT2)
|
||||
# error must not set CONFIG_IMXRT_GPT2=y and HRT_TIMER=2
|
||||
#elif HRT_TIMER == 3 && defined(CONFIG_IMXRT_GPT3)
|
||||
# error must not set CONFIG_IMXRT_GPT3=y and HRT_TIMER=3
|
||||
#elif HRT_TIMER == 4 && defined(CONFIG_IMXRT_GPT4)
|
||||
# error must not set CONFIG_IMXRT_GPT4=y and HRT_TIMER=4
|
||||
#elif HRT_TIMER == 5 && defined(CONFIG_IMXRT_GPT5)
|
||||
# error must not set CONFIG_IMXRT_GPT5=y and HRT_TIMER=5
|
||||
#elif HRT_TIMER == 6 && defined(CONFIG_IMXRT_GPT6)
|
||||
# error must not set CONFIG_IMXRT_GPT6=y and HRT_TIMER=6
|
||||
#endif
|
||||
|
||||
/*
|
||||
@@ -165,7 +181,7 @@
|
||||
# define STATUS_HRT CAT(GPT_SR_OF, HRT_TIMER_CHANNEL) /* OF Output Compare Flag */
|
||||
# define OFIE_HRT CAT3(GPT_IR_OF, HRT_TIMER_CHANNEL,IE) /* Output Compare Interrupt Enable */
|
||||
|
||||
#if (HRT_TIMER_CHANNEL > 1) || (HRT_TIMER_CHANNEL > 3)
|
||||
#if (HRT_TIMER_CHANNEL < 1) || (HRT_TIMER_CHANNEL > 3)
|
||||
# error HRT_TIMER_CHANNEL must be a value between 1 and 3
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user