Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
servos_4017_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_4017_hw.h:

Go to the source code of this file.

Macros

#define SERVOS_TICS_OF_USEC(s)   cpu_ticks_of_usec(s)
 
#define ClipServo(x, a, b)   Clip(x, a, b)
 
#define _4017_NB_CHANNELS   10
 
#define Actuator4017Set(_i, _v)   { servos_values[_i] = SERVOS_TICS_OF_USEC(_v); }
 
#define Actuators4017Commit()   {}
 
#define Actuators4017Init()   actuators_4017_init()
 
#define ACTUATORS_IT   TIR_MR1I
 
#define SERVOS_4017_ISR()
 

Functions

void actuators_4017_init (void)
 

Variables

uint16_t servos_values [_4017_NB_CHANNELS]
 
uint8_t servos_4017_idx
 

Macro Definition Documentation

◆ _4017_NB_CHANNELS

#define _4017_NB_CHANNELS   10

Definition at line 40 of file servos_4017_hw.h.

◆ Actuator4017Set

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

Definition at line 44 of file servos_4017_hw.h.

◆ Actuators4017Commit

#define Actuators4017Commit ( )    {}

Definition at line 47 of file servos_4017_hw.h.

◆ Actuators4017Init

#define Actuators4017Init ( )    actuators_4017_init()

Definition at line 48 of file servos_4017_hw.h.

◆ ACTUATORS_IT

#define ACTUATORS_IT   TIR_MR1I

Definition at line 52 of file servos_4017_hw.h.

◆ ClipServo

#define ClipServo (   x,
  a,
  b 
)    Clip(x, a, b)

Definition at line 35 of file servos_4017_hw.h.

◆ SERVOS_4017_ISR

#define SERVOS_4017_ISR ( )
Value:
{ \
SetBit(IO1SET, SERVO_RESET_PIN); \
servos_4017_idx = 0; \
SetBit(IO1CLR, SERVO_RESET_PIN); \
} \
\
/* request clock high on next match */ \
/* lower clock pin */ \
T0EMR &= ~TEMR_EM1; \
servos_4017_idx++; \
}

Definition at line 55 of file servos_4017_hw.h.

◆ SERVOS_TICS_OF_USEC

#define SERVOS_TICS_OF_USEC (   s)    cpu_ticks_of_usec(s)

Definition at line 34 of file servos_4017_hw.h.

Function Documentation

◆ actuators_4017_init()

Variable Documentation

◆ servos_4017_idx

uint8_t servos_4017_idx

Definition at line 27 of file servos_4017_hw.c.

Referenced by actuators_4017_init().

◆ servos_values

uint16_t servos_values[_4017_NB_CHANNELS]

Definition at line 29 of file servos_4015_hw.c.

SERVO_RESET_PIN
#define SERVO_RESET_PIN
Definition: hb_1.1.h:34
TEMR_EM1
#define TEMR_EM1
Definition: lpcTMR.h:150
servos_4017_idx
uint8_t servos_4017_idx
Definition: servos_4017_hw.c:27
servos_values
uint16_t servos_values[_4017_NB_CHANNELS]
Definition: servos_4015_hw.c:29
IO1CLR
#define IO1CLR
Definition: LPC21xx.h:340
_4017_NB_CHANNELS
#define _4017_NB_CHANNELS
Definition: servos_4017_hw.h:40
IO1SET
#define IO1SET
Definition: LPC21xx.h:338