#include <stdlib.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
#include "encoder.h"
#include "utils.h"
Go to the source code of this file.
Defines | |
#define | PHASE_A BITREAD(PIND,PD7) |
Standard includes. | |
#define | PHASE_B BITREAD(PINE,PE6) |
Functions | |
void | encoder_init () |
int16_t | encoder_read () |
void | encoder_reset () |
ISR (TIMER3_COMPA_vect) | |
Variables | |
volatile int16_t | enc_accum |
volatile int8_t | enc_delta |
static int16_t | last |
Code for encoder setup and position acquisition. Contains gray code converter code from Peter Dannegger from Mikrocontroller.net, for glitchless encoder position evaluation
Definition in file encoder.c.
void encoder_init | ( | void | ) |
int16_t encoder_read | ( | ) |
void encoder_reset | ( | ) |