/* $Id: drv_Trefon.c,v 1.3 2005/05/08 04:32:44 reinelt Exp $ * * driver for TREFON USB LCD displays * * Copyright (C) 2005 Michael Reinelt * 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. * * * $Log: drv_Trefon.c,v $ * Revision 1.3 2005/05/08 04:32:44 reinelt * CodingStyle added and applied * * Revision 1.2 2005/04/24 05:27:09 reinelt * Trefon Backlight added * * Revision 1.1 2005/04/24 04:33:46 reinelt * driver for TREFON USB LCD's added * */ /* * * exported fuctions: * * struct DRIVER drv_Trefon * */ #include "config.h" #include #include #include #include #include #include #include #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 "drv_generic_text.h" #define LCD_USB_VENDOR 0xfff0 #define LCD_USB_DEVICE 0xfffe #define PKT_START 0x02 #define PKT_BACKLIGHT 0x01 #define PKT_DATA 0x02 #define PKT_CTRL 0x06 #define PKT_END 0xff static char Name[] = "TREFON"; static usb_dev_handle *lcd; static int interface; extern int usb_debug; extern int got_signal; /****************************************/ /*** hardware dependant functions ***/ /****************************************/ static int drv_TF_open(void) { struct usb_bus *busses, *bus; struct usb_device *dev; lcd = NULL; info("%s: scanning USB for TREFON LCD...", Name); usb_debug = 0; usb_init(); usb_find_busses(); usb_find_devices(); busses = usb_get_busses(); for (bus = busses; bus; bus = bus->next) { for (dev = bus->devices; dev; dev = dev->next) { if ((dev->descriptor.idVendor == LCD_USB_VENDOR) && (dev->descriptor.idProduct == LCD_USB_DEVICE)) { info("%s: found TREFON USB LCD on bus %s device %s", Name, bus->dirname, dev->filename); lcd = usb_open(dev); if (usb_set_configuration(lcd, 1) < 0) { error("%s: usb_set_configuration() failed!", Name); return -1; } interface = 0; if (usb_claim_interface(lcd, interface) < 0) { error("%s: usb_claim_interface() failed!", Name); return -1; } return 0; } } } return -1; } static int drv_TF_close(void) { usb_release_interface(lcd, interface); usb_close(lcd); return 0; } static void drv_TF_send(char *data, int size) { char buffer[64]; /*
# 2014-04-18 Antti Palosaari <crope@iki.fi>
# generated from http://www.digita.fi/kuluttajat/tv/nakyvyysalueet/kanavanumerot_ja_taajuudet

[Inari]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 690000000
	BANDWIDTH_HZ = 8000000

[Inari]
	DELIVERY_SYSTEM = DVBT
	FREQUENCY = 506000000
	BANDWIDTH_HZ = 8000000
v_Trefon = { name:Name, list:drv_TF_list, init:drv_TF_init, quit:drv_TF_quit, };