Port TimerIO

This commit is contained in:
2023-09-22 17:34:14 +02:00
parent e51d9ebb3a
commit 2aaa41302f
4 changed files with 52 additions and 68 deletions

View File

@@ -16,7 +16,7 @@ namespace JabyEngine {
void setup() {
using namespace Timer_IO;
static constexpr auto Mode = CounterMode_t::from(CounterMode_t::FreeRun, Counter2_v::SyncMode::FreeRun, CounterMode_t::ResetAfterTarget, CounterMode_t::IRQAtTarget, CounterMode_t::IRQEveryTime, CounterMode_t::IRQPulse, Counter2_v::Source::System_Clock_Div_8);
static constexpr auto Mode = CounterMode::from(CounterMode::FreeRun, Counter2::SyncMode::FreeRun, CounterMode::ResetAfterTarget, CounterMode::IRQAtTarget, CounterMode::IRQEveryTime, CounterMode::IRQPulse, Counter2::Source::System_Clock_Div_8);
// We disable the IRQ here so it can be enabled by user demand later
// Having the interrupt fire every 10ms will slow us down slightly so we only do it on demand