/* * rotaryEncoder.c * * Created: 16/12/2021 16:34:05 * Author: n0x */ #include "rotaryEncoder.h" #define ROTA PORTC7 /* define Rotary Encoder Button A */ #define ROTB PORTC6 /* define Rotary Encoder Button B */ #define ROTBUTTON PORTC5 /* enums */ enum{ LEFT1, LEFT2, LEFT3, RIGHT1, RIGHT2, RIGHT3, INIT, WAIT } RotaryState = INIT; /* Enum for the rotary enc */ int16_t count; void drehgeber_init(void) { DDRC &= ~(7<