/* $Id$ * $URL$ * * Driver for a Noritake GU128x32-311 graphical display. * * Copyright (C) 2005 Julien Aube * Copyright (C) 2005 The LCD4Linux Team * * This file is part of LCD4Linux. * * LCD4Linux is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * LCD4Linux is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * */ /* * *** Noritake Itron GU128x32-311 *** * A 128x32 VFD (Vacuum Fluorescent Display). * It is driver by a Hitachi microcontroller, with a specific * firmware. * The datasheet can be easily found on the internet by searching for the * the name of the display, it's a PDF file that describe the timing, and * the protocol to communicate with the Hitachi microcontroller. * * The display support 2 modes (that can be mutiplexed), one text mode * thanks to an integrated character generator, and provide 4 lines of * 21 caracters. * There is also a graphical mode that can be used to switch on or off * each one if the 128x32 pixels. (monochrome). * * The protocol include the possibility to clear the display memory quickly, * change the luminosity, swich the display on or off (without affecting the * content of the memory) and finally change the "page" or the caracter * generator. Two pages are available in the ROM, all the characters are * listed in the documentation. * * This driver support only the character mode at the moment. * A future release will support the graphical mode as an option. * * This driver is released under the GPL. */ /* * * exported fuctions: * * struct DRIVER drv_Noritake * */ #include "config.h" #include #include #include #include "debug.h" #include "cfg.h" #include "qprintf.h" #include "plugin.h" #include "widget.h" #include "widget_text.h" #include "widget_icon.h" #include "widget_bar.h" #include "drv.h" #include "udelay.h" #include "drv_generic_text.h" #include "drv_generic_parport.h" static char Name[] = "Noritake"; typedef struct { int type; char *name; int rows; int cols; int xres; int yrex; int goto_cost; int protocol; } MODEL; static int Model, Protocol; static MODEL Models[] = { {0x01, "GU311", 4, 21, 6, 8, 5, 1}, {0x02, "GU311_Graphic", 4, 21, 6, 8, 6, 1}, {0xff, "Unknown", -1, -1, -1, -1, -1, -1} }; static unsigned char SIGNAL_CS; /* Chip select, OUTPUT, negative logic, pport AUTOFEED */ static unsigned char SIGNAL_WR; /* Write OUTPUT, negative logic, pport STOBE */ static unsigned char SIGNAL_RESET; /* Reset, OUTPUT, negative logic, pport INIT */ static unsigned char SIGNAL_BLANK; /* Blank, OUTPUT , negative logic, pport SELECT-IN */ #if 0 static unsigned char SIGNAL_BUSY; /* Busy, INPUT , positive logic, pport BUSY, not used */ static unsigned char SIGNAL_FRP; /* Frame Pulse, INPUT , positive logic, pport ACK, not used */ #endif void (*drv_Noritake_clear) (void); /* Data port is positive logic */ /****************************************/ /*** hardware dependant functions ***/ /****************************************/ /* Low-level parport driving functions */ /* This function was used to pool the BUSY line on the parallel port, which can be linked to the BUSY
# Intel4 @ 72E
# freq pol sr fec
S 11533000 V 4220000 AUTO
S 11638000 H 5632000 AUTO
S 12518000 V 8232000 AUTO
S 12526000 V 3266000 AUTO
lize driver & display */ int drv_Noritake_init(const char *section, const int quiet) { WIDGET_CLASS wc; int ret; info("%s: %s", Name, "$Rev$"); /* start display */ if ((ret = drv_Noritake_start(section)) != 0) return ret; /* initialize generic text driver */ if ((ret = drv_generic_text_init(section, Name)) != 0) return ret; /* register text widget */ wc = Widget_Text; wc.draw = drv_generic_text_draw; widget_register(&wc); /* register plugins */ /* none */ if (!quiet) { char buffer[40]; qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); if (drv_generic_text_greet(buffer, NULL)) { sleep(3); drv_Noritake_clear(); } } return 0; } /* close driver & display */ int drv_Noritake_quit(const int quiet) { info("%s: shutting down.", Name); /* clear display */ drv_Noritake_clear(); /* say goodbye... */ if (!quiet) { drv_generic_text_greet("goodbye!", NULL); } drv_generic_parport_close(); drv_generic_text_quit(); return (0); } DRIVER drv_Noritake = { .name = Name, .list = drv_Noritake_list, .init = drv_Noritake_init, .quit = drv_Noritake_quit, };