Finished Timer IRQ abstraction

This commit is contained in:
2025-08-28 20:56:51 -07:00
parent 55ca8d5360
commit 1e966f0688
6 changed files with 46 additions and 34 deletions

View File

@@ -2,8 +2,7 @@
#define SHAL_TIM_H
#include "SHAL_TIM_REG.h"
#include "SHAL_TIM_CALLBACK.h"
class Timer {
public:
@@ -16,12 +15,20 @@ public:
//Stops the counter
void stop();
//Set prescaler value
void setPrescaler(uint16_t presc);
//Set auto reload register
void setARR(uint16_t arr);
//Enable interrupts
void enableInterrupt();
//Set timer IRQ callback function
void setCallbackFunc(TimerCallback callback){
registerTimerCallback(timer, callback);
}
private:
Timer_Key timer;