Added support for DE200C VFD
[lcdproc-de200c.git] / server / drivers / de200c-vfd / test / vfd.h
blob29e90a64fa8f9e8744214e788bf9b5a9bb61e95c
1 #ifndef VFD_H
2 #define VFD_H
3 // ****************************************************************************
4 // vfd.h (C) 1992-2003 Christophe de Dinechin (ddd)
5 // VFD800 project
6 // ****************************************************************************
7 //
8 // File Description:
9 //
10 // Defines for controlling the VFD800 hardware
11 //
12 //
13 //
14 //
15 //
16 //
17 //
18 //
19 // ****************************************************************************
20 // This document is confidential.
21 // Do not redistribute without written permission
22 // ****************************************************************************
23 // * File : $RCSFile$
24 // * Revision : $Revision$
25 // * Date : $Date$
26 // ****************************************************************************
29 // ============================================================================
30 //
31 // High-level functions
32 //
33 // ============================================================================
35 extern int VFD_Init();
36 extern void VFD_EnableScreen(int screen0, int screen1);
37 extern void VFD_Brightness(float brightness);
38 extern void VFD_SetX(int X);
39 extern void VFD_SetY(int Y);
40 extern void VFD_SetXY(int X, int Y);
41 extern void VFD_Char(char c);
42 extern void VFD_Text(char *txt);
46 // ============================================================================
47 //
48 // Low-level functions
49 //
50 // ============================================================================
52 extern void VFD_Command(int command);
53 extern void VFD_Data(int data);
54 extern char VFD_Font[256][6];
58 // ============================================================================
59 //
60 // Low-level command defines
61 //
62 // ============================================================================
64 #define DATAPORT 0x378 /* printer port base address */
65 #define CONTROLPORT 0x37A /* print port control address */
68 #define ANDCNTL 0x03
69 #define ORCNTL 0x01
70 #define XORCNTL 0x02
72 #define INIT800A 0x5F /* initialization code sequence */
73 #define INIT800B 0x62
74 #define INIT800C(n) 0x00+n
75 #define INIT800D 0xFF
76 #define CLEARSCREENS 0x5e /* clear all screens (layers) */
77 #define LAYER0ON 0x24 /* screen0 both on */
78 #define LAYER1ON 0x28 /* screen1 both on */
79 #define LAYERSON 0x2c /* both screens both on */
80 #define LAYERSOFF 0x20 /* screens both off */
81 #define ORON 0x40 /* OR screens */
82 #define ANDON 0x48 /* AND screens */
83 #define XORON 0x44 /* XOR screens */
84 #define SETX 0x64 /* set X position */
85 #define SETY 0x60 /* set Y position */
86 #define HSHIFT 0x70 /* set horizontal shift */
87 #define VSHIFT 0xB0
88 #define AUTOINCOFF 0x80 /* address auto increment off */
89 #define AUTOINCX 0x84 // Auto-increment X axis
90 #define AUTOINCY 0x82 // Auto-increment Y axis
91 #define AUTOINCXY 0x86 // Auto-increment Y axis
92 #define SETPOSITION 0xff
94 #define MS * 1000 // 1ms = 1000us
96 #endif // VFD_H