Made timer constructor unaccessable by user

This commit is contained in:
2025-08-28 22:02:08 -07:00
parent 1e966f0688
commit d092ccd362
4 changed files with 60 additions and 12 deletions

View File

@@ -16,10 +16,10 @@ int main() {
RCC->AHBENR |= RCC_AHBENR_GPIOAEN;
RCC->AHBENR |= RCC_AHBENR_GPIOBEN;
auto timer2 = Timer(Timer_Key::S_TIM2);
Timer timer2 = getTimer(Timer_Key::S_TIM2);
timer2.setPrescaler(8000 - 1);
timer2.setARR(250 - 1);
timer2.setARR(500 - 1);
timer2.setCallbackFunc(tim2Handler);
timer2.start();