Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
actuators_pwm_arch.c
Go to the documentation of this file.
1/*
2 * Copyright (C) 2010 The Paparazzi Team
3 *
4 * This file is part of Paparazzi.
5 *
6 * Paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * Paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with Paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 */
21
26//VALID TIMERS ARE TIM1,2,3,4,5,8,9,12
27
29#include "modules/actuators/actuators_pwm_arch.h"
31
32#include <libopencm3/stm32/gpio.h>
33#include <libopencm3/stm32/rcc.h>
34#include <libopencm3/stm32/timer.h>
35
36#include "mcu_periph/gpio_arch.h"
37
38
42{
43 /*-----------------------------------
44 * Configure timer peripheral clocks
45 *-----------------------------------*/
46#if PWM_USE_TIM1
48#endif
49#if PWM_USE_TIM2
51#endif
52#if PWM_USE_TIM3
54#endif
55#if PWM_USE_TIM4
57#endif
58#if PWM_USE_TIM5
60#endif
61#if PWM_USE_TIM8
63#endif
64#if PWM_USE_TIM9
66#endif
67#if PWM_USE_TIM12
69#endif
70
71 /*----------------
72 * Configure GPIO
73 *----------------*/
74#ifdef PWM_SERVO_0
76#endif
77#ifdef PWM_SERVO_1
79#endif
80#ifdef PWM_SERVO_2
82#endif
83#ifdef PWM_SERVO_3
85#endif
86#ifdef PWM_SERVO_4
88#endif
89#ifdef PWM_SERVO_5
91#endif
92#ifdef PWM_SERVO_6
94#endif
95#ifdef PWM_SERVO_7
97#endif
98#ifdef PWM_SERVO_8
100#endif
101#ifdef PWM_SERVO_9
103#endif
104#ifdef PWM_SERVO_10
106#endif
107#ifdef PWM_SERVO_11
109#endif
110
111#if PWM_USE_TIM1
114#endif
115
116#if PWM_USE_TIM2
119#endif
120
121#if PWM_USE_TIM3
124#endif
125
126#if PWM_USE_TIM4
129#endif
130
131#if PWM_USE_TIM5
134#endif
135
136#if PWM_USE_TIM8
139#endif
140
141#if PWM_USE_TIM9
144#endif
145
146#if PWM_USE_TIM12
149#endif
150
151}
152
156{
157#ifdef PWM_SERVO_0
159#endif
160#ifdef PWM_SERVO_1
162#endif
163#ifdef PWM_SERVO_2
165#endif
166#ifdef PWM_SERVO_3
168#endif
169#ifdef PWM_SERVO_4
171#endif
172#ifdef PWM_SERVO_5
174#endif
175#ifdef PWM_SERVO_6
177#endif
178#ifdef PWM_SERVO_7
180#endif
181#ifdef PWM_SERVO_8
183#endif
184#ifdef PWM_SERVO_9
186#endif
187#ifdef PWM_SERVO_10
189#endif
190#ifdef PWM_SERVO_11
192#endif
193
194}
195
void set_servo_timer(uint32_t timer, uint32_t freq, uint8_t channels_mask)
Set Timer configuration.
STM32 PWM and dualPWM servos shared functions.
#define PWM_TIM3_CHAN_MASK
Definition apogee_1.0.h:337
#define PWM_TIM2_CHAN_MASK
Definition apogee_1.0.h:336
uint16_t actuators_pwm_values[ACTUATORS_ARDRONE_NB]
Definition actuators.c:69
#define PWM_TIM1_CHAN_MASK
Definition cc3d.h:238
#define PWM_TIM4_CHAN_MASK
Definition cc3d.h:236
void gpio_setup_pin_af(ioportid_t port, uint16_t pin, uint8_t af, bool is_output)
Setup a gpio for input or output with alternate function.
Definition gpio_arch.c:65
#define TIM3_SERVO_HZ
#define TIM5_SERVO_HZ
#define TIM4_SERVO_HZ
#define TIM8_SERVO_HZ
#define TIM9_SERVO_HZ
#define TIM12_SERVO_HZ
#define TIM1_SERVO_HZ
#define TIM2_SERVO_HZ
void actuators_pwm_arch_commit(void)
Arch dependent commit function.
void actuators_pwm_arch_init(void)
Arch dependent init function.
#define PWM_TIM5_CHAN_MASK
uint16_t foo
Definition main_demo5.c:58
#define PWM_TIM12_CHAN_MASK
#define PWM_TIM8_CHAN_MASK
#define PWM_SERVO_6
#define PWM_SERVO_3
#define PWM_SERVO_4
#define PWM_SERVO_5
#define PWM_TIM9_CHAN_MASK
#define TRUE
Definition std.h:4