STM32F4DoorControl/encoder.h

14 lines
336 B
C

#ifndef ENCODER_H
#define ENCODER_H
#define CLOSED_POS 220
#define OPENED_POS 0
#define MAX_POS ((CLOSED_POS > OPENED_POS) ? CLOSED_POS : OPENED_POS)
#define MIN_POS ((CLOSED_POS < OPENED_POS) ? CLOSED_POS : OPENED_POS)
void encoder_setup(void);
int encoder_get(void);
int encoder_current_speed(void);
int encoder_speed(void);
#endif