1
0

console: Initial commit of simple framebuffer console output

This commit is contained in:
2012-10-02 23:17:25 -04:00
parent 53863654c3
commit 736155ce99
3 changed files with 115 additions and 39 deletions

View File

@ -31,15 +31,17 @@
struct fb myfb;
void video(void) {
unsigned int x, y;
void print_console_logo() {
print_func(&console_putc, " _ _ _\n");
print_func(&console_putc, " / \\ ___ __| |_ __(_)_ __\n");
print_func(&console_putc, " / _ \\ / _ \\/ _` | '__| \\ \\/ /\n");
print_func(&console_putc, " / ___ \\ __/ (_| | | | |> <\n");
print_func(&console_putc, " /_/ \\_\\___|\\__,_|_| |_/_/\\_\\\n\n");
print_func(&console_putc, " Copyright (C) 2012 - Aaron Lindsay\n");
}
void video_init(void) {
bcm2835_videocore_init(&myfb, 16);
for (y = 0; y < myfb.height; y++)
for (x = 0; x < myfb.width; x++)
fb_write_pixel(&myfb, x, y, 0x3f, 0x0, 0x6f);
console_init(&myfb);
}
void test_mm() {
@ -142,7 +144,9 @@ int main(void) {
test_memory();
video();
video_init();
console_init(&myfb);
print_console_logo();
return 0;
}