#include <string.h>#include <aversive.h>#include <aversive/error.h>#include <multiservo.h>#include <multiservo_archs.h>Go to the source code of this file.
Defines | |
| #define | MULTISERVO_DEBUG(args...) do { } while(0) |
| #define | TIME_1MS (CONFIG_QUARTZ/((1000UL)*MULTISERVO_TIMER_PRESCALER)) |
| #define | TIME_1_5MS ((TIME_1MS*3)/2) |
Functions | |
| SIGNAL (MULTISERVO_SIG_OUTPUT_COMPARE) | |
| void | multiservo_init (void) |
| int8_t | multiservo_add (volatile uint8_t *port, uint8_t bitnum) |
| void | multiservo_del (int8_t id) |
| void | multiservo_set (int8_t id, uint16_t val_us) |
Variables | |
| struct multiservo | g_multiservo |
| #define MULTISERVO_DEBUG | ( | args... | ) | do { } while(0) |
| #define TIME_1_5MS ((TIME_1MS*3)/2) |
| #define TIME_1MS (CONFIG_QUARTZ/((1000UL)*MULTISERVO_TIMER_PRESCALER)) |
Definition at line 40 of file multiservo.c.
Referenced by multiservo_init(), multiservo_set(), and SIGNAL().
| int8_t multiservo_add | ( | volatile uint8_t * | port, | |
| uint8_t | bitnum | |||
| ) |
Definition at line 127 of file multiservo.c.
References multiservo_element::bitnum, DDR, multiservo::elts, g_multiservo, i, IRQ_LOCK, IRQ_UNLOCK, multiservo_element::port, sbi, TIME_1_5MS, and multiservo_element::value.
| void multiservo_del | ( | int8_t | id | ) |
Definition at line 155 of file multiservo.c.
References multiservo_element::bitnum, cbi, DDR, multiservo::elts, g_multiservo, IRQ_LOCK, IRQ_UNLOCK, and multiservo_element::port.
| void multiservo_init | ( | void | ) |
Definition at line 104 of file multiservo.c.
References cbi, g_multiservo, multiservo::id_prev, IRQ_LOCK, IRQ_UNLOCK, sbi, and TIME_1MS.
| void multiservo_set | ( | int8_t | id, | |
| uint16_t | val_us | |||
| ) |
Set multiservo angle. Specify value in us. WARNING : should be (much) bigger than 0
Definition at line 170 of file multiservo.c.
References multiservo::elts, g_multiservo, IRQ_LOCK, IRQ_UNLOCK, TIME_1MS, and multiservo_element::value.
| SIGNAL | ( | MULTISERVO_SIG_OUTPUT_COMPARE | ) |
Definition at line 55 of file multiservo.c.
References multiservo_element::bitnum, cbi, multiservo::current_multiservo, E_MULTISERVO, multiservo::elts, g_multiservo, multiservo::id_prev, MULTISERVO_DEBUG, multiservo_element::port, sbi, TIME_1MS, multiservo::time_sum, and multiservo_element::value.
| struct multiservo g_multiservo |
Definition at line 29 of file multiservo.c.
Referenced by multiservo_add(), multiservo_del(), multiservo_init(), multiservo_set(), and SIGNAL().
1.5.6