STM32F4DoorControl/encoder.h
2021-02-19 21:30:23 +01:00

12 lines
278 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);
#endif