STM32F4DoorControl/encoder.h

14 lines
336 B
C
Raw Normal View History

2021-02-19 20:30:23 +00:00
#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);
2021-02-19 20:30:23 +00:00
#endif