Sketch Timer and implement Interrupt support
This commit is contained in:
@@ -31,15 +31,12 @@ namespace JabyEngine {
|
||||
};
|
||||
|
||||
struct __no_align Timer {
|
||||
IOPort<CounterMode> counter_mode;
|
||||
IOPort<CounterTarget> counter_target;
|
||||
IOPort<CounterMode> mode;
|
||||
IOPort<CounterTarget> target;
|
||||
private:
|
||||
uint32_t _unused[2];
|
||||
};
|
||||
|
||||
__declare_io_port_global_array(Timer, timer, 0x1F801104, 3);
|
||||
static_assert(sizeof(Timer) == 0x10);
|
||||
|
||||
namespace Counter0 {
|
||||
struct SyncMode {
|
||||
static constexpr auto Pause_During_Hblank = CounterMode::SyncMode.with(0);
|
||||
@@ -87,6 +84,9 @@ namespace JabyEngine {
|
||||
static constexpr auto System_Clock_Div_8_Too = CounterMode::ClockSource.with(3);
|
||||
};
|
||||
}
|
||||
|
||||
__declare_io_port_global_array(Timer, Counter, 0x1F801104, 3);
|
||||
static_assert(sizeof(Timer) == 0x10);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user