aversive_10-03-12/modules/devices/servo/multiservo/multiservo.c File Reference

#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 Documentation

#define MULTISERVO_DEBUG ( args...   )     do { } while(0)

Definition at line 36 of file multiservo.c.

Referenced by SIGNAL().

#define TIME_1_5MS   ((TIME_1MS*3)/2)

Definition at line 41 of file multiservo.c.

Referenced by multiservo_add().

#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().


Function Documentation

int8_t multiservo_add ( volatile uint8_t *  port,
uint8_t  bitnum 
)

void multiservo_del ( int8_t  id  ) 

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   ) 


Variable Documentation

Definition at line 29 of file multiservo.c.

Referenced by multiservo_add(), multiservo_del(), multiservo_init(), multiservo_set(), and SIGNAL().


Generated on Fri Mar 12 06:32:06 2010 for AVR by  doxygen 1.5.6