/* $Id$ * $URL$ * * Driver for Electronic Assembly serial graphic display * * Copyright (C) 2007 Stefan Gmeiner * Copyright (C) 2005 Michael Reinelt * Copyright (C) 2005, 2006, 2007 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. * */ /* * Electronic Assembly RS232 Graphic Displays * * This driver supports some of the Electronic Assembly serial graphic displays. Although * most of this display support higher level operation like text and graphic command, non of * these are used. Instead the lcd4linux graphic routines creates the graphic which is then * transferd to the display. * * FIXME: Some display have addition features such as GPI which are not yet implemented. * * Display Protocol Output Contrast * ============================================ * GE120-5NV24 1 8 yes * GE128-6N3V24 1 8 no * GE128-6N9V24 2 0 yes * GE128-7KV24 3 8 no * GE240-6KV24 3 8 no * GE240-6KCV24 3 8 no * GE240-7KV24 3 8 no * GE240-7KLWV24 3 8 no * GE240-6KLWV24 3 8 no * * Supported protocol commands: * * Clear * Protocol Display Set Output Set Contrast Bitmap Orientation * ======================================================================================= * 1 DL Y(0..7)(0..1) K(0..20) U(x)(y)(w)(h)(...) Vertical * 2 DL -- DK(0..63) UL(x)(y)(w)(h)(...) Vertical * 3 DL Y(0..7)(0..1) -- U(x)(y)(w)(h)(...) Horizontal * * Bitmap orientation: * * Vertical: Byte-No. * 123456789.... * Bit 0 ********* * Bit 1 ********* * Bit 2 ********* * Bit 3 ********* * Bit 4 ********* * Bit 5 ********* * Bit 6 ********* * Bit 7 ********* * * Horizontal: Bit-No. * 76543210 * Byte 0 ******** * Byte 1 ******** * Byte 3 ******** * ... * * */ /* * * exported fuctions: * * struct DRIVER drv_EA232graphic * */ #include "config.h" #include #include #include #include #include #include #include "debug.h" #include "cfg.h" #include "qprintf.h" #include "udelay.h" #include "plugin.h" #include "widget.h" #include "widget_text.h" #include "widget_icon.h" #include "widget_bar.h" #include "drv.h" /* graphic display */ #include "drv_generic_graphic.h" /* serial port */ #include "drv_generic_serial.h" /* GPO */ #include "drv_generic_gpio.h" #define ESC ((char)27) #define MSB_BYTE 0x80 #define LSB_BYTE 0x01 static char Name[] = "EA
# PuyenVelay(Le) - France (DVB-T transmitter of PuyenVelay(Le) ( Agglomération ) )
# PuyenVelay(Le) - France (signal DVB-T transmis depuis l'émetteur de Agglomération )
#
# ATTENTION ! Ce fichier a ete construit automatiquement a partir
# des frequences obtenues sur : http://www.tvnt.net/multiplex_frequences.htm
# en Avril 2006. Si vous constatez des problemes et voulez apporter des
# modifications au fichier, envoyez le fichier modifie a
# l'adresse linux-dvb@linuxtv.org (depot des fichiers d'init dvb)
# ou a l'auteur du fichier :
# Nicolas Estre <n_estre@yahoo.fr>
#
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
#### PuyenVelay(Le) - Agglomération ####
#R1
T 666000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R2
T 642000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R3
T 714000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R4
T 690000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R5
T 738000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R6
T 514000000 8MHz AUTO NONE QAM64 8k AUTO NONE
LT * arg1) { double contrast; contrast = drv_EA232graphic_contrast(R2N(arg1)); SetResult(&result, R_NUMBER, &contrast); } /****************************************/ /*** widget callbacks ***/ /****************************************/ /* using drv_generic_text_draw(W) */ /* using drv_generic_text_icon_draw(W) */ /* using drv_generic_text_bar_draw(W) */ /* using drv_generic_gpio_draw(W) */ /****************************************/ /*** exported functions ***/ /****************************************/ /* list models */ int drv_EA232graphic_list(void) { int i; for (i = 0; Models[i].name; i++) { printf("%s ", Models[i].name); } return 0; } /* initialize driver & display */ int drv_EA232graphic_init(const char *section, const int quiet) { int ret; /* real worker functions */ drv_generic_graphic_real_blit = drv_EA232graphic_blit; drv_generic_gpio_real_set = drv_EA232graphic_GPO; /* start display */ if ((ret = drv_EA232graphic_start(section)) != 0) return ret; /* initialize generic graphic driver */ if ((ret = drv_generic_graphic_init(section, Name)) != 0) return ret; /* initialize GPO */ if (Model->gpo > 0 && (ret = drv_generic_gpio_init(section, Name)) != 0) return ret; if (!quiet) { char buffer[40]; qprintf(buffer, sizeof(buffer), "%s %dx%d", Name, DCOLS, DROWS); if (drv_generic_graphic_greet(buffer, NULL)) { sleep(3); drv_generic_graphic_clear(); } } /* register plugins */ AddFunction("LCD::contrast", 1, plugin_contrast); return 0; } /* close driver & display */ int drv_EA232graphic_quit(const int quiet) { info("%s: shutting down.", Name); /* clear display */ drv_generic_graphic_clear(); /* say goodbye... */ if (!quiet) { drv_generic_graphic_greet("goodbye!", NULL); } drv_generic_graphic_quit(); if (Model->gpo > 0) drv_generic_gpio_quit(); debug("%s: closing connection", Name); drv_EA232graphic_close(); return (0); } /* use this one for a graphic display */ DRIVER drv_EA232graphic = { .name = Name, .list = drv_EA232graphic_list, .init = drv_EA232graphic_init, .quit = drv_EA232graphic_quit, };