Paparazzi UAS
v5.10_stable-5-g83a0da5-dirty
Paparazzi is a free software Unmanned Aircraft System.
|
Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM for a R/C receiver which has a microcontroller to drive the servos (not a 4015 or 4017 decade counter chip). More...
Go to the source code of this file.
Macros | |
#define | SERVOS_TICS_OF_USEC(s) cpu_ticks_of_usec(s) |
#define | ChopServo(x, a, b) Chop(x, a, b) |
#define | _PPM_NB_CHANNELS 8 |
#define | ActuatorPpmSet(_i, _v) { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); } |
#define | ActuatorsPpmCommit() {} |
#define | ActuatorsPpmInit() actuators_ppm_init() |
#define | SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(22000) |
#define | PPM_WIDTH SERVOS_TICS_OF_USEC(550) |
#define | ACTUATORS_IT TIR_MR1I |
#define | ServosPPMMat_ISR() |
Functions | |
void | actuators_ppm_init (void) |
Variables | |
uint16_t | servos_values [_PPM_NB_CHANNELS] |
uint8_t | servos_PPM_idx |
uint32_t | servos_delay |
uint8_t | ppm_pulse |
Efficient driving of MAT0.1 (SERVO_CLOCK_PIN) using TIMER0 to produce PPM for a R/C receiver which has a microcontroller to drive the servos (not a 4015 or 4017 decade counter chip).
Definition in file servos_ppm_hw.h.
#define _PPM_NB_CHANNELS 8 |
Definition at line 43 of file servos_ppm_hw.h.
Referenced by actuators_ppm_init().
#define ActuatorPpmSet | ( | _i, | |
_v | |||
) | { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); } |
Definition at line 45 of file servos_ppm_hw.h.
#define ACTUATORS_IT TIR_MR1I |
Definition at line 59 of file servos_ppm_hw.h.
#define ActuatorsPpmCommit | ( | ) | {} |
Definition at line 48 of file servos_ppm_hw.h.
#define ActuatorsPpmInit | ( | ) | actuators_ppm_init() |
Definition at line 49 of file servos_ppm_hw.h.
#define ChopServo | ( | x, | |
a, | |||
b | |||
) | Chop(x, a, b) |
Definition at line 41 of file servos_ppm_hw.h.
#define PPM_WIDTH SERVOS_TICS_OF_USEC(550) |
Definition at line 57 of file servos_ppm_hw.h.
#define SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(22000) |
Definition at line 55 of file servos_ppm_hw.h.
#define SERVOS_TICS_OF_USEC | ( | s | ) | cpu_ticks_of_usec(s) |
Definition at line 40 of file servos_ppm_hw.h.
#define ServosPPMMat_ISR | ( | ) |
Definition at line 60 of file servos_ppm_hw.h.
Referenced by TIMER0_ISR().
void actuators_ppm_init | ( | void | ) |
Definition at line 41 of file servos_ppm_hw.c.
References _PPM_NB_CHANNELS, SERVO_CLOCK_PINSEL, SERVO_CLOCK_PINSEL_BIT, SERVO_CLOCK_PINSEL_VAL, SERVO_REFRESH_TICS, servos_delay, servos_PPM_idx, SERVOS_TICS_OF_USEC, servos_values, START_TIMEOUT, T0EMR, T0MCR, T0MR1, TEMR_EM1, TEMR_EMC1_2, and TMCR_MR1_I.
uint8_t ppm_pulse |
Definition at line 36 of file servos_ppm_hw.c.
uint32_t servos_delay |
Definition at line 33 of file servos_4015_MAT_hw.c.
Referenced by actuators_4015_init(), and actuators_ppm_init().
uint8_t servos_PPM_idx |
Definition at line 35 of file servos_ppm_hw.c.
Referenced by actuators_ppm_init().
uint16_t servos_values[_PPM_NB_CHANNELS] |
Definition at line 29 of file servos_4015_hw.c.
Referenced by actuators_4015_init(), actuators_4017_init(), actuators_ppm_init(), and PWM_ISR().