Paparazzi UAS  v4.2.2_stable-4-gcc32f65
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
servos_direct_hw.c
Go to the documentation of this file.
1 #include "std.h"
2 #include "actuators.h"
3 #include "servos_direct_hw.h"
4 
5 /* 40 Hz */
6 #ifndef SERVOS_PERIOD
7 #define SERVOS_PERIOD SERVOS_TICS_OF_USEC(25000)
8 #endif
9 
11 #if defined PWM_SERVO_0
13 #endif
14 #if defined PWM_SERVO_1
16 #endif
17 #if defined PWM_SERVO_2
19 #endif
20 #if defined PWM_SERVO_3
22 #endif
23 #if defined PWM_SERVO_4
25 #endif
26 #if defined PWM_SERVO_5
28 #endif
29  ;
30 
31 void actuators_init ( void ) {
32 
33  /* configure pins for PWM */
34 #if defined PWM_SERVO_0
36 #endif
37 #if defined PWM_SERVO_1
39 #endif
40 #if defined PWM_SERVO_2
42 #endif
43 #if defined PWM_SERVO_3
45 #endif
46 #if defined PWM_SERVO_4
48 #endif
49 #if defined PWM_SERVO_5
51 #endif
52 
53  /* set servo refresh rate */
55 
56  /* FIXME: For now, this prescaler needs to match the TIMER0 prescaler, as the
57  higher level code treats them the same */
58  PWMPR = 1;
59 
60  /* enable all 6 PWM outputs in single edge mode*/
61  PWMPCR = 0
62 #if defined PWM_SERVO_0
64 #endif
65 #if defined PWM_SERVO_1
67 #endif
68 #if defined PWM_SERVO_2
70 #endif
71 #if defined PWM_SERVO_3
73 #endif
74 #if defined PWM_SERVO_4
76 #endif
77 #if defined PWM_SERVO_5
79 #endif
80  ;
81 
82  /* commit PWMMRx changes */
84 
85  /* enable PWM timer in PWM mode */
87 
88 
89 }
#define PWM_SERVO_4_PINSEL_BIT
#define PWM_SERVO_0_PINSEL
#define PWM_SERVO_2_PINSEL
#define PWM_SERVO_4_LATCH
#define PWM_SERVO_1_ENA
#define PWM_SERVO_0_PINSEL_MASK
#define PWMMR0
Definition: LPC21xx.h:100
#define PWM_SERVO_2_ENA
#define PWM_SERVO_2_PINSEL_VAL
#define PWM_SERVO_0_ENA
#define PWM_SERVO_3_PINSEL_VAL
#define PWM_SERVO_1_PINSEL
#define PWM_SERVO_3_PINSEL_MASK
#define PWMTCR
Definition: LPC21xx.h:95
#define PWMPCR
Definition: LPC21xx.h:107
#define PWM_SERVO_5_PINSEL_BIT
#define PWM_SERVO_5_LATCH
#define PWM_SERVO_5_PINSEL_MASK
#define PWMTCR_COUNTER_ENABLE
Definition: lpcTMR.h:83
#define PWM_SERVO_4_ENA
#define PWM_SERVO_0_PINSEL_VAL
#define PWM_SERVO_3_PINSEL
#define PWM_SERVO_1_LATCH
#define PWM_SERVO_0_PINSEL_BIT
#define PWM_SERVO_3_LATCH
#define PWMLER
Definition: LPC21xx.h:108
#define PWM_SERVO_5_ENA
void actuators_init(void)
#define PWM_SERVO_4_PINSEL
#define PWM_SERVO_5_PINSEL
#define PWM_SERVO_1_PINSEL_VAL
#define PWM_SERVO_5_PINSEL_VAL
#define PWM_SERVO_2_PINSEL_MASK
#define PWM_SERVO_4_PINSEL_MASK
#define SERVOS_PERIOD
#define PWM_SERVO_0_LATCH
#define PWMPR
Definition: LPC21xx.h:97
#define PWM_SERVO_3_PINSEL_BIT
#define PWMTCR_PWM_ENABLE
Definition: lpcTMR.h:85
unsigned char uint8_t
Definition: types.h:14
#define PWMLER_LATCH0
Definition: lpcTMR.h:124
#define PWM_SERVO_2_PINSEL_BIT
#define PWM_SERVO_1_PINSEL_BIT
const uint8_t pwm_latch_value
#define PWM_SERVO_4_PINSEL_VAL
#define PWM_SERVO_3_ENA
#define PWM_SERVO_1_PINSEL_MASK
#define PWM_SERVO_2_LATCH