forked from Archive/PX4-Autopilot
Tone_alarm: added checking to make sure HRT and Tone_alarm on different timers.
This commit is contained in:
parent
9f300e054d
commit
6b7fe11c2e
|
@ -117,6 +117,13 @@
|
|||
|
||||
#include <systemlib/err.h>
|
||||
|
||||
/* Check that tone alarm and HRT timers are different */
|
||||
#if defined(TONE_ALARM_TIMER) && defined(HRT_TIMER)
|
||||
# if TONE_ALARM_TIMER == HRT_TIMER
|
||||
# error TONE_ALARM_TIMER and HRT_TIMER must use different timers.
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Tone alarm configuration */
|
||||
#if TONE_ALARM_TIMER == 1
|
||||
# define TONE_ALARM_BASE STM32_TIM1_BASE
|
||||
|
@ -191,7 +198,7 @@
|
|||
# error Must not set CONFIG_STM32_TIM11 when TONE_ALARM_TIMER is 11
|
||||
# endif
|
||||
#else
|
||||
# error Must set TONE_ALARM_TIMER to a generic timer in order to use this driver.
|
||||
# error Must set TONE_ALARM_TIMER to one of the timers between 1 and 11 (inclusive) to use this driver.
|
||||
#endif
|
||||
|
||||
#if TONE_ALARM_CHANNEL == 1
|
||||
|
|
Loading…
Reference in New Issue