/* $Id: MilfordInstruments.c,v 1.7 2004/01/30 20:57:55 reinelt Exp $ * * driver for Milford Instruments 'BPK' piggy-back serial interface board * for standard Hitachi 44780 compatible lcd modules. * * Copyright 2003 Andy Baxter * * based on the MatrixOrbital driver which is * Copyright 1999, 2000 Michael Reinelt * * This program 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. * * This program 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: MilfordInstruments.c,v $ * Revision 1.7 2004/01/30 20:57:55 reinelt * HD44780 patch from Martin Hejl * dmalloc integrated * * Revision 1.6 2004/01/29 04:40:02 reinelt * every .c file includes "config.h" now * * Revision 1.5 2004/01/09 04:16:06 reinelt * added 'section' argument to cfg_get(), but NULLed it on all calls by now. * * Revision 1.4 2004/01/06 22:33:13 reinelt * Copyright statements cleaned up * * Revision 1.3 2003/10/08 13:39:53 andy-b * Cleaned up code in MilfordInstruments.c, and added descriptions for other display sizes (untested) * * Revision 1.1 2003/09/29 06:58:36 reinelt * new driver for Milford Instruments MI420 by Andy Baxter * */ /* * * exported fuctions: * * struct LCD MilfordInstruments[] * */ #include "config.h" #include #include #include #include #include #include #include #include "debug.h" #include "cfg.h" #include "lock.h" #include "display.h" #include "bar.h" #include "icon.h" #ifdef WITH_DMALLOC #include #endif #define XRES 5 #define YRES 8 #define CHARS 8 static LCD Lcd; static char *Port=NULL; static speed_t Speed; static int Device=-1; static int Icons; static char *FrameBuffer1=NULL; static char *FrameBuffer2=NULL; static int MI_open (void) { int fd; pid_t pid; struct termios portset; if ((pid=lock_port(Port))!=0) { if (pid==-1) error ("MilfordInstruments: port %s could not be locked", Port); else error ("MilfordInstruments: port %s is locked by process %d", Port, pid); return -1; } fd = open(Port, O_RDWR | O_NOCTTY | O_NDELAY); if (fd==-1) { error ("MilfordInstruments: open(%s) failed: %s", Port, strerror(errno)); unlock_port(Port); return -1; } if (tcgetattr(fd, &portset)==-1) { error ("MilfordInstruments: tcgetattr(%s) failed: %s", Port, strerror(errno)); unlock_port(Port); return -1; } cfmakeraw(&portset); cfsetospeed(&portset, Speed); if (tcsetattr(fd, TCSANOW, &portset)==-1) { error ("MilfordInstruments: tcsetattr(%s) failed: %s", Port, strerror(errno)); unlock_port(Port); return -1; } return fd; } static void MI_write (char *string, int len) { if (Device==-1) return; if (write (Device, string, len)==-1) { if (errno==EAGAIN) { usleep(1000); if (write (Device, string, len)>=0) return; } error ("MilfordInstruments: write(%s) failed: %s", Port, strerror(errno)); } } static void MI_define_char (int ascii, char *buffer) { char cmd[2]="\376x"; if (ascii<8) { cmd[1]=(char)(64+ascii*8); MI_write (cmd, 2); MI_write (buffer, 8); } } static int MI_clear (int full) { memset (FrameBuffer1, ' ', Lcd.rows*Lcd.cols*sizeof(char)); icon_clear(); bar_clear(); if (full) { memset (FrameBuffer2, ' ', Lcd.rows*Lcd.cols*sizeof(char)); MI_write ("\376\001", 2); //
# Sweden - Bergshamra/Vaxtuna
[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 490000000
	BANDWIDTH_HZ = 8000000

[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 642000000
	BANDWIDTH_HZ = 8000000

[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 754000000
	BANDWIDTH_HZ = 8000000

[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 706000000
	BANDWIDTH_HZ = 8000000

[CHANNEL]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 594000000
	BANDWIDTH_HZ = 8000000

[CHANNEL]
	DELIVERY_SYSTEM = DVBT2
	FREQUENCY = 618000000
	BANDWIDTH_HZ = 8000000

[CHANNEL]
	DELIVERY_SYSTEM = DVBT2
	FREQUENCY = 730000000
	BANDWIDTH_HZ = 8000000