Functions | Variables
servo.c File Reference
#include <avr/io.h>
#include <util/delay.h>
#include "servo.h"
#include "utils.h"
Include dependency graph for servo.c:

Go to the source code of this file.

Functions

void servo_advance ()
uint8_t servo_get_latency ()
int16_t servo_get_rem_steps ()
void servo_init ()
char servo_read ()
void servo_set_direction (const uint8_t dir)
void servo_set_latency (const uint8_t lat)
void servo_set_max ()
void servo_set_min ()
void servo_set_neutral ()
void servo_set_rem_steps (const uint8_t steps)
void servo_set_val (const int8_t target_val, const int8_t lat)

Variables

static int8_t direction
static uint8_t latency
static int8_t old_val
static const uint16_t pwmt []
 AVR includes.
static int16_t rem_steps

Detailed Description

Code for servo pwm setup.

Version:
1.0
Author:
Julio Sagardoy

Definition in file servo.c.


Function Documentation

void servo_advance ( )

Definition at line 303 of file servo.c.

uint8_t servo_get_latency ( )

Definition at line 328 of file servo.c.

int16_t servo_get_rem_steps ( )

Definition at line 320 of file servo.c.

void servo_init ( void  )

Inits servo pwm module.

Definition at line 386 of file servo.c.

char servo_read ( )

Returns the current value of the servo position

Definition at line 291 of file servo.c.

void servo_set_direction ( const uint8_t  dir)

Definition at line 296 of file servo.c.

void servo_set_latency ( const uint8_t  lat)

Definition at line 324 of file servo.c.

void servo_set_max ( )

Sets servo to its max value, and updates the position register

Definition at line 370 of file servo.c.

void servo_set_min ( )

Sets servo to its min value, and updates the position register

Definition at line 378 of file servo.c.

Sets servo to its neutral value, and updates the position register

Definition at line 362 of file servo.c.

void servo_set_rem_steps ( const uint8_t  steps)

Definition at line 316 of file servo.c.

void servo_set_val ( const int8_t  target_val,
const int8_t  lat 
)

Sets servo to the desired value, with the desired delay between steps (latency).

Definition at line 335 of file servo.c.


Variable Documentation

int8_t direction [static]

Definition at line 285 of file servo.c.

uint8_t latency [static]

Definition at line 287 of file servo.c.

int8_t old_val [static]

Definition at line 284 of file servo.c.

const uint16_t pwmt[] [static]

AVR includes.

Own includes look-up table for unsigned to pwm register value conversion

Definition at line 26 of file servo.c.

int16_t rem_steps [static]

Definition at line 286 of file servo.c.



cob_3d_mapping_demonstrator
Author(s): Georg Arbeiter
autogenerated on Wed Aug 26 2015 11:03:46