123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- #pragma once
- #define PAD_ZERO 1
- #define LEFT 2
- #define RIGHT 4
- #define PLUS 8
- #define SPACE 16
- #define SPECIAL 32
- #define SMALL 64
- #define SIGN 128
- #define is_digit(c) ((c) >= '0' && (c) <= '9')
- #define WHITE 0x00ffffff
- #define BLACK 0x00000000
- #define RED 0x00ff0000
- #define ORANGE 0x00ff8000
- #define YELLOW 0x00ffff00
- #define GREEN 0x0000ff00
- #define BLUE 0x000000ff
- #define INDIGO 0x0000ffff
- #define PURPLE 0x008000ff
- #define EPOS_OVERFLOW 1
- #define EFB_MISMATCH 2
- #define EUNSUPPORTED 3
- #include "font.h"
- #include "glib.h"
- #include <stdarg.h>
- struct printk_screen_info
- {
- int width, height;
- int max_x, max_y;
- int x, y;
- int char_size_x, char_size_y;
- uint *FB_address;
- unsigned long FB_length;
- };
- extern unsigned char font_ascii[256][16];
- int printk_init(const int char_size_x, const int char_size_y);
- int vsprintf(char *buf, const char *fmt, va_list args);
- #define printk(...) printk_color(WHITE, BLACK, __VA_ARGS__)
- int printk_color(unsigned int FRcolor, unsigned int BKcolor, const char *fmt, ...);
- ul get_VBE_FB_length();
- void set_pos_VBE_FB_addr(uint* virt_addr);
- void printk_enable_animation();
- void printk_disable_animation();
- int sprintk(char *buf, const char *fmt, ...);
|