17 #ifndef __INCR_ENCODERS_H 18 #define __INCR_ENCODERS_H 22 #define CODER_A_Pin GPIO_Pin_0 23 #define CODER_A_Port GPIOA 24 #define CODER_A_PinSource GPIO_PinSource0 26 #define CODER_B_Pin GPIO_Pin_1 27 #define CODER_B_Port GPIOA 28 #define CODER_B_PinSource GPIO_PinSource1 30 #define CODER_I_Pin GPIO_Pin_3 31 #define CODER_I_Port GPIOE 33 #define CODER_RESOLUTION ((uint32_t)2000) // Number of increments per turn. void enc_SetPosition(float32_t newPosition)
Set the position offset.
Definition: incr_encoder.c:60
float32_t enc_GetPosition(void)
Gets the current motor shaft angle, measured by the encoder counter.
Definition: incr_encoder.c:42
void enc_Init(void)
Initialize the incremental encoder driver.
Definition: incr_encoder.c:30