Paparazzi UAS
v5.8.2_stable-0-g6260b7c
Paparazzi is a free software Unmanned Aircraft System.
|
#include <inttypes.h>
#include "std.h"
#include "LPC21xx.h"
#include "mcu_periph/sys_time.h"
#include <BOARD_CONFIG>
Go to the source code of this file.
Macros | |
#define | PWM_TICS_OF_USEC(us) (uint32_t)((us) *1e-6 * PCLK / PWM_PRESCALER + 0.5) |
#define | SERVOS_TICS_OF_USEC(s) PWM_TICS_OF_USEC(s) |
#define | ChopServo(x, a, b) Chop(x, a, b) |
#define | _4015_NB_CHANNELS 8 |
#define | Actuator4015Set(_i, _v) { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); } |
#define | Actuators4015Commit() {} |
#define | Actuators4015Init() actuators_4015_init() |
Functions | |
void | actuators_4015_init (void) |
void | PWM_ISR (void) |
Variables | |
uint16_t | servos_values [_4015_NB_CHANNELS] |
#define _4015_NB_CHANNELS 8 |
Definition at line 36 of file servos_4015_hw.h.
Referenced by actuators_4015_init(), and PWM_ISR().
#define Actuator4015Set | ( | _i, | |
_v | |||
) | { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); } |
Definition at line 38 of file servos_4015_hw.h.
#define Actuators4015Commit | ( | ) | {} |
Definition at line 41 of file servos_4015_hw.h.
#define Actuators4015Init | ( | ) | actuators_4015_init() |
Definition at line 42 of file servos_4015_hw.h.
#define ChopServo | ( | x, | |
a, | |||
b | |||
) | Chop(x, a, b) |
Definition at line 34 of file servos_4015_hw.h.
#define PWM_TICS_OF_USEC | ( | us | ) | (uint32_t)((us) *1e-6 * PCLK / PWM_PRESCALER + 0.5) |
Definition at line 31 of file servos_4015_hw.h.
#define SERVOS_TICS_OF_USEC | ( | s | ) | PWM_TICS_OF_USEC(s) |
Definition at line 33 of file servos_4015_hw.h.
void actuators_4015_init | ( | void | ) |
Definition at line 46 of file servos_4015_hw.c.
void PWM_ISR | ( | void | ) |
Definition at line 104 of file servos_4015_hw.c.
References _4015_NB_CHANNELS, IO1CLR, IO1SET, ISR_ENTRY, ISR_EXIT, PWMIR, PWMIR_MRI_SERV0, PWMIR_MRI_SERV1, PWMLER, PWMLER_LATCH0, PWMLER_LATCH_SERV0, PWMLER_LATCH_SERV1, PWMMCR, PWMMCR_MR0R, PWMMCR_MRI_SERV0, PWMMCR_MRI_SERV1, PWMMR0, PWMMR_SERV0, PWMMR_SERV1, SERVO_REFRESH_TICS, servos_delay, servos_idx, servos_values, and VICVectAddr.
Referenced by actuators_4015_init().
uint16_t servos_values[_4015_NB_CHANNELS] |
Definition at line 29 of file servos_4015_hw.c.