8 #define ENC_A_PORT      PORTB         
   10 #define ENC_B_PORT      PORTB         
   12 #define ENC_T_PORT      PORTB         
   15 #define DDR(x) (*(&x-1)) 
   16 #define Port(x) (*(&x)) 
   17 #define PIN(x) (*(&x-2)) 
   19 #define PHASE_A     PIN(ENC_A_PORT) & (1<<ENC_A_PIN) 
   20 #define PHASE_B     PIN(ENC_B_PORT) & (1<<ENC_B_PIN) 
   21 #define BUTTONPRESSED (!(PIN(ENC_T_PORT) & (1<<ENC_T_PIN))) 
   32 #define ENCODERTIMER             5 
   33 #define BUTTON_DEBOUNCETIME_MS  30/ENCODERTIMER  
   34 #define BUTTON_PRESSEDLONG_MS   250/ENCODERTIMER 
   36 typedef enum EButtonPressedState
 
   38     ButtonPressed_Unpressed,
 
   41 }tEButtonPressedState;
 
   44 void EncoderInit( 
void );
 
   48 int8_t EncoderRead(
char Ueberlauf);
 
   50 tEButtonPressedState EncoderGetButtonState(
void);
 
   54 void EncoderMinMax(int8_t EncoderMin,int8_t EncoderMax);
 
void EncoderPolling(void)
EncoderPolling.
Definition: encoder.c:61
 
volatile int8_t EncoderPos
Encoderposition für WpM/BpM.
Definition: globals.h:188