Start timer abstractions

This commit is contained in:
2025-08-28 02:47:52 -07:00
parent ed8db95818
commit 8979e1b28a
4 changed files with 130 additions and 7 deletions

View File

@@ -5,4 +5,35 @@
class Timer {
public:
explicit Timer(Timer_Key t);
//Starts the counter
void start();
//Stops the counter
void stop();
void setPrescaler(uint16_t presc);
void setARR(uint16_t arr);
void enableInterrupt();
private:
Timer_Key timer;
volatile TIM_TypeDef* timer_reg;
};
extern "C" void TIM2_IRQHandler(void){
if(TIM2->SR & TIM_SR_UIF) {
}
}
#endif