Defines | Functions
encoder.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define ENC_COUNTA   TCNT0
#define ENC_COUNTB   TCNT3


void encoder_init (void)
int16_t encoder_read ()
void encoder_reset ()

Detailed Description

Header for encoder setup and position acquisition. Contains gray code converter code from Peter Dannegger from, for glitchless encoder position evaluation

Julio Sagardoy

Definition in file encoder.h.

Define Documentation

#define ENC_COUNTA   TCNT0

Definition at line 20 of file encoder.h.

#define ENC_COUNTB   TCNT3

Definition at line 21 of file encoder.h.


Definition at line 22 of file encoder.h.

Function Documentation

void encoder_init ( void  )

Encoder init routine.

Definition at line 77 of file encoder.c.

int16_t encoder_read ( )

Returns actual value in the counter.

Definition at line 47 of file encoder.c.

void encoder_reset ( )

Resets encoder counter to 0. Mandatory to run this after calibration, so it counts from 0.

Definition at line 38 of file encoder.c.

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