Made vga inlined in kernel/lib
This commit is contained in:
parent
4212d287f0
commit
e57be56d1b
|
@ -1,14 +0,0 @@
|
|||
I. File Structure
|
||||
-----------------
|
||||
|
||||
include/ - interfaces for library functions, only modules are intended to
|
||||
access them
|
||||
|
||||
so/ - archives and shared objects used by modules in linking stage
|
||||
|
||||
lib_dir/ - asm/ assembly implementations
|
||||
- src/ C implementations
|
||||
|
||||
Makefile - build sources from lib_dirs using a template Makefile which can
|
||||
be found in /scripts/ and links the resulting objects in different
|
||||
shared objects and archives which can be found in so/
|
|
@ -47,7 +47,11 @@ enum vga_color {
|
|||
*
|
||||
*/
|
||||
|
||||
uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg);
|
||||
static inline uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
|
||||
|
||||
return fg | (bg << 4);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* vga_entry:
|
||||
|
@ -60,6 +64,10 @@ uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg);
|
|||
*
|
||||
*/
|
||||
|
||||
uint16_t vga_entry(char c, uint8_t color);
|
||||
static inline uint16_t vga_entry(char c, uint8_t color) {
|
||||
|
||||
return (uint16_t) c | ((uint16_t) color << 8);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
#include "lib/vga.h"
|
||||
|
||||
uint8_t vga_entry_color(enum vga_color fg, enum vga_color bg) {
|
||||
|
||||
return fg | (bg << 4);
|
||||
|
||||
}
|
||||
|
||||
uint16_t vga_entry(char c, uint8_t color) {
|
||||
|
||||
return (uint16_t) c | ((uint16_t) color << 8);
|
||||
|
||||
}
|
Loading…
Reference in New Issue