mbv: minor cleanup

This commit is contained in:
2025-06-23 15:20:36 -07:00
parent 73edb77577
commit af768cbb09
8 changed files with 39 additions and 198 deletions

View File

@@ -1,25 +1,17 @@
#include <cstdint>
#include "bios.h"
#include "gpio.h"
#include "intc.h"
#include "interrupts.h"
#include "pol0.h"
#include "timer.h"
extern "C" {
void BiosWozmon();
}
namespace {
struct Gpio {
volatile uint32_t data;
};
Gpio* leds = reinterpret_cast<Gpio*>(GPIO0_BASE);
Gpio* leds;
Timer* timer;
}
void Timer0Isr() {
static int counter = 0;
leds->data = counter++;
@@ -38,7 +30,10 @@ void SetupTimer() {
EnableInterrupts();
}
} // namespace
int main() {
leds = Gpio::Instance(GPIO0_BASE);
leds->data = 0xa0;
SetupTimer();