#include #include #include #include #include static void halt() { while (1) { asm volatile("wfi"); // Wait for interrupt. Core enters low-power state. } } void main() { bool success = true; uint32_t error = -1; const int raspi = raspi_init(); mmio_init(raspi); // Must be initialized before other peripherals. mbox_init(); uart_init(raspi); success = framebuffer_init(&error); if (!success) { uart_print("Failed to initialize framebuffer\n"); if (error == MAILBOX_DELIVERY_ERROR) { uart_print("MAILBOX_DELIVERY_ERROR\n"); } goto end; } uart_print("Hello world!\n"); end: halt(); }