/* $Id * * generic driver helper for graphic displays * * Copyright 1999, 2000 Michael Reinelt * Copyright 2004 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. * * * $Log: drv_generic_graphic.c,v $ * Revision 1.12 2004/06/26 12:04:59 reinelt * * uh-oh... the last CVS log message messed up things a lot... * * Revision 1.11 2004/06/26 09:27:21 reinelt * * added '-W' to CFLAGS * changed all C++ comments to C ones * cleaned up a lot of signed/unsigned mistakes * * Revision 1.10 2004/06/20 10:09:55 reinelt * * 'const'ified the whole source * * Revision 1.9 2004/06/09 06:40:29 reinelt * * splash screen for T6963 driver * * Revision 1.8 2004/06/08 21:46:38 reinelt * * splash screen for X11 driver (and generic graphic driver) * * Revision 1.7 2004/06/01 06:45:30 reinelt * * some Fixme's processed * documented some code * * Revision 1.6 2004/03/03 03:47:04 reinelt * big patch from Martin Hejl: * - use qprintf() where appropriate * - save CPU cycles on gettimeofday() * - add quit() functions to free allocated memory * - fixed lots of memory leaks * * Revision 1.5 2004/02/29 14:30:59 reinelt * icon visibility fix for generic graphics from Xavier * * Revision 1.4 2004/02/24 05:55:04 reinelt * * X11 driver ported * * Revision 1.3 2004/02/22 17:35:41 reinelt * some fixes for generic graphic driver and T6963 * removed ^M from plugin_imon (Nico, are you editing under Windows?) * * Revision 1.2 2004/02/18 06:39:20 reinelt * T6963 driver for graphic displays finished * * Revision 1.1 2004/02/15 21:43:43 reinelt * T6963 driver nearly finished * framework for graphic displays done * i2c_sensors patch from Xavier * some more old generation files removed * */ /* * * exported functions: * * int drv_generic_graphic_init (char *section, char *driver); * initializes the generic graphic driver * * int drv_generic_graphic_draw (WIDGET *W); * renders Text widget into framebuffer * calls drv_generic_graphic_real_blit() * * int drv_generic_graphic_icon_draw (WIDGET *W); * renders Icon widget into framebuffer * calls drv_generic_graphic_real_blit() * * int drv_generic_graphic_bar_draw (WIDGET *W); * renders Bar widget into framebuffer * calls drv_generic_graphic_real_blit() * * int drv_generic_graphic_quit (void); * closes generic graphic driver * */ #include "config.h" #include #include #include #include #include #include #include #include "debug.h" #include "cfg.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_graphic.h" #include "font_6x8.h" #ifdef WITH_DMALLOC #include #endif static char *Section=NULL; static char *Driver=NULL; int DROWS, DCOLS; /* display size (pixels!) */ int LROWS, LCOLS; /* layout size (pixels!) */ int XRES, YRES; /* pixels of one char cell */ unsigned char *drv_generic_graphic_FB = NULL; /****************************************/ /*** generic Framebuffer stuff ***/ /****************************************/ static void drv_generic_gra
# Sweden - Furudal
# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 762000000 8MHz 2/3 NONE QAM64 8k 1/8 NONE
/****************************************/ /*** generic init/quit ***/ /****************************************/ int drv_generic_graphic_init (const char *section, const char *driver) { Section = (char*)section; Driver = (char*)driver; /* init layout framebuffer */ LROWS = 0; LCOLS = 0; drv_generic_graphic_FB=NULL; drv_generic_graphic_resizeFB (DROWS, DCOLS); /* sanity check */ if (drv_generic_graphic_FB==NULL) { error ("%s: framebuffer could not be allocated: malloc() failed", Driver); return -1; } return 0; } int drv_generic_graphic_quit (void) { if (drv_generic_graphic_FB) { free(drv_generic_graphic_FB); drv_generic_graphic_FB=NULL; } widget_unregister(); return (0); }