Move from 'hello.c' to 'start_kernel.c' to sound more professional...
...though at this point start_kernel.c just does a test of the video and serial/printing capabilities and nothing else.
This commit is contained in:
28
kernel/start_kernel.c
Normal file
28
kernel/start_kernel.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include <print.h>
|
||||
#include <devices/pl011.h>
|
||||
|
||||
#include <devices/pl110.h>
|
||||
#include <framebuffer.h>
|
||||
|
||||
struct fb myfb;
|
||||
|
||||
void video(void)
|
||||
{
|
||||
unsigned int x, y;
|
||||
pl110_init(&myfb, 16);
|
||||
x = 0, y = 0;
|
||||
for (x=0; x<640; x++)
|
||||
for (y=0; y<480; y++)
|
||||
fb_write_pixel(&myfb, x, y, 0x1f, 0x1f, 0x0);
|
||||
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
print_init(&pl011_putc); //initialize the serial console
|
||||
|
||||
video();
|
||||
|
||||
print("hello, world!\n");
|
||||
return 0;
|
||||
}
|
Reference in New Issue
Block a user