blob: 161d3bf508119b9ed04d587c8cc35c710b9434a6 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001/* SPDX-License-Identifier: GPL-2.0 */
Brian Murphy1f21d2b2007-08-21 22:34:16 +02002/*
3 * Picvue PVC160206 display driver
4 *
5 * Brian Murphy <brian.murphy@eicon.com>
6 *
7 */
Brian Murphy1f21d2b2007-08-21 22:34:16 +02008struct pvc_defs {
9 volatile u32 *reg;
10 u32 data_shift;
11 u32 data_mask;
12 u32 e;
13 u32 rw;
14 u32 rs;
15};
16
17extern struct pvc_defs *picvue;
18
19#define PVC_NLINES 2
20#define PVC_DISPMEM 80
21#define PVC_LINELEN PVC_DISPMEM / PVC_NLINES
22#define PVC_VISIBLE_CHARS 16
23
24void pvc_write_string(const unsigned char *str, u8 addr, int line);
25void pvc_write_string_centered(const unsigned char *str, int line);
26void pvc_dump_string(const unsigned char *str);
27
28#define BM_SIZE 8
29#define MAX_PROGRAMMABLE_CHARS 8
30int pvc_program_cg(int charnum, u8 bitmap[BM_SIZE]);
31
32void pvc_dispcnt(u8 cmd);
Ralf Baechle70342282013-01-22 12:59:30 +010033#define DISP_OFF 0
34#define DISP_ON (1 << 2)
35#define CUR_ON (1 << 1)
36#define CUR_BLINK (1 << 0)
Brian Murphy1f21d2b2007-08-21 22:34:16 +020037
38void pvc_move(u8 cmd);
Ralf Baechle70342282013-01-22 12:59:30 +010039#define DISPLAY (1 << 3)
40#define CURSOR 0
41#define RIGHT (1 << 2)
42#define LEFT 0
Brian Murphy1f21d2b2007-08-21 22:34:16 +020043
44void pvc_clear(void);
45void pvc_home(void);