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_ppm_hw.h File Reference
#include "std.h"
#include "LPC21xx.h"
#include "mcu_periph/sys_time.h"
+ Include dependency graph for servos_ppm_hw.h:

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 _PPM_NB_CHANNELS   8
 
#define Actuator(i)   servos_values[i]
 
#define ActuatorsCommit()   {}
 
#define SERVO_REFRESH_TICS   SERVOS_TICS_OF_USEC(22000)
 
#define PPM_WIDTH   SERVOS_TICS_OF_USEC(550)
 
#define ACTUATORS_IT   TIR_MR1I
 
#define ServosPPMMat_ISR()
 

Variables

uint16_t servos_values [_PPM_NB_CHANNELS]
 
uint8_t servos_PPM_idx
 
uint32_t servos_delay
 
uint8_t ppm_pulse
 

Macro Definition Documentation

#define _PPM_NB_CHANNELS   8

Definition at line 41 of file servos_ppm_hw.h.

Referenced by actuators_init().

#define Actuator (   i)    servos_values[i]

Definition at line 43 of file servos_ppm_hw.h.

#define ACTUATORS_IT   TIR_MR1I

Definition at line 55 of file servos_ppm_hw.h.

#define ActuatorsCommit (   void)    {}

Definition at line 45 of file servos_ppm_hw.h.

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

Definition at line 39 of file servos_ppm_hw.h.

#define PPM_WIDTH   SERVOS_TICS_OF_USEC(550)

Definition at line 53 of file servos_ppm_hw.h.

#define SERVO_REFRESH_TICS   SERVOS_TICS_OF_USEC(22000)

Definition at line 51 of file servos_ppm_hw.h.

#define SERVOS_TICS_OF_USEC (   s)    CPU_TICKS_OF_USEC(s)

Definition at line 38 of file servos_ppm_hw.h.

#define ServosPPMMat_ISR ( )
Value:
{ \
if (servos_PPM_idx == 0) { \
} \
if (ppm_pulse) { \
} else { \
} \
} else { /* servos_PPM_idx=_PPM_NB_CHANNELS */ \
if (ppm_pulse) { \
} else { \
} \
} \
if (!ppm_pulse) { \
/* lower clock pin */ \
} \
/* toggle ppm_pulse flag */ \
ppm_pulse ^= 1; \
}
uint8_t servos_PPM_idx
Definition: servos_ppm_hw.c:33
uint16_t servos_values[_PPM_NB_CHANNELS]
Definition: servos_4015_hw.c:8
#define _PPM_NB_CHANNELS
Definition: servos_ppm_hw.h:41
#define PPM_WIDTH
Definition: servos_ppm_hw.h:53
uint32_t servos_delay
#define SERVO_REFRESH_TICS
Definition: servos_ppm_hw.h:51
#define T0EMR
Definition: LPC21xx.h:65
#define T0MR1
Definition: LPC21xx.h:57
uint8_t ppm_pulse
Definition: servos_ppm_hw.c:34
#define TEMR_EM1
Definition: lpcTMR.h:150

Definition at line 56 of file servos_ppm_hw.h.

Referenced by TIMER0_ISR().

Variable Documentation

uint8_t ppm_pulse

Definition at line 34 of file servos_ppm_hw.c.

uint32_t servos_delay

Definition at line 35 of file servos_4015_MAT_hw.c.

uint8_t servos_PPM_idx

Definition at line 33 of file servos_ppm_hw.c.

Referenced by actuators_init().

uint16_t servos_values[_PPM_NB_CHANNELS]

Definition at line 8 of file servos_4015_hw.c.

Referenced by actuators_init(), and PWM_ISR().