From 92dd78db517ebd654aeea20680278d23b0a7464d Mon Sep 17 00:00:00 2001 From: peabody124 Date: Mon, 24 Jan 2011 23:17:39 +0000 Subject: [PATCH] OP-256 PIOS/PWM: Disable from the pios_board.c file when not using PWM git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2589 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/CopterControl/System/pios_board.c | 2 ++ flight/OpenPilot/System/pios_board.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/flight/CopterControl/System/pios_board.c b/flight/CopterControl/System/pios_board.c index 744e08069..20b096735 100644 --- a/flight/CopterControl/System/pios_board.c +++ b/flight/CopterControl/System/pios_board.c @@ -551,6 +551,7 @@ const struct pios_servo_cfg pios_servo_cfg = { /* * PWM Inputs */ +#if defined(PIOS_INCLUDE_PWM) #include const struct pios_pwm_channel pios_pwm_channels[] = { { @@ -645,6 +646,7 @@ void PIOS_TIM4_irq_handler() { PIOS_PWM_irq_handler(TIM4); } +#endif /* * I2C Adapters diff --git a/flight/OpenPilot/System/pios_board.c b/flight/OpenPilot/System/pios_board.c index df8e5dcd9..e07786735 100644 --- a/flight/OpenPilot/System/pios_board.c +++ b/flight/OpenPilot/System/pios_board.c @@ -691,6 +691,7 @@ const struct pios_servo_cfg pios_servo_cfg = { /* * PWM Inputs */ +#if defined(PIOS_INCLUDE_PWM) #include const struct pios_pwm_channel pios_pwm_channels[] = { { @@ -793,6 +794,7 @@ void PIOS_TIM3_irq_handler() { PIOS_PWM_irq_handler(TIM3); } +#endif /* * COM devices