summaryrefslogtreecommitdiff
path: root/screen.h
blob: f5a15d4accbc430a930f694251fb3ca5167330d7 (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
#ifndef SCREEN_H
#define SCREEN_H

#include <curses.h>

enum colors {
	BLACK   = COLOR_BLACK,
	RED     = COLOR_RED,
	GREEN   = COLOR_GREEN,
	YELLOW  = COLOR_YELLOW,
	BLUE    = COLOR_BLUE,
	MAGENTA = COLOR_MAGENTA,
	CYAN    = COLOR_CYAN,
	WHITE   = COLOR_WHITE,
};

#define COLOR_MASK(fg, bg) ((fg) + (bg) * (COLOR_WHITE + 1))
#define COLOR(fg, bg) COLOR_PAIR(COLOR_MASK((fg), (bg)))
#define INIT_COLOR(fg, bg) init_pair(COLOR_MASK((fg), (bg)), (fg), (bg))
#define COLOR_ON(fg, bg) attron(COLOR(fg, bg))
#define COLOR_OFF(fg, bg) attroff(COLOR(fg, bg))

extern WINDOW *screen_init(bool israw);
extern void screen_end(void);

#endif /* SCREEN_H */
Marc Kleine-Budde1-1/+1 rx_state, tx_state This patch removed the not needed initialisation from the new_state, rx_state, tx_state variabled. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 2017-02-06can: flexcan: do_bus_err(): convert rx_,tx_errors into boolMarc Kleine-Budde1-7/+7 This patch converts the rx_errors and tx_errors from int into bool values, to reflect their actual meaning. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 2017-02-06can: flexcan: make declaration of devtype_data constMarc Kleine-Budde1-4/+4 This patch changes the declaration of the devtype data to const. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 2017-02-06can: flexcan: remove write-only member pdata of struct flexcan_privMarc Kleine-Budde1-2/+0 This patch removes the write only member pdata from the struct flexcan_priv. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 2017-02-06can: flexcan: add missing register definitionsMarc Kleine-Budde1-3/+10 This patch adds some missing register definitions, which are needed in an upcoming patch. Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> 2017-02-06can: rx-offload: Add support for timestamp based irq offloadingMarc Kleine-Budde