print_fb(char*) testing and working as intended for now
This commit is contained in:
parent
35fb16a03e
commit
5d290fe32f
@ -13,8 +13,8 @@ static char* Frame_Buffer_End = (char*)(FRAME_BUFFER_ADDR + AREA);
|
||||
// @cell parameter is the logical (linear)index into the buffer
|
||||
// _not_ the actual offset from the buffer addr
|
||||
// also proper location is caller's responsibility
|
||||
void write_cell(unsigned cell, char c, char fg, char bg) {
|
||||
Frame_Buffer[cell*2] = c;
|
||||
void writech_fb(unsigned cell, char c, char fg, char bg) {
|
||||
Frame_Buffer[cell] = c;
|
||||
Frame_Buffer[cell+1] = (fg & 0x0f << 4) | (bg & 0x0f);
|
||||
}
|
||||
|
||||
@ -25,13 +25,12 @@ void clear_buffer() {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: move this to the stl with printf functionality
|
||||
void print_fb(char* str) {
|
||||
for(unsigned i =0;i<strlen(str);i++) {
|
||||
write_cell(i, str[i], Green, White);
|
||||
writech_fb(FRAME_CELL(i), str[i], Green, White);
|
||||
}
|
||||
}
|
||||
|
||||
void test() {
|
||||
print_fb("asdf");
|
||||
void test_fb() {
|
||||
print_fb("adsf");
|
||||
}
|
||||
|
@ -28,10 +28,11 @@
|
||||
#define LightBrown 0x0e
|
||||
#define White 0x0f
|
||||
|
||||
void write_cell(unsigned cell, char c , char fg, char bg);
|
||||
void writech_fb(unsigned cell, char c , char fg, char bg);
|
||||
|
||||
void clear_buffer();
|
||||
|
||||
void print_fb(char* str);
|
||||
|
||||
void test();
|
||||
/* Testing function because yote squad in here yeye */
|
||||
void test_fb();
|
||||
|
Binary file not shown.
Loading…
Reference in New Issue
Block a user