[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[paparazzi-commits] [5380] renamed sw/airborne/booz/arch/stm32/actuators
From: |
antoine drouin |
Subject: |
[paparazzi-commits] [5380] renamed sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw. [ch] to sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.[ch] |
Date: |
Sun, 15 Aug 2010 17:37:34 +0000 |
Revision: 5380
http://svn.sv.gnu.org/viewvc/?view=rev&root=paparazzi&revision=5380
Author: poine
Date: 2010-08-15 17:37:33 +0000 (Sun, 15 Aug 2010)
Log Message:
-----------
renamed sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.[ch] to
sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.[ch]
Modified Paths:
--------------
paparazzi3/trunk/conf/autopilot/lisa_passthrough.makefile
paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile
paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.c
paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.h
paparazzi3/trunk/sw/airborne/lisa/lisa_stm_passthrough_main.c
paparazzi3/trunk/sw/airborne/lisa/test_servos.c
Added Paths:
-----------
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.c
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.h
Removed Paths:
-------------
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.c
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.h
Modified: paparazzi3/trunk/conf/autopilot/lisa_passthrough.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/lisa_passthrough.makefile 2010-08-15
17:20:34 UTC (rev 5379)
+++ paparazzi3/trunk/conf/autopilot/lisa_passthrough.makefile 2010-08-15
17:37:33 UTC (rev 5380)
@@ -69,4 +69,4 @@
endif
stm_passthrough.CFLAGS += -DSERVO_HZ=$(SERVOS_REFRESH_FREQ)
stm_passthrough.srcs += $(SRC_BOOZ)/actuators/booz_actuators_pwm.c
-stm_passthrough.srcs += $(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_hw.c
+stm_passthrough.srcs += $(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_arch.c
Modified: paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile
===================================================================
--- paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile 2010-08-15
17:20:34 UTC (rev 5379)
+++ paparazzi3/trunk/conf/autopilot/lisa_test_progs.makefile 2010-08-15
17:37:33 UTC (rev 5380)
@@ -408,7 +408,7 @@
test_servos.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC((1./512.))'
test_servos.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c
-test_servos.srcs += $(SRC_BOOZ)/actuators/booz_actuators_pwm.c
$(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_hw.c
+test_servos.srcs += $(SRC_BOOZ)/actuators/booz_actuators_pwm.c
$(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_arch.c
#test_servos.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600
@@ -1339,7 +1339,7 @@
test_board.CFLAGS += -DUSE_I2C1
-test_board.srcs += $(SRC_BOOZ)/actuators/booz_actuators_pwm.c
$(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_hw.c
+test_board.srcs += $(SRC_BOOZ)/actuators/booz_actuators_pwm.c
$(SRC_BOOZ_ARCH)/actuators/booz_actuators_pwm_arch.c
Modified: paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.c
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.c
2010-08-15 17:20:34 UTC (rev 5379)
+++ paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.c
2010-08-15 17:37:33 UTC (rev 5380)
@@ -2,3 +2,6 @@
int32_t booz_actuators_pwm_values[BOOZ_ACTUATORS_PWM_NB];
+void booz_actuators_init(void) {
+ booz_actuators_pwm_arch_init();
+}
Modified: paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.h
===================================================================
--- paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.h
2010-08-15 17:20:34 UTC (rev 5379)
+++ paparazzi3/trunk/sw/airborne/booz/actuators/booz_actuators_pwm.h
2010-08-15 17:37:33 UTC (rev 5380)
@@ -1,22 +1,22 @@
/*
* $Id$
*
- * Copyright (C) 2010 Antoine Drouin <address@hidden>
+ * Copyright (C) 2010 The Paparazzi Team
*
- * This file is part of paparazzi.
+ * This file is part of Paparazzi.
*
- * paparazzi is free software; you can redistribute it and/or modify
+ * Paparazzi is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
- * paparazzi is distributed in the hope that it will be useful,
+ * Paparazzi is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
+ * along with Paparazzi; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
@@ -29,6 +29,8 @@
#define BOOZ_ACTUATORS_PWM_NB 6
extern int32_t booz_actuators_pwm_values[BOOZ_ACTUATORS_PWM_NB];
-#include "actuators/booz_actuators_pwm_hw.h"
+extern void booz_actuators_init(void);
+#include "actuators/booz_actuators_pwm_arch.h"
+
#endif /* BOOZ_ACTUATORS_PWM_H */
Copied:
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.c
(from rev 5367,
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.c)
===================================================================
---
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.c
(rev 0)
+++
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.c
2010-08-15 17:37:33 UTC (rev 5380)
@@ -0,0 +1,124 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * This file is part of Paparazzi.
+ *
+ * Paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Paparazzi; see the file COPYING. If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+#include "booz/actuators/booz_actuators_pwm.h"
+
+#include <stm32/gpio.h>
+#include <stm32/rcc.h>
+#include <stm32/flash.h>
+#include <stm32/misc.h>
+#include <stm32/tim.h>
+
+#define PCLK 72000000
+#define ONE_MHZ_CLK 1000000
+#ifndef SERVO_HZ
+#define SERVO_HZ 40
+#endif
+
+void booz_actuators_pwm_arch_init(void) {
+
+ /* TIM3 and TIM4 clock enable */
+ RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE);
+ RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);
+
+ /* GPIOB and GPIOC clock enable */
+ RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
RCC_APB2Periph_GPIOC |
+ RCC_APB2Periph_AFIO, ENABLE);
+ /* GPIO C */
+ /* PC6=servo1 PC7=servo2 PC8=servo3 PC9=servo4 */
+ GPIO_InitTypeDef GPIO_InitStructure;
+ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 |
GPIO_Pin_9;
+ GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
+ GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
+ GPIO_Init(GPIOC, &GPIO_InitStructure);
+ /* need to remate alternate function, pins 37, 38, 39, 40 on LQFP64 */
+ GPIO_PinRemapConfig(GPIO_FullRemap_TIM3, ENABLE);
+
+ /* GPIO B */
+ /* PB8=servo5 PB9=servo6 */
+ GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9;
+ GPIO_Init(GPIOB, &GPIO_InitStructure);
+
+ /* Time base configuration */
+ TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
+ TIM_TimeBaseStructure.TIM_Prescaler = (PCLK / ONE_MHZ_CLK) - 1; // 1uS
+ TIM_TimeBaseStructure.TIM_Period = (ONE_MHZ_CLK / SERVO_HZ) - 1;
+ TIM_TimeBaseStructure.TIM_ClockDivision = 0;
+ TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
+
+ TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure);
+ TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);
+
+ /* PWM1 Mode configuration: All Channels */
+ TIM_OCInitTypeDef TIM_OCInitStructure;
+ TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1;
+ TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
+ TIM_OCInitStructure.TIM_Pulse = 0; // default low (no pulse)
+ TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;
+
+ /* PWM1 Mode configuration: TIM3 Channel1 */
+ TIM_OC1Init(TIM3, &TIM_OCInitStructure);
+ TIM_OC1PreloadConfig(TIM3, TIM_OCPreload_Enable);
+
+ /* PWM1 Mode configuration: TIM3 Channel2 */
+ TIM_OC2Init(TIM3, &TIM_OCInitStructure);
+ TIM_OC2PreloadConfig(TIM3, TIM_OCPreload_Enable);
+
+ /* PWM1 Mode configuration: TIM3 Channel3 */
+ TIM_OC3Init(TIM3, &TIM_OCInitStructure);
+ TIM_OC3PreloadConfig(TIM3, TIM_OCPreload_Enable);
+
+ /* PWM1 Mode configuration: TIM3 Channel4 */
+ TIM_OC4Init(TIM3, &TIM_OCInitStructure);
+ TIM_OC4PreloadConfig(TIM3, TIM_OCPreload_Enable);
+
+ /* PWM1 Mode configuration: TIM4 Channel3 */
+ TIM_OC3Init(TIM4, &TIM_OCInitStructure);
+ TIM_OC3PreloadConfig(TIM4, TIM_OCPreload_Enable);
+
+ /* PWM1 Mode configuration: TIM4 Channel4 */
+ TIM_OC4Init(TIM4, &TIM_OCInitStructure);
+ TIM_OC4PreloadConfig(TIM4, TIM_OCPreload_Enable);
+
+ /* TIM3 enable */
+ TIM_ARRPreloadConfig(TIM3, ENABLE);
+ TIM_CtrlPWMOutputs(TIM3, ENABLE);
+ TIM_Cmd(TIM3, ENABLE);
+
+ /* TIM4 enable */
+ TIM_ARRPreloadConfig(TIM4, ENABLE);
+ TIM_CtrlPWMOutputs(TIM4, ENABLE);
+ TIM_Cmd(TIM4, ENABLE);
+
+}
+
+/* set pulse widths from actuator values, assumed to be in us */
+void booz_actuators_pwm_commit(void) {
+ TIM_SetCompare1(TIM3, booz_actuators_pwm_values[0]);
+ TIM_SetCompare2(TIM3, booz_actuators_pwm_values[1]);
+ TIM_SetCompare3(TIM3, booz_actuators_pwm_values[2]);
+ TIM_SetCompare4(TIM3, booz_actuators_pwm_values[3]);
+ TIM_SetCompare3(TIM4, booz_actuators_pwm_values[4]);
+ TIM_SetCompare4(TIM4, booz_actuators_pwm_values[5]);
+}
Copied:
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.h
(from rev 5367,
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.h)
===================================================================
---
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.h
(rev 0)
+++
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.h
2010-08-15 17:37:33 UTC (rev 5380)
@@ -0,0 +1,35 @@
+/*
+ * $Id$
+ *
+ * Copyright (C) 2010 The Paparazzi Team
+ *
+ * This file is part of Paparazzi.
+ *
+ * Paparazzi is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * Paparazzi is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Paparazzi; see the file COPYING. If not, write to
+ * the Free Software Foundation, 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ *
+ */
+
+/*
+ * STM32 PWM servos handling
+ */
+
+#ifndef BOOZ_ACTUATORS_PWM_ARCH_H
+#define BOOZ_ACTUATORS_PWM_ARCH_H
+
+extern void booz_actuators_pwm_arch_init(void);
+extern void booz_actuators_pwm_commit(void);
+
+#endif /* BOOZ_ACTUATORS_PWM_ARCH_H */
Deleted:
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.c
===================================================================
---
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.c
2010-08-15 17:20:34 UTC (rev 5379)
+++
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.c
2010-08-15 17:37:33 UTC (rev 5380)
@@ -1,123 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2010 Antoine Drouin <address@hidden>
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "actuators/booz_actuators_pwm.h"
-
-#include <stm32/gpio.h>
-#include <stm32/rcc.h>
-#include <stm32/flash.h>
-#include <stm32/misc.h>
-#include <stm32/tim.h>
-
-#define PCLK 72000000
-#define ONE_MHZ_CLK 1000000
-#ifndef SERVO_HZ
-#define SERVO_HZ 40
-#endif
-
-void booz_actuators_pwm_hw_init(void) {
-
- /* TIM3 and TIM4 clock enable */
- RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM3, ENABLE);
- RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM4, ENABLE);
-
- /* GPIOB and GPIOC clock enable */
- RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA | RCC_APB2Periph_GPIOB |
RCC_APB2Periph_GPIOC |
- RCC_APB2Periph_AFIO, ENABLE);
- /* GPIO C */
- /* PC6=servo1 PC7=servo2 PC8=servo3 PC9=servo4 */
- GPIO_InitTypeDef GPIO_InitStructure;
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7 | GPIO_Pin_8 |
GPIO_Pin_9;
- GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
- GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
- GPIO_Init(GPIOC, &GPIO_InitStructure);
- /* need to remate alternate function, pins 37, 38, 39, 40 on LQFP64 */
- GPIO_PinRemapConfig(GPIO_FullRemap_TIM3, ENABLE);
-
- /* GPIO B */
- /* PB8=servo5 PB9=servo6 */
- GPIO_InitStructure.GPIO_Pin = GPIO_Pin_8 | GPIO_Pin_9;
- GPIO_Init(GPIOB, &GPIO_InitStructure);
-
- /* Time base configuration */
- TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
- TIM_TimeBaseStructure.TIM_Prescaler = (PCLK / ONE_MHZ_CLK) - 1; // 1uS
- TIM_TimeBaseStructure.TIM_Period = (ONE_MHZ_CLK / SERVO_HZ) - 1;
- TIM_TimeBaseStructure.TIM_ClockDivision = 0;
- TIM_TimeBaseStructure.TIM_CounterMode = TIM_CounterMode_Up;
-
- TIM_TimeBaseInit(TIM3, &TIM_TimeBaseStructure);
- TIM_TimeBaseInit(TIM4, &TIM_TimeBaseStructure);
-
- /* PWM1 Mode configuration: All Channels */
- TIM_OCInitTypeDef TIM_OCInitStructure;
- TIM_OCInitStructure.TIM_OCMode = TIM_OCMode_PWM1;
- TIM_OCInitStructure.TIM_OutputState = TIM_OutputState_Enable;
- TIM_OCInitStructure.TIM_Pulse = 0; // default low (no pulse)
- TIM_OCInitStructure.TIM_OCPolarity = TIM_OCPolarity_High;
-
- /* PWM1 Mode configuration: TIM3 Channel1 */
- TIM_OC1Init(TIM3, &TIM_OCInitStructure);
- TIM_OC1PreloadConfig(TIM3, TIM_OCPreload_Enable);
-
- /* PWM1 Mode configuration: TIM3 Channel2 */
- TIM_OC2Init(TIM3, &TIM_OCInitStructure);
- TIM_OC2PreloadConfig(TIM3, TIM_OCPreload_Enable);
-
- /* PWM1 Mode configuration: TIM3 Channel3 */
- TIM_OC3Init(TIM3, &TIM_OCInitStructure);
- TIM_OC3PreloadConfig(TIM3, TIM_OCPreload_Enable);
-
- /* PWM1 Mode configuration: TIM3 Channel4 */
- TIM_OC4Init(TIM3, &TIM_OCInitStructure);
- TIM_OC4PreloadConfig(TIM3, TIM_OCPreload_Enable);
-
- /* PWM1 Mode configuration: TIM4 Channel3 */
- TIM_OC3Init(TIM4, &TIM_OCInitStructure);
- TIM_OC3PreloadConfig(TIM4, TIM_OCPreload_Enable);
-
- /* PWM1 Mode configuration: TIM4 Channel4 */
- TIM_OC4Init(TIM4, &TIM_OCInitStructure);
- TIM_OC4PreloadConfig(TIM4, TIM_OCPreload_Enable);
-
- /* TIM3 enable */
- TIM_ARRPreloadConfig(TIM3, ENABLE);
- TIM_CtrlPWMOutputs(TIM3, ENABLE);
- TIM_Cmd(TIM3, ENABLE);
-
- /* TIM4 enable */
- TIM_ARRPreloadConfig(TIM4, ENABLE);
- TIM_CtrlPWMOutputs(TIM4, ENABLE);
- TIM_Cmd(TIM4, ENABLE);
-
-}
-
-/* set pulse widths from actuator values, assumed to be in us */
-void booz_actuators_pwm_commit(void) {
- TIM_SetCompare1(TIM3, booz_actuators_pwm_values[0]);
- TIM_SetCompare2(TIM3, booz_actuators_pwm_values[1]);
- TIM_SetCompare3(TIM3, booz_actuators_pwm_values[2]);
- TIM_SetCompare4(TIM3, booz_actuators_pwm_values[3]);
- TIM_SetCompare3(TIM4, booz_actuators_pwm_values[4]);
- TIM_SetCompare4(TIM4, booz_actuators_pwm_values[5]);
-}
Deleted:
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.h
===================================================================
---
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.h
2010-08-15 17:20:34 UTC (rev 5379)
+++
paparazzi3/trunk/sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw.h
2010-08-15 17:37:33 UTC (rev 5380)
@@ -1,34 +0,0 @@
-/*
- * $Id$
- *
- * Copyright (C) 2010 Antoine Drouin <address@hidden>
- *
- * This file is part of paparazzi.
- *
- * paparazzi is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * paparazzi is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with paparazzi; see the file COPYING. If not, write to
- * the Free Software Foundation, 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-/*
- * STM32 PWM servos handling
- */
-
-#ifndef BOOZ_ACTUATORS_PWM_HW_H
-#define BOOZ_ACTUATORS_PWM_HW_H
-
-extern void booz_actuators_pwm_hw_init(void);
-extern void booz_actuators_pwm_commit(void);
-
-#endif /* BOOZ_ACTUATORS_PWM_HW_H */
Modified: paparazzi3/trunk/sw/airborne/lisa/lisa_stm_passthrough_main.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/lisa_stm_passthrough_main.c
2010-08-15 17:20:34 UTC (rev 5379)
+++ paparazzi3/trunk/sw/airborne/lisa/lisa_stm_passthrough_main.c
2010-08-15 17:37:33 UTC (rev 5380)
@@ -26,9 +26,9 @@
#include "downlink.h"
#include "booz/booz2_commands.h"
#include "booz/booz_actuators.h"
+#include "booz/actuators/booz_actuators_pwm.h"
#include "booz/booz_imu.h"
#include "booz/booz_radio_control.h"
-#include "booz/actuators/booz_actuators_pwm.h"
#include "lisa/lisa_overo_link.h"
static inline void main_init(void);
@@ -65,7 +65,7 @@
sys_time_init();
booz_imu_init();
radio_control_init();
- booz_actuators_pwm_hw_init();
+ booz_actuators_init();
overo_link_init();
new_radio_msg = FALSE;
Modified: paparazzi3/trunk/sw/airborne/lisa/test_servos.c
===================================================================
--- paparazzi3/trunk/sw/airborne/lisa/test_servos.c 2010-08-15 17:20:34 UTC
(rev 5379)
+++ paparazzi3/trunk/sw/airborne/lisa/test_servos.c 2010-08-15 17:37:33 UTC
(rev 5380)
@@ -43,7 +43,7 @@
static inline void main_init( void ) {
hw_init();
sys_time_init();
- booz_actuators_pwm_hw_init();
+ booz_actuators_init();
}
static inline void main_periodic( void ) {
@@ -56,20 +56,6 @@
booz_actuators_pwm_values[3] = bar;
booz_actuators_pwm_values[4] = bar;
booz_actuators_pwm_values[5] = bar;
-#if 0
- static int32_t foo = 10;
- static int32_t bar = 0;
- bar += foo;
- if (bar > 9600) { foo = -foo; bar = 9600;}
- if (bar < -9600) { foo = -foo; bar = -9600;}
- booz_actuators_pwm_values[0] = 3375 + bar * 1125 / 9600;
- booz_actuators_pwm_values[1] = 3375 + bar * 1125 / 9600;
- booz_actuators_pwm_values[2] = 3375 + bar * 1125 / 9600;
- booz_actuators_pwm_values[3] = 3375 + bar * 1125 / 9600;
- booz_actuators_pwm_values[4] = 3375 + bar * 1125 / 9600;
- booz_actuators_pwm_values[5] = 3375 + bar * 1125 / 9600;
-#endif
-
booz_actuators_pwm_commit();
LED_PERIODIC();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [paparazzi-commits] [5380] renamed sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_hw. [ch] to sw/airborne/booz/arch/stm32/actuators/booz_actuators_pwm_arch.[ch],
antoine drouin <=