Paparazzi UAS  v5.15_devel-47-g0391b4d
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators.c File Reference

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"
+ Include dependency graph for actuators.c:

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
 

Detailed Description

Actuator driver for the swing.

Definition in file actuators.c.


Data Structure Documentation

struct pwm_delos_quadruplet

Definition at line 34 of file actuators.c.

Data Fields
unsigned int val[4]

Macro Definition Documentation

#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().

Enumeration Type Documentation

anonymous enum
Enumerator
SiP6_PWM0_START 
SiP6_PWM1_START 
SiP6_PWM2_START 
SiP6_PWM3_START 

Definition at line 59 of file actuators.c.

Function Documentation

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().

+ Here is the caller graph for this function:

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.

+ Here is the call graph for this function:

Variable Documentation

int actuators_fd
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().