diff options
author | px4dev <px4@purgatory.org> | 2013-04-26 13:03:05 -0700 |
---|---|---|
committer | px4dev <px4@purgatory.org> | 2013-04-26 13:03:05 -0700 |
commit | ce0e4a3afd28b97d5a540e02bef86c52a335f243 (patch) | |
tree | 67dd8e0238e0e1a542a5026f8266537e1fa11afb /apps/drivers/stm32 | |
parent | 3acdc9d4ce3d83af6bb7f953e466620be690658e (diff) | |
parent | 46085b43d14b1ea1237aa176460ff648e0ff2d2a (diff) | |
download | px4-firmware-ce0e4a3afd28b97d5a540e02bef86c52a335f243.tar.gz px4-firmware-ce0e4a3afd28b97d5a540e02bef86c52a335f243.tar.bz2 px4-firmware-ce0e4a3afd28b97d5a540e02bef86c52a335f243.zip |
Merge branch 'master' into export-build
Diffstat (limited to 'apps/drivers/stm32')
-rw-r--r-- | apps/drivers/stm32/drv_hrt.c | 2 | ||||
-rw-r--r-- | apps/drivers/stm32/tone_alarm/tone_alarm.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/drivers/stm32/drv_hrt.c b/apps/drivers/stm32/drv_hrt.c index bb67d5e6d..cec0c49ff 100644 --- a/apps/drivers/stm32/drv_hrt.c +++ b/apps/drivers/stm32/drv_hrt.c @@ -125,7 +125,7 @@ # define HRT_TIMER_VECTOR STM32_IRQ_TIM8CC # define HRT_TIMER_CLOCK STM32_APB2_TIM8_CLKIN # if CONFIG_STM32_TIM8 -# error must not set CONFIG_STM32_TIM8=y and HRT_TIMER=6 +# error must not set CONFIG_STM32_TIM8=y and HRT_TIMER=8 # endif #elif HRT_TIMER == 9 # define HRT_TIMER_BASE STM32_TIM9_BASE diff --git a/apps/drivers/stm32/tone_alarm/tone_alarm.cpp b/apps/drivers/stm32/tone_alarm/tone_alarm.cpp index baa652d8a..ac5511e60 100644 --- a/apps/drivers/stm32/tone_alarm/tone_alarm.cpp +++ b/apps/drivers/stm32/tone_alarm/tone_alarm.cpp @@ -494,7 +494,7 @@ ToneAlarm::init() return ret; /* configure the GPIO to the idle state */ - stm32_configgpio(GPIO_TONE_ALARM); + stm32_configgpio(GPIO_TONE_ALARM_IDLE); /* clock/power on our timer */ modifyreg32(STM32_RCC_APB1ENR, 0, TONE_ALARM_CLOCK_ENABLE); @@ -606,6 +606,8 @@ ToneAlarm::start_note(unsigned note) rEGR = GTIM_EGR_UG; // force a reload of the period rCCER |= TONE_CCER; // enable the output + // configure the GPIO to enable timer output + stm32_configgpio(GPIO_TONE_ALARM); } void @@ -616,10 +618,8 @@ ToneAlarm::stop_note() /* * Make sure the GPIO is not driving the speaker. - * - * XXX this presumes PX4FMU and the onboard speaker driver FET. */ - stm32_gpiowrite(GPIO_TONE_ALARM, 0); + stm32_configgpio(GPIO_TONE_ALARM_IDLE); } void |