Finished Timer IRQ abstraction
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user