From 7554021ed013509ae0584db771e82b4c16cce859 Mon Sep 17 00:00:00 2001 From: peabody124 Date: Mon, 24 Jan 2011 07:52:11 +0000 Subject: [PATCH] OP-256 PIOS/PWM: Set the interrupts correctly git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2577 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/OpenPilot/System/pios_board.c | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/flight/OpenPilot/System/pios_board.c b/flight/OpenPilot/System/pios_board.c index 4b1a8a732..e2917e0d6 100644 --- a/flight/OpenPilot/System/pios_board.c +++ b/flight/OpenPilot/System/pios_board.c @@ -751,12 +751,10 @@ const struct pios_pwm_channel pios_pwm_channels[] = { }, }; -void TIM2_IRQHandler(); +void TIM1_CC_IRQHandler(); void TIM3_IRQHandler(); -void TIM4_IRQHandler(); -void TIM2_IRQHandler() __attribute__ ((alias ("PIOS_TIM2_irq_handler"))); +void TIM1_CC_IRQHandler() __attribute__ ((alias ("PIOS_TIM1_CC_irq_handler"))); void TIM3_IRQHandler() __attribute__ ((alias ("PIOS_TIM3_irq_handler"))); -void TIM4_IRQHandler() __attribute__ ((alias ("PIOS_TIM4_irq_handler"))); const struct pios_pwm_cfg pios_pwm_cfg = { .tim_base_init = { .TIM_Prescaler = (PIOS_MASTER_CLOCK / 1000000) - 1, @@ -787,18 +785,14 @@ const struct pios_pwm_cfg pios_pwm_cfg = { .channels = pios_pwm_channels, .num_channels = NELEMENTS(pios_pwm_channels), }; -void PIOS_TIM2_irq_handler() +void TIM1_CC_IRQHandler() { - PIOS_PWM_irq_handler(TIM2); + PIOS_PWM_irq_handler(TIM1); } -void PIOS_TIM3_irq_handler() +void TIM3_IRQHandler() { PIOS_PWM_irq_handler(TIM3); } -void PIOS_TIM4_irq_handler() -{ - PIOS_PWM_irq_handler(TIM4); -} /* * COM devices