aboutsummaryrefslogtreecommitdiff
path: root/include/tty.h
blob: ea73e5f414181a9d527e552061974975ed132bb0 (plain)
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
#ifndef TTY_H
#define TTY_H

#include <tft.h>
#define TTY_WIDTH (TFT_WIDTH / 8)
#define TTY_HEIGHT (TFT_HEIGHT / 8)

void
addch(char c);

void
addstr(const char *str);

void
setcur(unsigned int ncol, unsigned int nrow);

void
swap_colors(void);

static inline void
mvaddch(int y, int x, char c)
{
	setcur(x, y);
	addch(c);
}

static inline void
mvaddstr(int y, int x, const char *str)
{
	setcur(x, y);
	addstr(str);
}

#endif // TTY_H