Paparazzi UAS
v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
|
Actuator driver for the swing. More...
#include <sys/ioctl.h>
#include <fcntl.h>
#include "subsystems/actuators.h"
#include "subsystems/actuators/motor_mixing.h"
#include "actuators.h"
#include "autopilot.h"
Go to the source code of this file.
Data Structures | |
struct | pwm_delos_quadruplet |
Macros | |
#define | PWM_MAGIC 'p' |
#define | PWM_DELOS_SET_RATIOS _IOR(PWM_MAGIC, 9, pwm_delos_quadruplet*) |
#define | PWM_DELOS_SET_SPEEDS _IOR(PWM_MAGIC, 10, pwm_delos_quadruplet*) |
#define | PWM_DELOS_SET_CTRL _IOR(PWM_MAGIC, 11, unsigned int) |
#define | PWM_DELOS_REQUEST _IO(PWM_MAGIC, 12) |
#define | PWM_NB_BITS (9) |
#define | PWM_TOTAL_RANGE (1<<PWM_NB_BITS) |
#define | PWM_REG_RATIO_PRECISION_MASK (PWM_NB_BITS<<16) |
#define | PWM_REG_SATURATION (PWM_REG_RATIO_PRECISION_MASK|PWM_TOTAL_RANGE) |
Enumerations | |
enum | { SiP6_PWM0_START = (1<<0), SiP6_PWM1_START = (1<<1), SiP6_PWM2_START = (1<<2), SiP6_PWM3_START = (1<<3) } |
Functions | |
void | actuators_swing_init (void) |
void | actuators_swing_commit (void) |
Variables | |
struct ActuatorsSwing | actuators_swing |
static int | actuators_fd |
Actuator driver for the swing.
Definition in file actuators.c.
struct pwm_delos_quadruplet |
Definition at line 34 of file actuators.c.
Data Fields | ||
---|---|---|
unsigned int | val[4] |
#define PWM_DELOS_REQUEST _IO(PWM_MAGIC, 12) |
Definition at line 38 of file actuators.c.
#define PWM_DELOS_SET_CTRL _IOR(PWM_MAGIC, 11, unsigned int) |
Definition at line 37 of file actuators.c.
Referenced by actuators_swing_init().
#define PWM_DELOS_SET_RATIOS _IOR(PWM_MAGIC, 9, pwm_delos_quadruplet*) |
Definition at line 35 of file actuators.c.
Referenced by actuators_swing_commit().
#define PWM_DELOS_SET_SPEEDS _IOR(PWM_MAGIC, 10, pwm_delos_quadruplet*) |
Definition at line 36 of file actuators.c.
Referenced by actuators_swing_init().
#define PWM_MAGIC 'p' |
Definition at line 33 of file actuators.c.
#define PWM_NB_BITS (9) |
Definition at line 40 of file actuators.c.
#define PWM_REG_RATIO_PRECISION_MASK (PWM_NB_BITS<<16) |
Definition at line 47 of file actuators.c.
Referenced by actuators_swing_commit().
#define PWM_REG_SATURATION (PWM_REG_RATIO_PRECISION_MASK|PWM_TOTAL_RANGE) |
Definition at line 48 of file actuators.c.
Referenced by actuators_swing_commit().
#define PWM_TOTAL_RANGE (1<<PWM_NB_BITS) |
Definition at line 44 of file actuators.c.
Referenced by actuators_swing_commit().
anonymous enum |
Enumerator | |
---|---|
SiP6_PWM0_START | |
SiP6_PWM1_START | |
SiP6_PWM2_START | |
SiP6_PWM3_START |
Definition at line 59 of file actuators.c.
void actuators_swing_commit | ( | void | ) |
Definition at line 86 of file actuators.c.
References actuators_swing, PWM_DELOS_SET_RATIOS, PWM_REG_RATIO_PRECISION_MASK, PWM_REG_SATURATION, PWM_TOTAL_RANGE, ActuatorsSwing::rpm_ref, and pwm_delos_quadruplet::val.
Referenced by actuators_swing_init().
void actuators_swing_init | ( | void | ) |
Definition at line 66 of file actuators.c.
References actuators_swing_commit(), PWM_DELOS_SET_CTRL, PWM_DELOS_SET_SPEEDS, SiP6_PWM0_START, SiP6_PWM1_START, SiP6_PWM2_START, and SiP6_PWM3_START.
|
static |
Definition at line 56 of file actuators.c.
struct ActuatorsSwing actuators_swing |
Definition at line 55 of file actuators.c.
Referenced by actuators_swing_commit().