/* $Id$ * $URL$ * * Pertelian lcd4linux driver * Copyright (C) 2007 Andy Powell * * 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. * */ /* * * exported fuctions: * * struct DRIVER drv_Pertelian * */ #include "config.h" #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" #include "drv_generic_text.h" #include "drv_generic_serial.h" static char Name[] = "Pertelian"; static unsigned char rowoffset[4] = { 0x80, 0x80 + 0x40, 0x80 + 0x14, 0x80 + 0x40 + 0x14 }; #define PERTELIAN_LCDCOMMAND 0xfe /****************************************/ /*** hardware dependant functions ***/ /****************************************/ static int drv_Pertelian_open(const char *section) { if (drv_generic_serial_open(section, Name, 0) < 0) return -1; return 0; } static int drv_Pertelian_close(void) { drv_generic_serial_close(); return 0; } static void drv_Pertelian_send(const char *data, const unsigned int len) { unsigned int i; /* Pertelian interface seems to offer no buffering at all so we have to slow things down a tad yes 1usec is enough */ for (i = 0; i < len; i++) { drv_generic_serial_write(&data[i], 1); usleep(1); } } /* text mode displays only */ static void drv_Pertelian_clear(void) { char cmd[2]; cmd[0] = PERTELIAN_LCDCOMMAND; cmd[1] = 0x01; drv_Pertelian_send(cmd, 2); } /* text mode displays only */ static void drv_Pertelian_write(const int row, const int col, const char *data, int len) { char cmd[3]; cmd[0] = PERTELIAN_LCDCOMMAND; cmd[1] = ((rowoffset[row]) + (col)); drv_Pertelian_send(cmd, 2); drv_Pertelian_send(data, len); } /* text mode displays only */ static void drv_Pertelian_defchar(const int ascii, const unsigned char *matrix) { char cmd[11] = ""; int i; cmd[0] = PERTELIAN_LCDCOMMAND; cmd[1] = (0x40 + (8 * ascii)); for (i = 0; i < 8; i++) { cmd[i + 2] = matrix[i] & 0x1f; } drv_Pertelian_send(cmd, 10); } static int drv_Pertelian_backlight(int backlight) { char cmd[2]; if (backlight <= 0) backlight = 2; else if (backlight >= 1) backlight = 3; cmd[0] = PERTELIAN_LCDCOMMAND;
# automatically generated from http://www.digitv.fi/sivu.asp?path=1;8224;9519
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 562000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
T 610000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE