Paparazzi UAS  v4.0.4_stable-3-gf39211a
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
servos_direct_hw.h File Reference
#include "LPC21xx.h"
#include "mcu_periph/sys_time.h"
+ Include dependency graph for servos_direct_hw.h:
+ This graph shows which files directly or indirectly include this file:

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 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 Actuator(i)   COMMAND_(i)
 
#define PWM_PINSEL_MASK_VAL   3
 
#define PWM_SERVO_0_PINSEL   PINSEL1
 
#define PWM_SERVO_0_PINSEL_VAL   1
 
#define PWM_SERVO_0_PINSEL_BIT   10
 
#define PWM_SERVO_0_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_0_PINSEL_BIT)
 
#define PWM_SERVO_0_ENA   PWMPCR_ENA5
 
#define PWM_SERVO_0_LATCH   PWMLER_LATCH5
 
#define PWM_SERVO_1_PINSEL   PINSEL0
 
#define PWM_SERVO_1_PINSEL_VAL   2
 
#define PWM_SERVO_1_PINSEL_BIT   2
 
#define PWM_SERVO_1_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_1_PINSEL_BIT)
 
#define PWM_SERVO_1_ENA   PWMPCR_ENA3
 
#define PWM_SERVO_1_LATCH   PWMLER_LATCH3
 
#define PWM_SERVO_2_PINSEL   PINSEL0
 
#define PWM_SERVO_2_PINSEL_VAL   2
 
#define PWM_SERVO_2_PINSEL_BIT   0
 
#define PWM_SERVO_2_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_2_PINSEL_BIT)
 
#define PWM_SERVO_2_ENA   PWMPCR_ENA1
 
#define PWM_SERVO_2_LATCH   PWMLER_LATCH1
 
#define PWM_SERVO_3_PINSEL   PINSEL0
 
#define PWM_SERVO_3_PINSEL_VAL   2
 
#define PWM_SERVO_3_PINSEL_BIT   18
 
#define PWM_SERVO_3_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_3_PINSEL_BIT)
 
#define PWM_SERVO_3_ENA   PWMPCR_ENA6
 
#define PWM_SERVO_3_LATCH   PWMLER_LATCH6
 
#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   PINSEL0
 
#define PWM_SERVO_5_PINSEL_VAL   2
 
#define PWM_SERVO_5_PINSEL_BIT   14
 
#define PWM_SERVO_5_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_5_PINSEL_BIT)
 
#define PWM_SERVO_5_ENA   PWMPCR_ENA2
 
#define PWM_SERVO_5_LATCH   PWMLER_LATCH2
 
#define ActuatorsCommit()
 

Variables

const uint8_t pwm_latch_value
 

Macro Definition Documentation

#define Actuator (   i)    COMMAND_(i)

Definition at line 18 of file servos_direct_hw.h.

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

Definition at line 79 of file servos_direct_hw.h.

#define ChopServo (   x,
  a,
 
)    Chop(x, a, b)

Definition at line 8 of file servos_direct_hw.h.

#define COMMAND_ (   i)    SERVO_REG_ ## i

Definition at line 17 of file servos_direct_hw.h.

#define PWM_PINSEL_MASK_VAL   3

Definition at line 33 of file servos_direct_hw.h.

#define PWM_SERVO_0_ENA   PWMPCR_ENA5

Definition at line 39 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_0_LATCH   PWMLER_LATCH5

Definition at line 40 of file servos_direct_hw.h.

#define PWM_SERVO_0_PINSEL   PINSEL1

Definition at line 35 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_0_PINSEL_BIT   10

Definition at line 37 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_0_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_0_PINSEL_BIT)

Definition at line 38 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_0_PINSEL_VAL   1

Definition at line 36 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_1_ENA   PWMPCR_ENA3

Definition at line 46 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_1_LATCH   PWMLER_LATCH3

Definition at line 47 of file servos_direct_hw.h.

#define PWM_SERVO_1_PINSEL   PINSEL0

Definition at line 42 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_1_PINSEL_BIT   2

Definition at line 44 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_1_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_1_PINSEL_BIT)

Definition at line 45 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_1_PINSEL_VAL   2

Definition at line 43 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_2_ENA   PWMPCR_ENA1

Definition at line 53 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_2_LATCH   PWMLER_LATCH1

Definition at line 54 of file servos_direct_hw.h.

#define PWM_SERVO_2_PINSEL   PINSEL0

Definition at line 49 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_2_PINSEL_BIT   0

Definition at line 51 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_2_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_2_PINSEL_BIT)

Definition at line 52 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_2_PINSEL_VAL   2

Definition at line 50 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_3_ENA   PWMPCR_ENA6

Definition at line 60 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_3_LATCH   PWMLER_LATCH6

Definition at line 61 of file servos_direct_hw.h.

#define PWM_SERVO_3_PINSEL   PINSEL0

Definition at line 56 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_3_PINSEL_BIT   18

Definition at line 58 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_3_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_3_PINSEL_BIT)

Definition at line 59 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_3_PINSEL_VAL   2

Definition at line 57 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_4_ENA   PWMPCR_ENA4

Definition at line 67 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_4_LATCH   PWMLER_LATCH4

Definition at line 68 of file servos_direct_hw.h.

#define PWM_SERVO_4_PINSEL   PINSEL0

Definition at line 63 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_4_PINSEL_BIT   16

Definition at line 65 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_4_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_4_PINSEL_BIT)

Definition at line 66 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_4_PINSEL_VAL   2

Definition at line 64 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_5_ENA   PWMPCR_ENA2

Definition at line 74 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_5_LATCH   PWMLER_LATCH2

Definition at line 75 of file servos_direct_hw.h.

#define PWM_SERVO_5_PINSEL   PINSEL0

Definition at line 70 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_5_PINSEL_BIT   14

Definition at line 72 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_5_PINSEL_MASK   ~(PWM_PINSEL_MASK_VAL << PWM_SERVO_5_PINSEL_BIT)

Definition at line 73 of file servos_direct_hw.h.

Referenced by actuators_init().

#define PWM_SERVO_5_PINSEL_VAL   2

Definition at line 71 of file servos_direct_hw.h.

Referenced by actuators_init().

#define SERVO_REG_0   PWMMR5

Definition at line 10 of file servos_direct_hw.h.

#define SERVO_REG_1   PWMMR3

Definition at line 11 of file servos_direct_hw.h.

#define SERVO_REG_2   PWMMR1

Definition at line 12 of file servos_direct_hw.h.

#define SERVO_REG_3   PWMMR6

Definition at line 13 of file servos_direct_hw.h.

#define SERVO_REG_4   PWMMR4

Definition at line 14 of file servos_direct_hw.h.

#define SERVO_REG_5   PWMMR2

Definition at line 15 of file servos_direct_hw.h.

#define SERVOS_TICS_OF_USEC (   s)    CPU_TICKS_OF_USEC(s)

Definition at line 7 of file servos_direct_hw.h.

Variable Documentation

const uint8_t pwm_latch_value

Definition at line 10 of file servos_direct_hw.c.