blob: 4296aa79b707f5bd39c2d0ad9704c6defe2f89be (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#include <mailbox.h>
#include <mmio.h>
#include <raspi.h>
#include <uart.h>
static void halt() {
while (1) {
asm volatile("wfi"); // Wait for interrupt. Core enters low-power state.
}
}
void main() {
const int raspi = raspi_init();
mmio_init(raspi); // Must be initialized before other peripherals.
mbox_init();
uart_init(raspi);
uart_print("Hello world!\n");
halt();
}
|