mbv: minor cleanup
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user