Debian Codegraph @

extras/graphic_lcd/src/glcd_100X32_sed1520.h

raw
1 /*
2 Copyright (C) 2005 T. Scott Dattalo
3
4 This file is part of gpsim.
5
6 gpsim is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 gpsim is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with gpsim; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
20
21
22 #ifndef EXTRAS_GRAPHIC_LCD_SRC_GLCD_100X32_SED1520_H_
23 #define EXTRAS_GRAPHIC_LCD_SRC_GLCD_100X32_SED1520_H_
24
25 #include <gtk/gtk.h>
26 #include "glcd.h"
27
28 class SED1520;
29 class gLCD_InputPin;
30 class PortRegister;
31 class Module;
32
33 enum enPins {
34 enA0,
35 enE1,
36 enE2,
37 enRW
38 };
39
40 class gLCD_100X32_SED1520 : public gLCD_Module {
41 public:
42 explicit gLCD_100X32_SED1520(const char *new_name);
43 ~gLCD_100X32_SED1520();
44
45 static Module *construct(const char *new_name);
46 bool dataBusDirection();
47 void Update(GtkWidget *pw = nullptr);
48 void UpdatePinState(enPins, char);
49 void create_iopin_map();
50 void create_widget();
51
52 private:
53 PortRegister *m_dataBus;
54 gLCD_InputPin *m_A0;
55 gLCD_InputPin *m_E1;
56 gLCD_InputPin *m_E2;
57 gLCD_InputPin *m_RW;
58
59 SED1520 *m_sed1;
60 SED1520 *m_sed2;
61
62 static gboolean lcd_expose_event(GtkWidget *widget, GdkEventExpose *event,
63 gLCD_100X32_SED1520 *pLCD);
64 };
65
66 #endif //__GLCD_100X32_SED1520_H__