-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmonitor.h
51 lines (41 loc) · 1.21 KB
/
monitor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#pragma once
#include "types.h"
// Framebuffer size
#define FB_WIDTH 80
#define FB_HEIGHT 25
#define TAB_SIZE 4
typedef enum
{
MONCOLOR_BLACK = 0,
MONCOLOR_BLUE = 1,
MONCOLOR_GREEN = 2,
MONCOLOR_CYAN = 3,
MONCOLOR_RED = 4,
MONCOLOR_MAGENTA = 5,
MONCOLOR_BROWN = 6,
MONCOLOR_LGREY = 7,
MONCOLOR_DGREY = 8,
MONCOLOR_LBLUE = 9,
MONCOLOR_LGREEN = 10,
MONCOLOR_LCYAN = 11,
MONCOLOR_LRED = 12,
MONCOLOR_LMAGENTA = 13,
MONCOLOR_LBROWN = 14,
MONCOLOR_WHITE = 15
} MONCOLOR;
// Write a single character to the monitor
void monitor_put(char c);
// Write a null-terminated string to the monitor
void monitor_write(char *str);
// Write a null-terminated string to the monitor followed by a new line
void monitor_writeline(char *str);
// Write an integer with the given format to the monitor
void monitor_writei(uint64_t i, char fmt);
// Write an integer with the given format to the monitor followed by a new line
void monitor_writelinei(uint64_t i, char fmt);
// Clear the monitor
void monitor_clear(void);
// Set the foreground and background colours
void monitor_color_set(MONCOLOR fg, MONCOLOR bg);
// Reset the forground and background colour
void monitor_color_reset(void);