25 #include "generated/airframe.h"
31 #define PWMMR_SERV0 PWMMR5
32 #define PWMMR_SERV1 PWMMR2
33 #define PWMLER_LATCH_SERV0 PWMLER_LATCH5
34 #define PWMLER_LATCH_SERV1 PWMLER_LATCH2
35 #define PWMMCR_MRI_SERV0 PWMMCR_MR5I
36 #define PWMMCR_MRI_SERV1 PWMMCR_MR2I
37 #define PWMPCR_ENA_SERV0 PWMPCR_ENA5
38 #define PWMPCR_ENA_SERV1 PWMPCR_ENA2
39 #define PWMIR_MRI_SERV0 PWMIR_MR5I
40 #define PWMIR_MRI_SERV1 PWMIR_MR2I
43 #define PWM_VIC_SLOT 3
56 IO0DIR |= _BV(SERV1_CLOCK_PIN);
57 IO1DIR |= _BV(SERV1_DATA_PIN) | _BV(SERV1_RESET_PIN);
58 SERV1_CLOCK_PINSEL |= SERV1_CLOCK_PINSEL_VAL << SERV1_CLOCK_PINSEL_BIT;
71 PWMPR = PWM_PRESCALER - 1;
85 #ifdef SERVO_MOTOR_LEFT
88 #ifdef SERVO_MOTOR_RIGHT
98 #define SERVO_REFRESH_TICS SERVOS_TICS_OF_USEC(25000)
109 IO1CLR = _BV(SERV1_RESET_PIN);
110 IO1SET = _BV(SERV1_DATA_PIN);
116 IO1CLR = _BV(SERV1_DATA_PIN);
122 IO1SET = _BV(SERV1_RESET_PIN);
#define SERVOS_TICS_OF_USEC(s)
#define PWMTCR_COUNTER_ENABLE
#define _4015_NB_CHANNELS
Hardware independent API for actuators (servos, motor controllers).
Architecture independent timing functions.
static uint8_t servos_idx
void actuators_4015_init(void)
static uint32_t servos_delay
#define PWMTCR_PWM_ENABLE
#define SERVO_REFRESH_TICS
#define PWMLER_LATCH_SERV1
uint16_t servos_values[_4015_NB_CHANNELS]