Paparazzi UAS  v5.14.0_stable-0-g3f680d1
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
actuators_pwm_arch.h File Reference
#include "LPC21xx.h"
#include "mcu_periph/sys_time.h"
+ Include dependency graph for actuators_pwm_arch.h:

Go to the source code of this file.

Macros

#define SERVOS_TICS_OF_USEC(s)   cpu_ticks_of_usec(s)
 
#define SERVO_REG_0   PWMMR5
 
#define SERVO_REG_1   PWMMR3
 
#define SERVO_REG_2   PWMMR1
 
#define SERVO_REG_3   PWMMR6
 
#define SERVO_REG_4   PWMMR4
 
#define SERVO_REG_5   PWMMR2
 
#define COMMAND_(i)   SERVO_REG_ ## i
 
#define ActuatorPwmSet(_i, _v)   { COMMAND_(_i) = SERVOS_TICS_OF_USEC(_v); }
 Actuator set macro. More...
 
#define PWM_PINSEL_MASK_VAL   3
 
#define PWM_SERVO_1_PINSEL   PINSEL0
 
#define PWM_SERVO_1_PINSEL_VAL   2
 
#define PWM_SERVO_1_PINSEL_BIT   0
 
#define PWM_SERVO_1_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_1_PINSEL_BIT)
 
#define PWM_SERVO_1_ENA   PWMPCR_ENA1
 
#define PWM_SERVO_1_LATCH   PWMLER_LATCH1
 
#define PWM_SERVO_2_PINSEL   PINSEL0
 
#define PWM_SERVO_2_PINSEL_VAL   2
 
#define PWM_SERVO_2_PINSEL_BIT   14
 
#define PWM_SERVO_2_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_2_PINSEL_BIT)
 
#define PWM_SERVO_2_ENA   PWMPCR_ENA2
 
#define PWM_SERVO_2_LATCH   PWMLER_LATCH2
 
#define PWM_SERVO_3_PINSEL   PINSEL0
 
#define PWM_SERVO_3_PINSEL_VAL   2
 
#define PWM_SERVO_3_PINSEL_BIT   2
 
#define PWM_SERVO_3_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_3_PINSEL_BIT)
 
#define PWM_SERVO_3_ENA   PWMPCR_ENA3
 
#define PWM_SERVO_3_LATCH   PWMLER_LATCH3
 
#define PWM_SERVO_4_PINSEL   PINSEL0
 
#define PWM_SERVO_4_PINSEL_VAL   2
 
#define PWM_SERVO_4_PINSEL_BIT   16
 
#define PWM_SERVO_4_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_4_PINSEL_BIT)
 
#define PWM_SERVO_4_ENA   PWMPCR_ENA4
 
#define PWM_SERVO_4_LATCH   PWMLER_LATCH4
 
#define PWM_SERVO_5_PINSEL   PINSEL1
 
#define PWM_SERVO_5_PINSEL_VAL   1
 
#define PWM_SERVO_5_PINSEL_BIT   10
 
#define PWM_SERVO_5_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_5_PINSEL_BIT)
 
#define PWM_SERVO_5_ENA   PWMPCR_ENA5
 
#define PWM_SERVO_5_LATCH   PWMLER_LATCH5
 
#define PWM_SERVO_6_PINSEL   PINSEL0
 
#define PWM_SERVO_6_PINSEL_VAL   2
 
#define PWM_SERVO_6_PINSEL_BIT   18
 
#define PWM_SERVO_6_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_6_PINSEL_BIT)
 
#define PWM_SERVO_6_ENA   PWMPCR_ENA6
 
#define PWM_SERVO_6_LATCH   PWMLER_LATCH6
 
#define ActuatorsPwmCommit()
 Actuator commit macro. More...
 

Variables

const uint8_t pwm_latch_value
 

Macro Definition Documentation

#define ActuatorPwmSet (   _i,
  _v 
)    { COMMAND_(_i) = SERVOS_TICS_OF_USEC(_v); }

Actuator set macro.

Definition at line 65 of file actuators_pwm_arch.h.

#define ActuatorsPwmCommit ( )
Value:
{ \
}
const uint8_t pwm_latch_value
#define PWMLER
Definition: LPC21xx.h:108

Actuator commit macro.

Definition at line 114 of file actuators_pwm_arch.h.

