This source file includes following definitions.
- _pcdisplay_6845_read
- _pcdisplay_6845_write
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 struct pcdisplayscreen {
31 struct pcdisplay_handle *hdl;
32
33 const struct wsscreen_descr *type;
34
35 int active;
36 u_int16_t *mem;
37
38 int cursoron;
39 #ifdef PCDISPLAY_SOFTCURSOR
40 int cursortmp;
41 #endif
42 int vc_ccol, vc_crow;
43
44 int dispoffset;
45 int visibleoffset;
46 };
47
48 struct pcdisplay_handle {
49 bus_space_tag_t ph_iot, ph_memt;
50 bus_space_handle_t ph_ioh_6845, ph_memh;
51 };
52
53 static inline u_int8_t _pcdisplay_6845_read(struct pcdisplay_handle *,
54 int);
55 static inline void _pcdisplay_6845_write(struct pcdisplay_handle *,
56 int, u_int8_t);
57
58 static inline u_int8_t _pcdisplay_6845_read(ph, reg)
59 struct pcdisplay_handle *ph;
60 int reg;
61 {
62 bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_INDEX, reg);
63 return (bus_space_read_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA));
64 }
65
66 static inline void _pcdisplay_6845_write(ph, reg, val)
67 struct pcdisplay_handle *ph;
68 int reg;
69 u_int8_t val;
70 {
71 bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_INDEX, reg);
72 bus_space_write_1(ph->ph_iot, ph->ph_ioh_6845, MC6845_DATA, val);
73 }
74
75 #define pcdisplay_6845_read(ph, reg) \
76 _pcdisplay_6845_read(ph, offsetof(struct reg_mc6845, reg))
77 #define pcdisplay_6845_write(ph, reg, val) \
78 _pcdisplay_6845_write(ph, offsetof(struct reg_mc6845, reg), val)
79
80 void pcdisplay_cursor_init(struct pcdisplayscreen *, int);
81 void pcdisplay_cursor_reset(struct pcdisplayscreen *);
82 void pcdisplay_cursor(void *, int, int, int);
83 #if 0
84 unsigned int pcdisplay_mapchar_simple(void *, int);
85 #endif
86 int pcdisplay_mapchar(void *, int, unsigned int *);
87 void pcdisplay_putchar(void *, int, int, u_int, long);
88 struct wsdisplay_charcell;
89 int pcdisplay_getchar(void *, int, int, struct wsdisplay_charcell *);
90 void pcdisplay_copycols(void *, int, int, int,int);
91 void pcdisplay_erasecols(void *, int, int, int, long);
92 void pcdisplay_copyrows(void *, int, int, int);
93 void pcdisplay_eraserows(void *, int, int, long);