2021-02-07 12:47:16 +00:00
|
|
|
#ifndef ENCODER_H_INCLUDED
|
|
|
|
#define ENCODER_H_INCLUDED
|
|
|
|
|
|
|
|
|
|
|
|
#include <stdint.h>
|
2024-03-18 22:56:56 +00:00
|
|
|
#include <stdbool.h>
|
2021-02-07 12:47:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2024-03-08 19:30:52 +00:00
|
|
|
void Encoder_Init(uint16_t ppr);
|
2021-02-07 12:47:16 +00:00
|
|
|
void Encoder_Reset(void);
|
|
|
|
|
2024-03-08 19:30:52 +00:00
|
|
|
void Encoder_SetPulsesPerRev(uint16_t ppr);
|
|
|
|
|
2021-02-07 12:47:16 +00:00
|
|
|
uint32_t Encoder_GetValue(void);
|
|
|
|
void Encoder_SetValue(uint32_t val);
|
|
|
|
|
2024-03-18 22:56:56 +00:00
|
|
|
bool Encoder_Zero(void);
|
|
|
|
|
2021-02-07 12:47:16 +00:00
|
|
|
void Encoder_OvfISR(void);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* ENCODER_H_INCLUDED */
|