#define COMMAND_ (   i)    SERVO_REG_ ## i

Definition at line 63 of file actuators_pwm_arch.h.

#define PWM_PINSEL_MASK_VAL   3

Definition at line 67 of file actuators_pwm_arch.h.

#define PWM_SERVO_1_ENA   PWMPCR_ENA1

Definition at line 73 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_1_LATCH   PWMLER_LATCH1

Definition at line 74 of file actuators_pwm_arch.h.

#define PWM_SERVO_1_PINSEL   PINSEL0

Definition at line 69 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_1_PINSEL_BIT   0

Definition at line 71 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_1_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_1_PINSEL_BIT)

Definition at line 72 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_1_PINSEL_VAL   2

Definition at line 70 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_2_ENA   PWMPCR_ENA2

Definition at line 80 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_2_LATCH   PWMLER_LATCH2

Definition at line 81 of file actuators_pwm_arch.h.

#define PWM_SERVO_2_PINSEL   PINSEL0

Definition at line 76 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_2_PINSEL_BIT   14

Definition at line 78 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_2_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_2_PINSEL_BIT)

Definition at line 79 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_2_PINSEL_VAL   2

Definition at line 77 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_3_ENA   PWMPCR_ENA3

Definition at line 87 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_3_LATCH   PWMLER_LATCH3

Definition at line 88 of file actuators_pwm_arch.h.

#define PWM_SERVO_3_PINSEL   PINSEL0

Definition at line 83 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_3_PINSEL_BIT   2

Definition at line 85 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_3_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_3_PINSEL_BIT)

Definition at line 86 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_3_PINSEL_VAL   2

Definition at line 84 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_4_ENA   PWMPCR_ENA4

Definition at line 94 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_4_LATCH   PWMLER_LATCH4

Definition at line 95 of file actuators_pwm_arch.h.

#define PWM_SERVO_4_PINSEL   PINSEL0

Definition at line 90 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_4_PINSEL_BIT   16

Definition at line 92 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_4_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_4_PINSEL_BIT)

Definition at line 93 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_4_PINSEL_VAL   2

Definition at line 91 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_5_ENA   PWMPCR_ENA5

Definition at line 101 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_5_LATCH   PWMLER_LATCH5

Definition at line 102 of file actuators_pwm_arch.h.

#define PWM_SERVO_5_PINSEL   PINSEL1

Definition at line 97 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_5_PINSEL_BIT   10

Definition at line 99 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_5_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_5_PINSEL_BIT)

Definition at line 100 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_5_PINSEL_VAL   1

Definition at line 98 of file actuators_pwm_arch.h.

Referenced by actuators_pwm_arch_init().

#define PWM_SERVO_6_ENA   PWMPCR_ENA6

Definition at line 108 of file actuators_pwm_arch.h.

#define PWM_SERVO_6_LATCH   PWMLER_LATCH6

Definition at line 109 of file actuators_pwm_arch.h.

#define PWM_SERVO_6_PINSEL   PINSEL0

Definition at line 104 of file actuators_pwm_arch.h.

#define PWM_SERVO_6_PINSEL_BIT   18

Definition at line 106 of file actuators_pwm_arch.h.

#define PWM_SERVO_6_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_6_PINSEL_BIT)

Definition at line 107 of file actuators_pwm_arch.h.

#define PWM_SERVO_6_PINSEL_VAL   2

Definition at line 105 of file actuators_pwm_arch.h.

#define SERVO_REG_0   PWMMR5

Definition at line 45 of file actuators_pwm_arch.h.

#define SERVO_REG_1   PWMMR3

Definition at line 48 of file actuators_pwm_arch.h.

#define SERVO_REG_2   PWMMR1

Definition at line 51 of file actuators_pwm_arch.h.

#define SERVO_REG_3   PWMMR6

Definition at line 54 of file actuators_pwm_arch.h.

#define SERVO_REG_4   PWMMR4

Definition at line 57 of file actuators_pwm_arch.h.

#define SERVO_REG_5   PWMMR2

Definition at line 60 of file actuators_pwm_arch.h.

#define SERVOS_TICS_OF_USEC (   s)    cpu_ticks_of_usec(s)

Variable Documentation

const uint8_t pwm_latch_value

Definition at line 33 of file actuators_pwm_arch.c.