Paparazzi UAS  v5.15_devel-81-gd13dafb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces 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.

Macros

#define PWM_TICS_OF_USEC(us)   (uint32_t)((us) *1e-6 * PCLK / PWM_PRESCALER + 0.5)
 
#define SERVOS_TICS_OF_USEC(s)   PWM_TICS_OF_USEC(s)
 
#define ClipServo(x, a, b)   Clip(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()
 

Functions

void actuators_4015_init (void)
 
void PWM_ISR (void)
 

Variables

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,
  _v 
)    { 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 ClipServo (   x,
  a,
 
)    Clip(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.

#define SERVOS_TICS_OF_USEC (   s)    PWM_TICS_OF_USEC(s)

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.