Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
actuators_pwm_arch.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2013 AggieAir, A Remote Sensing Unmanned Aerial System for Scientific Applications
3
* Utah State University, http://aggieair.usu.edu/
4
*
5
* Michal Podhradsky (michal.podhradsky@aggiemail.usu.edu)
6
* Calvin Coopmans (c.r.coopmans@ieee.org)
7
*
8
*
9
* This file is part of paparazzi.
10
*
11
* paparazzi is free software; you can redistribute it and/or modify
12
* it under the terms of the GNU General Public License as published by
13
* the Free Software Foundation; either version 2, or (at your option)
14
* any later version.
15
*
16
* paparazzi is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU General Public License for more details.
20
*
21
* You should have received a copy of the GNU General Public License
22
* along with paparazzi; see the file COPYING. If not, write to
23
* the Free Software Foundation, 59 Temple Place - Suite 330,
24
* Boston, MA 02111-1307, USA.
25
*/
33
#ifndef ACTUATORS_PWM_ARCH_H
34
#define ACTUATORS_PWM_ARCH_H
35
36
#include "
std.h
"
37
#include "hal.h"
38
39
#include BOARD_CONFIG
40
41
#ifndef ACTUATORS_PWM_NB
42
#define ACTUATORS_PWM_NB 8
43
#endif
44
45
/* Default timer base frequency is 1MHz */
46
#ifndef PWM_FREQUENCY
47
#define PWM_FREQUENCY 1000000
48
#endif
49
51
#ifndef SERVO_HZ
52
#define SERVO_HZ 40
53
#endif
54
55
// Update rate can be adapted for each timer
56
#ifndef TIM1_SERVO_HZ
57
#define TIM1_SERVO_HZ SERVO_HZ
58
#endif
59
#ifndef TIM2_SERVO_HZ
60
#define TIM2_SERVO_HZ SERVO_HZ
61
#endif
62
#ifndef TIM3_SERVO_HZ
63
#define TIM3_SERVO_HZ SERVO_HZ
64
#endif
65
#ifndef TIM4_SERVO_HZ
66
#define TIM4_SERVO_HZ SERVO_HZ
67
#endif
68
#ifndef TIM5_SERVO_HZ
69
#define TIM5_SERVO_HZ SERVO_HZ
70
#endif
71
#ifndef TIM8_SERVO_HZ
72
#define TIM8_SERVO_HZ SERVO_HZ
73
#endif
74
#ifndef TIM9_SERVO_HZ
75
#define TIM9_SERVO_HZ SERVO_HZ
76
#endif
77
#ifndef TIM12_SERVO_HZ
78
#define TIM12_SERVO_HZ SERVO_HZ
79
#endif
80
81
extern
int32_t
actuators_pwm_values
[
ACTUATORS_PWM_NB
];
82
83
extern
void
actuators_pwm_commit
(
void
);
84
85
#define ActuatorPwmSet(_i, _v) { actuators_pwm_values[_i] = _v; }
86
#define ActuatorsPwmCommit actuators_pwm_commit
87
88
#endif
/* ACTUATORS_PWM_ARCH_H */
actuators_pwm_values
int32_t actuators_pwm_values[ACTUATORS_PWM_NB]
Definition:
actuators_pwm_arch.c:50
ACTUATORS_PWM_NB
#define ACTUATORS_PWM_NB
Definition:
actuators_pwm_arch.h:42
std.h
int32_t
signed long int32_t
Definition:
types.h:19
actuators_pwm_commit
void actuators_pwm_commit(void)
Set pulse widths from actuator values, assumed to be in us.
Definition:
actuators_pwm_arch.c:155
sw
airborne
arch
chibios
subsystems
actuators
actuators_pwm_arch.h
Generated on Sat Feb 9 2019 07:05:34 for Paparazzi UAS by
1.8.8