xref: /inferno-os/os/mpc/screen.h (revision 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a)
1 enum {
2 	Pcolours	= 256,		/* Palette */
3 	Pred		= 0,
4 	Pgreen		= 1,
5 	Pblue		= 2,
6 
7 	Pblack		= 0x00,
8 	Pwhite		= 0xFF,
9 };
10 
11 typedef struct Cursor Cursor;
12 struct	Cursor
13 {
14 	Point	offset;
15 	uchar	clr[2*16];
16 	uchar	set[2*16];
17 };
18 
19 /*
20  * MPC8xx LCD controller
21  */
22 typedef struct LCDconfig {
23 	long	freq;	/* ideal panel frequency in Hz */
24 	int	wbl;	/* wait between lines (shift/clk cycles) */
25 	int	vpw;	/* vertical sync pulse width (lines) */
26 	int	wbf;	/* wait between frames (lines) */
27 	int	ac;	/* AC timing (frames) */
28 	ulong	flags;
29 	ulong	notpdpar;	/* reset mask for pdpar */
30 } LCDconfig;
31 
32 enum {
33 	/* lccr flags stored in LCDconfig.flags */
34 	ClockLow = 1<<11,
35 	OELow = 1<<10,
36 	HsyncLow = 1<<9,
37 	VsyncLow = 1<<8,
38 	DataLow = 1<<7,
39 	Passive8 = 1<<4,
40 	DualScan = 1<<3,
41 	IsColour = 1<<2,
42 	IsTFT = 1<<1,
43 };
44 
45 /*
46  * physical graphics device properties set by archlcdmode
47  */
48 typedef struct Mode {
49 	int	x;
50 	int	y;
51 	int	d;
52 
53 	uchar*	aperture;
54 	int	apsize;
55 	LCDconfig	lcd;
56 } Mode;
57 
58 int	archlcdmode(Mode*);
59 extern	Point	mousexy(void);
60 extern void	blankscreen(int);