Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
servos_4015_hw.h File Reference
#include <inttypes.h>
#include "std.h"
#include "LPC21xx.h"
#include "mcu_periph/sys_time.h"
#include <BOARD_CONFIG>
+ Include dependency graph for servos_4015_hw.h:

Go to the source code of this file.


#define PWM_TICS_OF_USEC(us)   (uint32_t)((us) *1e-6 * PCLK / PWM_PRESCALER + 0.5)
#define ChopServo(x, a, b)   Chop(x, a, b)
#define _4015_NB_CHANNELS   8
#define Actuator4015Set(_i, _v)   { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }
#define Actuators4015Commit()   {}
#define Actuators4015Init()   actuators_4015_init()


void actuators_4015_init (void)
void PWM_ISR (void)


uint16_t servos_values [_4015_NB_CHANNELS]

Macro Definition Documentation

#define _4015_NB_CHANNELS   8

Definition at line 36 of file servos_4015_hw.h.

Referenced by actuators_4015_init(), and PWM_ISR().

#define Actuator4015Set (   _i,
)    { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }

Definition at line 38 of file servos_4015_hw.h.

#define Actuators4015Commit ( )    {}

Definition at line 41 of file servos_4015_hw.h.

#define Actuators4015Init ( )    actuators_4015_init()

Definition at line 42 of file servos_4015_hw.h.

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

Definition at line 34 of file servos_4015_hw.h.

#define PWM_TICS_OF_USEC (   us)    (uint32_t)((us) *1e-6 * PCLK / PWM_PRESCALER + 0.5)

Definition at line 31 of file servos_4015_hw.h.


Definition at line 33 of file servos_4015_hw.h.

Function Documentation

void actuators_4015_init ( void  )

Definition at line 46 of file servos_4015_hw.c.

Variable Documentation

uint16_t servos_values[_4015_NB_CHANNELS]

Definition at line 29 of file servos_4015_hw.c.