/* $Id$ * $URL$ * * LED matrix driver for LCD4Linux * (see http://www.harbaum.org/till/ledmatrix for hardware) * * Copyright (C) 2006 Till Harbaum * * 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_LEDMatrix * */ /* * Options: * IPAddress */ #include "config.h" #include #include #include #include #include #include #include #include /* include network specific headers */ #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_graphic.h" /* display command bytes */ #define DSP_CMD_ECHO 0 #define DSP_CMD_NOP 1 #define DSP_CMD_IMAGE 2 #define DSP_CMD_ACK 3 #define DSP_CMD_IR 4 #define DSP_CMD_BEEP 5 #define DSP_DEFAULT_PORT 4711 #define DSP_MEM (80 * 32 * 2 / 8) #define DEFAULT_X_OFFSET 1 /* with a font width of 6 */ static char Name[] = "LEDMatrix"; static char *IPAddress = NULL; static int sock = -1; static struct sockaddr_in dsp_addr; static unsigned char tx_buffer[DSP_MEM + 1]; static int port = DSP_DEFAULT_PORT; static void drv_LEDMatrix_blit(const int row, const int col, const int height, const int width) { int r, c, i; fd_set rfds; struct timeval tv; unsigned char reply[256]; struct sockaddr_in cli_addr; socklen_t fromlen; int ack = 0; int timeout = 10; for (r = row; r < row + height; r++) { for (c = col; c < col + width; c++) { /* LEDMATRIX supports three colors: 10b == green, 01b == red, 11b == amber */ unsigned char color = 0; RGBA p = drv_generic_graphic_rgb(r, c); if (p.G >= 128) color |= 0x80; if (p.R >= 128) color |= 0x40; /* ignore blue ... */ tx_buffer[1 + 20 * r + c / 4] &= ~(0xc0 >> (2 * (c & 3))); tx_buffer[1 + 20 * r + c / 4] |= color >> (2 * (c & 3)); } } /* scan entire display */ tx_buffer[0] = DSP_CMD_IMAGE; do { if ((sendto(sock, tx_buffer, DSP_MEM + 1, 0, (struct sockaddr *) &dsp_addr, sizeof(dsp_addr))) != DSP_MEM + 1) error("%s: sendto error on socket", Name); /* now wait for reply */ FD_ZERO(&rfds); FD_SET(sock, &rfds); tv.tv_sec = 0; tv.tv_usec = 100000; /* wait 1 sec for ack */ if ((i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv)) < 0) { info("%s: Select error: %s", Name, strerror(errno)); } if (FD_ISSET(sock, &rfds)) { /* wait for ack */ fromlen = sizeof(dsp_addr); i = recvfrom(sock, reply, sizeof(reply), 0, (struct sockaddr *) &cli_addr, &fromlen); if (i < 0) { info("%s: Receive error: %s", Name, strerror(errno));
# Epinal - France (DVB-T transmitter of Epinal ( BoisdelaVierge ) )
# Epinal - France (signal DVB-T transmis depuis l'émetteur de BoisdelaVierge )
#
# 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
#### Epinal - BoisdelaVierge ####
#R1
T 602000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R2
T 682000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R3
T 698000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R4
T 754000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R5
T 802000000 8MHz AUTO NONE QAM64 8k AUTO NONE
#R6
T 778000000 8MHz AUTO NONE QAM64 8k AUTO NONE