|
Mechatronic Zen Garden
0.1
This webpage contains documentation for the ME 507 term project: Mechatronic Zen Garden.
|
|
Go to the documentation of this file.
23 #include <HardwareTimer.h>
49 STM32Encoder (TIM_TypeDef* timer, uint8_t pin1, uint8_t pin2);
int32_t realCt
Internal count value, unprocessed.
Definition: EncoderDriver.h:90
int32_t update(void)
Updates count value accounting for overflow.
Definition: EncoderDriver.cpp:82
int32_t delta
Change in internal count value.
Definition: EncoderDriver.h:93
uint16_t getCount(void)
Return the current position count from the timer.
Definition: EncoderDriver.h:54
Class which operates an STM32 timer in quadrature encoder mode.
Definition: EncoderDriver.h:44
void pause(void)
Pause the counter so it won't update its count until resumed.
Definition: EncoderDriver.h:69
STM32Encoder(TIM_TypeDef *timer, uint8_t pin1, uint8_t pin2)
Set up an STM32 timer to read a quadrature encoder.
Definition: EncoderDriver.cpp:49
void resume(void)
Resume the counter so it will update its count when the encoder is moved.
Definition: EncoderDriver.h:77
HardwareTimer * p_timer
Pointer to the timer/counter to be used.
Definition: EncoderDriver.h:46
void zero(void)
Set the counter reading to zero.
Definition: EncoderDriver.h:61
uint16_t ctNow
Current count value, ready for use.
Definition: EncoderDriver.h:87