1#ifndef _VTX_H
2#define _VTX_H
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#define VTXIOCGETINFO _IOR (0x81, 1, vtx_info_t)
22#define VTXIOCCLRPAGE _IOW (0x81, 2, vtx_pagereq_t)
23#define VTXIOCCLRFOUND _IOW (0x81, 3, vtx_pagereq_t)
24#define VTXIOCPAGEREQ _IOW (0x81, 4, vtx_pagereq_t)
25#define VTXIOCGETSTAT _IOW (0x81, 5, vtx_pagereq_t)
26#define VTXIOCGETPAGE _IOW (0x81, 6, vtx_pagereq_t)
27#define VTXIOCSTOPDAU _IOW (0x81, 7, vtx_pagereq_t)
28#define VTXIOCPUTPAGE _IO (0x81, 8)
29#define VTXIOCSETDISP _IO (0x81, 9)
30#define VTXIOCPUTSTAT _IO (0x81, 10)
31#define VTXIOCCLRCACHE _IO (0x81, 11)
32#define VTXIOCSETVIRT _IOW (0x81, 12, long)
33
34
35#define VTXIOCGETINFO_OLD 0x7101
36#define VTXIOCCLRPAGE_OLD 0x7102
37#define VTXIOCCLRFOUND_OLD 0x7103
38#define VTXIOCPAGEREQ_OLD 0x7104
39#define VTXIOCGETSTAT_OLD 0x7105
40#define VTXIOCGETPAGE_OLD 0x7106
41#define VTXIOCSTOPDAU_OLD 0x7107
42#define VTXIOCPUTPAGE_OLD 0x7108
43#define VTXIOCSETDISP_OLD 0x7109
44#define VTXIOCPUTSTAT_OLD 0x710a
45#define VTXIOCCLRCACHE_OLD 0x710b
46#define VTXIOCSETVIRT_OLD 0x710c
47
48
49
50
51
52#define SAA5243 0
53#define SAA5246 1
54#define SAA5249 2
55#define SAA5248 3
56#define XSTV5346 4
57
58typedef struct {
59 int version_major, version_minor;
60
61 int numpages;
62 int cct_type;
63
64}
65vtx_info_t;
66
67
68
69
70
71
72#define MIN_UNIT (1<<0)
73#define MIN_TEN (1<<1)
74#define HR_UNIT (1<<2)
75#define HR_TEN (1<<3)
76#define PG_UNIT (1<<4)
77#define PG_TEN (1<<5)
78#define PG_HUND (1<<6)
79#define PGMASK_MAX (1<<7)
80#define PGMASK_PAGE (PG_HUND | PG_TEN | PG_UNIT)
81#define PGMASK_HOUR (HR_TEN | HR_UNIT)
82#define PGMASK_MINUTE (MIN_TEN | MIN_UNIT)
83
84typedef struct
85{
86 int page;
87 int hour;
88 int minute;
89 int pagemask;
90 int pgbuf;
91 int start;
92 int end;
93 void __user *buffer;
94}
95vtx_pagereq_t;
96
97
98
99
100
101
102#define VTX_PAGESIZE (40 * 24)
103#define VTX_VIRTUALSIZE (40 * 49)
104
105typedef struct
106{
107 int pagenum;
108 int hour;
109 int minute;
110 int charset;
111 unsigned delete : 1;
112 unsigned headline : 1;
113 unsigned subtitle : 1;
114 unsigned supp_header : 1;
115 unsigned update : 1;
116 unsigned inter_seq : 1;
117 unsigned dis_disp : 1;
118 unsigned serial : 1;
119 unsigned notfound : 1;
120 unsigned pblf : 1;
121 unsigned hamming : 1;
122}
123vtx_pageinfo_t;
124
125#endif
126