9#ifndef INC_ENCODER_DRIVER_H_
10#define INC_ENCODER_DRIVER_H_
13#include "stm32f4xx_hal.h"
void setup_encoder(encoder_t *p_enc)
Initializes the encoder by setting its zero reference.
Definition encoder_driver.c:27
void read_encoder(encoder_t *p_enc)
Reads encoder ticks and applies wrap-around correction.
Definition encoder_driver.c:47
Structure to hold encoder task configuration and state.
Definition encoder_driver.h:22
int32_t ticks
Definition encoder_driver.h:25
TIM_HandleTypeDef * htim
Definition encoder_driver.h:28
int32_t ar
Definition encoder_driver.h:24
uint32_t zero
Definition encoder_driver.h:23
int32_t range
Definition encoder_driver.h:27
int32_t last_ticks
Definition encoder_driver.h:26