diff -Nur lcdproc-0.4.5_orig/acconfig.h lcdproc-0.4.5/acconfig.h --- lcdproc-0.4.5_orig/acconfig.h 2004-03-14 16:50:22.000000000 +0100 +++ lcdproc-0.4.5/acconfig.h 2005-01-15 01:37:12.000000000 +0100 @@ -66,6 +66,8 @@ #undef SED1520_DRV +#undef SED1530_DRV + #undef SGX120_DRV #undef STV5730_DRV diff -Nur lcdproc-0.4.5_orig/acinclude.m4 lcdproc-0.4.5/acinclude.m4 --- lcdproc-0.4.5_orig/acinclude.m4 2004-03-14 16:50:22.000000000 +0100 +++ lcdproc-0.4.5/acinclude.m4 2005-01-15 01:37:18.000000000 +0100 @@ -7,14 +7,14 @@ [ Possible choices are:] [ mtxorb,cfontz,cwlnx,curses,text,lb216,] [ hd44780,joy,irman,lircin,bayrad,glk,] - [ stv5730,sed1330,sed1520,svgalib,lcdm001,] + [ stv5730,sed1330,sed1520,sed1530,svgalib,lcdm001,] [ t6963,wirz-sli,sgx120] [ \"all\" compiles all drivers], drivers="$enableval", drivers=[lcdm001,mtxorb,cfontz,cwlnx,curses,text,lb216,bayrad,glk,sgx120]) if test "$drivers" = "all"; then - drivers=[mtxorb,cfontz,cwlnx,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1330,sed1520,svgalib,lcdm001,t6963,wirz-sli,sgx120] + drivers=[mtxorb,cfontz,cwlnx,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1330,sed1520,sed1530,svgalib,lcdm001,t6963,wirz-sli,sgx120] fi drivers=`echo $drivers | sed 's/,/ /g'` @@ -187,6 +187,16 @@ AC_MSG_WARN([The sed1520 driver needs a parallel port.]) fi ;; + sed1530) + if test "$ac_cv_port_have_lpt" = yes + then + DRIVERS="$DRIVERS sed1530.o" + AC_DEFINE(SED1530_DRV) + actdrivers=["$actdrivers sed1530"] + else + AC_MSG_WARN([The sed1530 driver needs a parallel port.]) + fi + ;; stv5730) if test "$ac_cv_port_have_lpt" = yes then diff -Nur lcdproc-0.4.5_orig/aclocal.m4 lcdproc-0.4.5/aclocal.m4 --- lcdproc-0.4.5_orig/aclocal.m4 2004-04-13 22:54:30.000000000 +0200 +++ lcdproc-0.4.5/aclocal.m4 2005-01-15 01:37:24.000000000 +0100 @@ -19,14 +19,14 @@ [ Possible choices are:] [ mtxorb,cfontz,cwlnx,curses,text,lb216,] [ hd44780,joy,irman,lircin,bayrad,glk,] - [ stv5730,sed1330,sed1520,svgalib,lcdm001,] + [ stv5730,sed1330,sed1520,sed1530,svgalib,lcdm001,] [ t6963,wirz-sli,sgx120] [ \"all\" compiles all drivers], drivers="$enableval", drivers=[lcdm001,mtxorb,cfontz,cwlnx,curses,text,lb216,bayrad,glk,sgx120]) if test "$drivers" = "all"; then - drivers=[mtxorb,cfontz,cwlnx,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1330,sed1520,svgalib,lcdm001,t6963,wirz-sli,sgx120] + drivers=[mtxorb,cfontz,cwlnx,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1330,sed1520,sed1530,svgalib,lcdm001,t6963,wirz-sli,sgx120] fi drivers=`echo $drivers | sed 's/,/ /g'` @@ -199,6 +199,16 @@ AC_MSG_WARN([The sed1520 driver needs a parallel port.]) fi ;; + sed1530) + if test "$ac_cv_port_have_lpt" = yes + then + DRIVERS="$DRIVERS sed1530.o" + AC_DEFINE(SED1530_DRV) + actdrivers=["$actdrivers sed1530"] + else + AC_MSG_WARN([The sed1530 driver needs a parallel port.]) + fi + ;; stv5730) if test "$ac_cv_port_have_lpt" = yes then diff -Nur lcdproc-0.4.5_orig/configure lcdproc-0.4.5/configure --- lcdproc-0.4.5_orig/configure 2004-04-13 22:54:35.000000000 +0200 +++ lcdproc-0.4.5/configure 2005-01-15 01:37:31.000000000 +0100 @@ -31,7 +31,7 @@ Possible choices are: mtxorb,cfontz,cwlnx,curses,text,lb216, hd44780,joy,irman,lircin,bayrad,glk, - stv5730,sed1330,sed1520,svgalib,lcdm001, + stv5730,sed1330,sed1520,sed1530,svgalib,lcdm001, t6963,wirz-sli,sgx120 \"all\" compiles all drivers" @@ -3861,7 +3861,7 @@ if test "$drivers" = "all"; then - drivers=mtxorb,cfontz,cwlnx,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1330,sed1520,svgalib,lcdm001,t6963,wirz-sli,sgx120 + drivers=mtxorb,cfontz,cwlnx,curses,text,lb216,hd44780,joy,irman,lircin,bayrad,glk,stv5730,sed1330,sed1520,sed1530,svgalib,lcdm001,t6963,wirz-sli,sgx120 fi drivers=`echo $drivers | sed 's/,/ /g'` @@ -4490,6 +4490,19 @@ echo "configure: warning: The sed1520 driver needs a parallel port." 1>&2 fi ;; + sed1530) + if test "$ac_cv_port_have_lpt" = yes + then + DRIVERS="$DRIVERS sed1530.o" + cat >> confdefs.h <<\EOF +#define SED1530_DRV 1 +EOF + + actdrivers="$actdrivers sed1530" + else + echo "configure: warning: The sed1530 driver needs a parallel port." 1>&2 + fi + ;; stv5730) if test "$ac_cv_port_have_lpt" = yes then diff -Nur lcdproc-0.4.5_orig/LCDd.conf lcdproc-0.4.5/LCDd.conf --- lcdproc-0.4.5_orig/LCDd.conf 2004-03-14 16:50:22.000000000 +0100 +++ lcdproc-0.4.5/LCDd.conf 2005-01-15 15:15:04.000000000 +0100 @@ -40,7 +40,8 @@ [server] # Server section with all kinds of settings for the LCDd server -Driver=none +#Driver=none +Driver=SED1530 #Driver=curses #Driver=HD44780 #Driver=lcdm001 @@ -483,6 +484,18 @@ Port=0x378 # Port where the LPT is. Usual values are 0x278, 0x378 and 0x3BC +[SED1530] +# Seiko Epson 1530 driver +# connected to the parallel port but using serial data/command transfer + +Port=0x378 +# Port where the LPT is. Usual values are 0x278, 0x378 and 0x3BC + +contrast=12 +# sets the display contrast - use a value between 0 and 31 + +reverse=0 +# if reverse=1, the display uses reverse mode [stv5730] # stv5730 driver diff -Nur lcdproc-0.4.5_orig/server/drivers/lcd.c lcdproc-0.4.5/server/drivers/lcd.c --- lcdproc-0.4.5_orig/server/drivers/lcd.c 2004-03-14 16:50:25.000000000 +0100 +++ lcdproc-0.4.5/server/drivers/lcd.c 2005-01-15 01:36:25.000000000 +0100 @@ -131,6 +131,10 @@ #include "sed1520.h" #endif +#ifdef SED1530_DRV +#include "sed1530.h" +#endif + #ifdef STV5730_DRV #include "stv5730.h" #endif @@ -230,6 +234,9 @@ #ifdef SED1520_DRV {"sed1520", sed1520_init,}, #endif +#ifdef SED1530_DRV + {"sed1530", sed1530_init,}, +#endif #ifdef STV5730_DRV {"stv5730", stv5730_init,}, #endif diff -Nur lcdproc-0.4.5_orig/server/drivers/sed1530.c lcdproc-0.4.5/server/drivers/sed1530.c --- lcdproc-0.4.5_orig/server/drivers/sed1530.c 1970-01-01 01:00:00.000000000 +0100 +++ lcdproc-0.4.5/server/drivers/sed1530.c 2005-01-15 15:24:03.000000000 +0100 @@ -0,0 +1,568 @@ +////////////////////////////////////////////////////////////////////////// +// This is a driver for 96x32 pixel graphic displays based on the // +// SED1530 Controller connected to the parallel port. Check // +// www.absorb.it/hacked/sed1530 // +// for more information // +// This Controller has no built in character generator. Therefore all // +// fonts and pixels are generated by this driver. // +// // +// This driver is based on sed1520.c Thanks to Robin Adams for his // +// work. My part was mainly to copy and paste the right codes and // +// changed the data transfer to serial over parallel. // +// The HD44780 font in sed1530fm.c is copyd from sed1520fm.c and was // +// originated by Michael Reinelt / lcd4linux and is (C) 2000 by him. // +// // +// [sed1520.c 2001,2002 Robin Adams ( robin@adams-online.de )] // +// sed1530.c 2005 Rene Ejury (just at absorb.it) // +// This driver is released under the GPL. See file COPYING in this // +// package for further details. // +////////////////////////////////////////////////////////////////////////// + +#include +#include +#include +#include +#include +#include +#include +#include +#include "shared/report.h" +#include "configfile.h" +#include "port.h" +#include "timing.h" +#define uPause timing_uPause +#include "sed1530fm.c" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifndef LPTPORT +#define LPTPORT 0x378 +#endif + +///////////////////////////////////////////////////////////////// +// serial mode: +// the board made by pollin electronic uses serial transfer +// over parallel port +// lpt lcd +// DATA0 SI serial data input +// DATA1 SCL serial clock input +// DATA2 A0 0 - control data / 1 - display data +// DATA3 CS chipselect / enable input/output with 1 == CS2 +// DATA4 /CS chipselect / enable input/output with 0 == CS1 +// DATA5 /RES 0 - reset +// +// serial data is read when SCl goes high; chipUNselect resets shift register + +#define SI 0x01 +#define SCL 0x02 +#define A0 0x04 +#define CS2 0x08 +#define CS1 0x10 +#define RES 0x20 + +#include "shared/str.h" +#include "lcd.h" +#include "sed1530.h" + + + +unsigned int sed1530_lptport; + + +lcd_logical_driver *sed1530; + +void +sed1530_write_byte (int value) +{ + port_out ( sed1530_lptport, (value)); + port_out ( sed1530_lptport, (value + SCL)); +} + + +///////////////////////////////////////////////////////////////// +// writes command value to the sed1530 +// +void +sed1530_writecommand (int value) +{ + int i; + for (i = 7; i >= 0; i--) + sed1530_write_byte(((value >>i)&0x01) + CS2 + RES); +} + +///////////////////////////////////////////////////////////////// +// writes data values (for the lower two lines) to the sed1530 +// +void +sed1530_writedata (int value) +{ + int i; + for (i = 7; i >= 0; i--) + sed1530_write_byte(((value >>i)&0x01) + A0 + CS2 + RES); +} + +///////////////////////////////////////////////////////////////// +// writes data value (for the upper two lines) to the sed1530 +// +void +sed1530_writedata_rev (int value) +{ + int i; + for (i = 0; i <= 7; i++) + sed1530_write_byte(((value >>i)&0x01) + A0 + CS2 + RES); +} + +///////////////////////////////////////////////////////////////// +// selects a page (=row) on sed1530 +// +void +sed1530_selectpage (int page) +{ + int value = 0xB0 + (page & 3); + sed1530_writecommand (value); +} + +///////////////////////////////////////////////////////////////// +// selects a column on the sed1530 +// +void +sed1530_selectcolumn (int column) +{ + sed1530_writecommand (column & 0x0F); + sed1530_writecommand (0x10 + ((column & 0xF0)>>4)); +} + +///////////////////////////////////////////////////////////////// +// draws char z from fontmap_1530 to the framebuffer at position +// x,y. These are zero-based textmode positions. +// The fontmap_1530 is stored in rows while the framebuffer is stored +// in columns, so we need a little conversion. +// +void +sed1530_drawchar2fb (int x, int y, unsigned char z) +{ + int i, j, k; + + if (x < 0 || x > 19 || y < 0 || y > 3) + return; + + for (i = 6; i > 0; i--) + { + k = 0; + for (j = 0; j < 7; j++) + { + k = k + + (((fontmap_1530[(int) z][j] * 2) & (1 << i)) / (1 << i)) * + (1 << j); + } + sed1530->framebuf[(y * 96) + (x * 6) + (6 - i)] = k; + } + +} + +///////////////////////////////////////////////////////////////// +// This initialises the stuff. We support supplying port as +// a configfile option. +// +int +sed1530_init (struct lcd_logical_driver *driver, char *args) +{ + + sed1530 = driver; + + #define DriverName "sed1530" + + // Port + sed1530_lptport = config_get_int( DriverName, "port", 0, LPTPORT ); + report( RPT_INFO, "SED1530: using port 0x%x", sed1530_lptport); + unsigned int contrast= config_get_int( DriverName, "contrast", 0, 0x0b ); + report( RPT_INFO, "SED1530: set display contrast 0x%x", contrast); + unsigned int reverse = config_get_int( DriverName, "reverse", 0, 0); + if (reverse) report( RPT_INFO, "SED1530: activating reverse display"); + + driver->wid = 16; // display has 96x32 pixel + driver->hgt = 4; + + if (timing_init() == -1) + return -1; + + // Initialize the Port and the sed1530 + if(port_access(sed1530_lptport)) return -1; + if(port_access(sed1530_lptport+2)) return -1; + + sed1530_write_byte(0x00); // RESET + + // Initialisation sequence + sed1530_writecommand (0x40); // start display line = 0 + sed1530_writecommand (0xa1); // adc = invers + sed1530_writecommand (0xa3); // lcd-bias = 1/6 + sed1530_writecommand (0xc0); // OutputStatus = 0 + sed1530_writecommand (0x2f); // lcd-power-control on + + // set display contrast + sed1530_writecommand (0x80|(contrast&0x1F)); + + sed1530_writecommand (0xa4); // test off + sed1530_writecommand (0xaf); // display on + + // set reverse mode + sed1530_writecommand (0xa6|reverse); + + sed1530_selectpage (3); + + driver->cellwid = 6; + driver->cellhgt = 8; + + // The Framebuffer LCDproc allocates by default is maybe too small, + // so we free() it (if it exists) and allocate one of adequate size. + if (!driver->framebuf) + free (driver->framebuf); + + driver->framebuf = malloc (96 * 4 * 2); + if (!driver->framebuf) + { + sed1530_close (); + return -1; + } + + // clear screen + sed1530_clear(); + + driver->clear = sed1530_clear; + driver->string = sed1530_string; + driver->chr = sed1530_chr; + driver->vbar = sed1530_vbar; + driver->hbar = sed1530_hbar; + driver->num = sed1530_num; + driver->init = sed1530_init; + driver->close = sed1530_close; + driver->flush = sed1530_flush; + driver->flush_box = sed1530_flush_box; + driver->set_char = sed1530_set_char; + + driver->icon = sed1530_icon; + driver->draw_frame = sed1530_draw_frame; + driver->heartbeat = sed1530_heartbeat; + + return 200; // 200 is arbitrary. (must be 1 or more) +} + +///////////////////////////////////////////////////////////////// +// Frees the frambuffer and exits the driver. +// +void +sed1530_close () +{ + if (sed1530->framebuf != NULL) + free (sed1530->framebuf); + sed1530->framebuf = NULL; +} + +///////////////////////////////////////////////////////////////// +// Clears the LCD screen +// +void +sed1530_clear () +{ + memset (sed1530->framebuf, 0, 384); +} + +///////////////////////////////////////////////////////////////// +// +// Flushes all output to the lcd... +// +void +sed1530_flush () +{ + sed1530->draw_frame (sed1530->framebuf); +} + +///////////////////////////////////////////////////////////////// +// Prints a string on the lc display, at position (x,y). The +// upper-left is (1,1), and the lower right should be (16,4). +// +void +sed1530_string (int x, int y, char string[]) +{ + int i; + x--; // Convert 1-based coords to 0-based... + y--; + + for (i = 0; string[i]; i++) + { + sed1530_drawchar2fb (x + i, y, string[i]); + } +} + +///////////////////////////////////////////////////////////////// +// Writes char c at position x,y into the framebuffer. +// x and y are 1-based textmode coordinates. +// +void +sed1530_chr (int x, int y, char c) +{ + y--; + x--; + sed1530_drawchar2fb (x, y, c); +} + +///////////////////////////////////////////////////////////////// +// This function draws a number num into the last 3 rows of the +// framebuffer at 1-based position x. It should draw a 4-row font, +// but methinks this would look a little stretched. When +// num=10 a colon is drawn. +// FIXME: make big numbers use less memory +// +void +sed1530_num (int x, int num) +{ + int z, c, i, s; + x--; + + if (x < 0 || x > 15 || num < 0 || num > 10) + return; + if (num != 10 && (x < 0 || x > 13)) + return; + if (num == 10 && (x < 0 || x > 16)) + return; + + if (num == 10) + { // Doppelpunkt + for (z = 0; z < 3; z++) + { // Zeilen a 8 Punkte + for (c = 0; c < 6; c++) + { // 6 Spalten + s = 0; + for (i = 0; i < 8; i++) + { // 8 bits aus zeilen + s >>= 1; + if (*(fontbigdp[(z * 8) + i] + c) == '.') + s += 128; + } + sed1530->framebuf[(z * 96) + 96 + (x * 6) + c] = s; + } + } + } + else + { + + for (z = 0; z < 3; z++) + { // Zeilen a 8 Punkte + for (c = 0; c < 18; c++) + { // 18 Spalten + s = 0; + for (i = 0; i < 8; i++) + { // 8 bits aus zeilen + s >>= 1; + if (*(fontbignum[num][z * 8 + i] + c) == '.') + s += 128; + } + sed1530->framebuf[(z * 96) + 96 + (x * 6) + c] = s; + } + } + } +} + + +///////////////////////////////////////////////////////////////// +// Changes the font of character n to a pattern given by *dat. +// HD44780 Controllers only posses 8 programmable chars. But +// we store the fontmap_1530 completely in RAM, so every character +// can be altered. !Important: Characters have to be redraw +// by sed1530_drawchar2fb() to show their new shape. Because we use +// a non-standard 6x8 font a *dat not calculated from +// sed1530->cellwid and sed1530->cellhgt will fail. +// +void +sed1530_set_char (int n, char *dat) +{ + + int row, col, i; + if (n < 0 || n > 255) + return; + if (!dat) + return; + for (row = 0; row < 8; row++) + { + i = 0; + for (col = 0; col < 6; col++) + { + i <<= 1; + i |= (dat[(row * 6) + col] > 0); + } + fontmap_1530[n][row] = i; + } +} + + +///////////////////////////////////////////////////////////////// +// Draws a vertical from the bottom up to the last 3 rows of the +// framebuffer at 1-based position x. len is given in pixels. +// +void +sed1530_vbar (int x, int len) +{ + int i, j, k; + x--; + + + for (j = 0; j < 3; j++) + { + i = 0; + k = 0; + for (i = 0; i < 8; i++) + { + if (len > i) + k += 1 << (7 - i); + } + + sed1530->framebuf[((3 - j) * 96) + (x * 6)] = 0; + sed1530->framebuf[((3 - j) * 96) + (x * 6) + 1] = 0; + sed1530->framebuf[((3 - j) * 96) + (x * 6) + 2] = k; + sed1530->framebuf[((3 - j) * 96) + (x * 6) + 3] = k; + sed1530->framebuf[((3 - j) * 96) + (x * 6) + 4] = k; + sed1530->framebuf[((3 - j) * 96) + (x * 6) + 5] = 0; + len -= 8; + } + +} + + +///////////////////////////////////////////////////////////////// +// Draws a horizontal bar from left to right at 1-based position +// x,y into the framebuffer. len is given in pixels. +// +void +sed1530_hbar (int x, int y, int len) +{ + int i; + x--; + y--; + + if (y < 0 || y > 3 || x < 0 || len < 0 || (x + (len / 6)) > 19) + return; + + for (i = 0; i < len; i++) + sed1530->framebuf[(y * 96) + (x * 6) + i] = 0x3C; +} + +///////////////////////////////////////////////////////////////// +// Reprogrammes character dest to contain an icon given by +// which. Calls set_char() to do this. +// +void +sed1530_icon (int which, char dest) +{ + char icons[3][6 * 8] = { + { + 1, 1, 1, 1, 1, 1, // Empty Heart + 1, 0, 1, 0, 1, 1, + 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 1, + 1, 0, 0, 0, 1, 1, + 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1,} + , + { + 1, 1, 1, 1, 1, 1, // Filled Heart + 1, 0, 1, 0, 1, 1, + 0, 1, 0, 1, 0, 1, + 0, 1, 1, 1, 0, 1, + 0, 1, 1, 1, 0, 1, + 1, 0, 1, 0, 1, 1, + 1, 1, 0, 1, 1, 1, + 1, 1, 1, 1, 1, 1,} + , + { + 0, 0, 0, 0, 0, 0, // Ellipsis + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, + 1, 0, 1, 0, 1, 0,} + , + }; + sed1530_set_char (dest, &icons[which][0]); +} + +///////////////////////////////////////////////////////////////// +// Send a rectangular area from lft,top to rgt,bot to the display +// These coordinates are probably one-based, too. It's so fast to +// flush the whole display that it makes no sense to flush less then +// the whole display. Therefore this function redraws the whole +// display. +// FIXME: Check if this function is worth implementing. +// +void +sed1530_flush_box (int lft, int top, int rgt, int bot) +{ + sed1530_flush (); +} + +///////////////////////////////////////////////////////////////// +// Outputs the whole framebuffer *dat to the display. This Display +// contains 2 Controllers, each of them controlling one half of the +// screen. +// +void +sed1530_draw_frame (char *dat) +{ +//~ report( RPT_INFO, "SED1530: draw_frame"); + int i, j; + if (!dat) + return; + + // Did the framebuffer change ? If not, do nothing. + // Saves A LOT of CPU time. IO and delays are costly. + + if(memcmp(dat,(dat+384),384)==0) return; + memcpy((dat+384),dat,384); + + for (i = 0; i < 2; i++) // for unknown reasons the first row of my panel is flipped + { + sed1530_selectpage (i); + sed1530_selectcolumn (18) ; + for (j = 0; j < 97; j++) + sed1530_writedata_rev (dat[j + 96 - (i * 96)]); + } + for (i = 2; i < 4; i++) + { + sed1530_selectpage (i); + sed1530_selectcolumn (18) ; + for (j = 0; j < 97; j++) + sed1530_writedata (dat[j + (i * 96)]); + } +} + +///////////////////////////////////////////////////////////// +// Does the heartbeat... +// +void +sed1530_heartbeat( int type ) +{ + static int timer = 0; + int whichIcon; + int j; + + char heartdata[2][6] = { + { 0x63, 0x41, 0x03, 0x41, 0x63, 0x7F }, + { 0x63, 0x5D, 0x3B, 0x5D, 0x63, 0x7F }, + }; + + whichIcon = (! ((timer + 4) & 5)); + + sed1530_selectpage (0); + sed1530_selectcolumn (114) ; + for (j = 0; j < 6; j++) { + + sed1530_writedata_rev (heartdata[whichIcon][j]); + sed1530->framebuf[90+j]=heartdata[whichIcon][j]; + sed1530->framebuf[90+384+j]=heartdata[whichIcon][j]; + } + timer++; +} diff -Nur lcdproc-0.4.5_orig/server/drivers/sed1530fm.c lcdproc-0.4.5/server/drivers/sed1530fm.c --- lcdproc-0.4.5_orig/server/drivers/sed1530fm.c 1970-01-01 01:00:00.000000000 +0100 +++ lcdproc-0.4.5/server/drivers/sed1530fm.c 2005-01-15 15:23:58.000000000 +0100 @@ -0,0 +1,1117 @@ +////////////////////////////////////////////////////////////////////////// +// This file contains a HD44780 font and a font for big numbers. // +// The HD44780 font in this file was shamelessly stolen from // +// Michael Reinelt / lcd4linux and is // +// Copyright 1999, 2000 by Michael Reinelt (reinelt@eunet.at) // +// The rest of this file is // +// // +// (C) 2001 Robin Adams ( robin@adams-online.de ) // +// // +// This file is released under the GPL. See file COPYING in this // +// package for further details. // +////////////////////////////////////////////////////////////////////////// + +#define b______ 0x00 +#define b_____O 0x01 +#define b____O_ 0x02 +#define b____OO 0x03 +#define b___O__ 0x04 +#define b___O_O 0x05 +#define b___OO_ 0x06 +#define b___OOO 0x07 +#define b__O___ 0x08 +#define b__O__O 0x09 +#define b__O_O_ 0x0a +#define b__O_OO 0x0b +#define b__OO__ 0x0c +#define b__OO_O 0x0d +#define b__OOO_ 0x0e +#define b__OOOO 0x0f +#define b_O____ 0x10 +#define b_O___O 0x11 +#define b_O__O_ 0x12 +#define b_O__OO 0x13 +#define b_O_O__ 0x14 +#define b_O_O_O 0x15 +#define b_O_OO_ 0x16 +#define b_O_OOO 0x17 +#define b_OO___ 0x18 +#define b_OO__O 0x19 +#define b_OO_O_ 0x1a +#define b_OO_OO 0x1b +#define b_OOO__ 0x1c +#define b_OOO_O 0x1d +#define b_OOOO_ 0x1e +#define b_OOOOO 0x1f +#define b_OOOOO 0x1f +#define bOOOOOO 0x3f + +unsigned char fontmap_1530[256][8] = { + [0x20] {b______, + b______, + b______, + b______, + b______, + b______, + b______, + b______}, + [0x21] {b___O__, + b___O__, + b___O__, + b___O__, + b______, + b______, + b___O__, + b______}, + [0x22] {b__O_O_, + b__O_O_, + b__O_O_, + b______, + b______, + b______, + b______, + b______}, + [0x23] {b__O_O_, + b__O_O_, + b_OOOOO, + b__O_O_, + b_OOOOO, + b__O_O_, + b__O_O_, + b______}, + [0x24] {b___O__, + b__OOOO, + b_O_O__, + b__OOO_, + b___O_O, + b_OOOO_, + b___O__, + b______}, + [0x25] {b_OO___, + b_OO__O, + b____O_, + b___O__, + b__O___, + b_O__OO, + b____OO, + b______}, + [0x26] {b__OO__, + b_O__O_, + b_O_O__, + b__O___, + b_O_O_O, + b_O__O_, + b__OO_O, + b______}, + [0x27] {b__OO__, + b___O__, + b__O___, + b______, + b______, + b______, + b______, + b______}, + [0x28] {b____O_, + b___O__, + b__O___, + b__O___, + b__O___, + b___O__, + b____O_, + b______}, + [0x29] {b__O___, + b___O__, + b____O_, + b____O_, + b____O_, + b___O__, + b__O___, + b______}, + [0x2a] {b______, + b___O__, + b_O_O_O, + b__OOO_, + b_O_O_O, + b___O__, + b______, + b______}, + [0x2b] {b______, + b___O__, + b___O__, + b_OOOOO, + b___O__, + b___O__, + b______, + b______}, + [0x2c] {b______, + b______, + b______, + b______, + b__OO__, + b___O__, + b__O___, + b______}, + [0x2d] {b______, + b______, + b______, + b_OOOOO, + b______, + b______, + b______, + b______}, + [0x2e] {b______, + b______, + b______, + b______, + b______, + b__OO__, + b__OO__, + b______}, + [0x2f] {b______, + b_____O, + b____O_, + b___O__, + b__O___, + b_O____, + b______, + b______}, + [0x30] {b__OOO_, + b_O___O, + b_O__OO, + b_O_O_O, + b_OO__O, + b_O___O, + b__OOO_, + b______}, + [0x31] {b___O__, + b__OO__, + b___O__, + b___O__, + b___O__, + b___O__, + b__OOO_, + b______}, + [0x32] {b__OOO_, + b_O___O, + b_____O, + b____O_, + b___O__, + b__O___, + b_OOOOO, + b______}, + [0x33] {b_OOOOO, + b____O_, + b___O__, + b____O_, + b_____O, + b_O___O, + b__OOO_, + b______}, + [0x34] {b____O_, + b___OO_, + b__O_O_, + b_O__O_, + b_OOOOO, + b____O_, + b____O_, + b______}, + [0x35] {b_OOOOO, + b_O____, + b_O____, + b_OOOO_, + b_____O, + b_O___O, + b__OOO_, + b______}, + [0x36] {b___OO_, + b__O___, + b_O____, + b_OOOO_, + b_O___O, + b_O___O, + b__OOO_, + b______}, + [0x37] {b_OOOOO, + b_____O, + b____O_, + b___O__, + b__O___, + b__O___, + b__O___, + b______}, + [0x38] {b__OOO_, + b_O___O, + b_O___O, + b__OOO_, + b_O___O, + b_O___O, + b__OOO_, + b______}, + [0x39] {b__OOO_, + b_O___O, + b_O___O, + b__OOOO, + b_____O, + b____O_, + b__OO__, + b______}, + [0x3a] {b______, + b__OO__, + b__OO__, + b______, + b__OO__, + b__OO__, + b______, + b______}, + [0x3b] {b______, + b__OO__, + b__OO__, + b______, + b__OO__, + b___O__, + b__O___, + b______}, + [0x3c] {b____O_, + b___O__, + b__O___, + b_O____, + b__O___, + b___O__, + b____O_, + b______}, + [0x3d] {b______, + b______, + b_OOOOO, + b______, + b_OOOOO, + b______, + b______, + b______}, + [0x3e] {b_O____, + b__O___, + b___O__, + b____O_, + b___O__, + b__O___, + b_O____, + b______}, + [0x3f] {b__OOO_, + b_O___O, + b_____O, + b____O_, + b___O__, + b______, + b___O__, + b______}, + [0x40] {b__OOO_, + b_O___O, + b_____O, + b__OO_O, + b_O_O_O, + b_O_O_O, + b__OOO_, + b______}, + [0x41] {b__OOO_, + b_O___O, + b_O___O, + b_O___O, + b_OOOOO, + b_O___O, + b_O___O, + b______}, + [0x42] {b_OOOO_, + b_O___O, + b_O___O, + b_OOOO_, + b_O___O, + b_O___O, + b_OOOO_, + b______}, + [0x43] {b__OOO_, + b_O___O, + b_O____, + b_O____, + b_O____, + b_O___O, + b__OOO_, + b______}, + [0x44] {b_OOO__, + b_O__O_, + b_O___O, + b_O___O, + b_O___O, + b_O__O_, + b_OOO__, + b______}, + [0x45] {b_OOOOO, + b_O____, + b_O____, + b_OOOO_, + b_O____, + b_O____, + b_OOOOO, + b______}, + [0x46] {b_OOOOO, + b_O____, + b_O____, + b_OOOO_, + b_O____, + b_O____, + b_O____, + b______}, + [0x47] {b__OOO_, + b_O___O, + b_O____, + b_O_OOO, + b_O___O, + b_O___O, + b__OOOO, + b______}, + [0x48] {b_O___O, + b_O___O, + b_O___O, + b_OOOOO, + b_O___O, + b_O___O, + b_O___O, + b______}, + [0x49] {b__OOO_, + b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b__OOO_, + b______}, + [0x4a] {b___OOO, + b____O_, + b____O_, + b____O_, + b____O_, + b_O__O_, + b__OO__, + b______}, + [0x4b] {b_O___O, + b_O__O_, + b_O_O__, + b_OO___, + b_O_O__, + b_O__O_, + b_O___O, + b______}, + [0x4c] {b_O____, + b_O____, + b_O____, + b_O____, + b_O____, + b_O____, + b_OOOOO, + b______}, + [0x4d] {b_O___O, + b_OO_OO, + b_O_O_O, + b_O_O_O, + b_O___O, + b_O___O, + b_O___O, + b______}, + [0x4e] {b_O___O, + b_O___O, + b_OO__O, + b_O_O_O, + b_O__OO, + b_O___O, + b_O___O, + b______}, + [0x4f] {b__OOO_, + b_O___O, + b_O___O, + b_O___O, + b_O___O, + b_O___O, + b__OOO_, + b______}, + [0x50] {b_OOOO_, + b_O___O, + b_O___O, + b_OOOO_, + b_O____, + b_O____, + b_O____, + b______}, + [0x51] {b__OOO_, + b_O___O, + b_O___O, + b_O___O, + b_O_O_O, + b_O__O_, + b__OO_O, + b______}, + [0x52] {b_OOOO_, + b_O___O, + b_O___O, + b_OOOO_, + b_O_O__, + b_O__O_, + b_O___O, + b______}, + [0x53] {b__OOOO, + b_O____, + b_O____, + b__OOO_, + b_____O, + b_____O, + b_OOOO_, + b______}, + [0x54] {b_OOOOO, + b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b______}, + [0x55] {b_O___O, + b_O___O, + b_O___O, + b_O___O, + b_O___O, + b_O___O, + b__OOO_, + b______}, + [0x56] {b_O___O, + b_O___O, + b_O___O, + b_O___O, + b_O___O, + b__O_O_, + b___O__, + b______}, + [0x57] {b_O___O, + b_O___O, + b_O___O, + b_O_O_O, + b_O_O_O, + b_O_O_O, + b__O_O_, + b______}, + [0x58] {b_O___O, + b_O___O, + b__O_O_, + b___O__, + b__O_O_, + b_O___O, + b_O___O, + b______}, + [0x59] {b_O___O, + b_O___O, + b_O___O, + b__O_O_, + b___O__, + b___O__, + b___O__, + b______}, + [0x5a] {b_OOOOO, + b_____O, + b____O_, + b___O__, + b__O___, + b_O____, + b_OOOOO, + b______}, + [0x5b] {b__OOO_, + b__O___, + b__O___, + b__O___, + b__O___, + b__O___, + b__OOO_, + b______}, + [0x5c] {b_O___O, + b__O_O_, + b_OOOOO, + b___O__, + b_OOOOO, + b___O__, + b___O__, + b______}, + [0x5d] {b__OOO_, + b____O_, + b____O_, + b____O_, + b____O_, + b____O_, + b__OOO_, + b______}, + [0x5e] {b___O__, + b__O_O_, + b_O___O, + b______, + b______, + b______, + b______, + b______}, + [0x5f] {b______, + b______, + b______, + b______, + b______, + b______, + b_OOOOO, + b______}, + [0x60] {b__O___, + b___O__, + b____O_, + b______, + b______, + b______, + b______, + b______}, + [0x61] {b______, + b______, + b__OOO_, + b_____O, + b__OOOO, + b_O___O, + b__OOOO, + b______}, + [0x62] {b_O____, + b_O____, + b_O____, + b_O_OO_, + b_OO__O, + b_O___O, + b_OOOO_, + b______}, + [0x63] {b______, + b______, + b__OOO_, + b_O____, + b_O____, + b_O___O, + b__OOO_, + b______}, + [0x64] {b_____O, + b_____O, + b_____O, + b__OO_O, + b_O__OO, + b_O___O, + b__OOOO, + b______}, + [0x65] {b______, + b______, + b__OOO_, + b_O___O, + b_OOOOO, + b_O____, + b__OOO_, + b______}, + [0x66] {b___OO_, + b__O__O, + b__O___, + b_OOO__, + b__O___, + b__O___, + b__O___, + b______}, + [0x67] {b______, + b__OOOO, + b_O___O, + b_O___O, + b__OOOO, + b_____O, + b__OOO_, + b______}, + [0x68] {b_O____, + b_O____, + b_O_OO_, + b_OO__O, + b_O___O, + b_O___O, + b_O___O, + b______}, + [0x69] {b___O__, + b______, + b__OO__, + b___O__, + b___O__, + b___O__, + b__OOO_, + b______}, + [0x6a] {b____O_, + b______, + b___OO_, + b____O_, + b____O_, + b_O__O_, + b__OO__, + b______}, + [0x6b] {b__O___, + b__O___, + b__O__O, + b__O_O_, + b__OO__, + b__O_O_, + b__O__O, + b______}, + [0x6c] {b__OO__, + b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b__OOO_, + b______}, + [0x6d] {b______, + b______, + b_OO_O_, + b_O_O_O, + b_O_O_O, + b_O___O, + b_O___O, + b______}, + [0x6e] {b______, + b______, + b_OOOO_, + b_O___O, + b_O___O, + b_O___O, + b_O___O, + b______}, + [0x6f] {b______, + b______, + b__OOO_, + b_O___O, + b_O___O, + b_O___O, + b__OOO_, + b______}, + [0x70] {b______, + b______, + b_OOOO_, + b_O___O, + b_OOOO_, + b_O____, + b_O____, + b______}, + [0x71] {b______, + b______, + b__OO_O, + b_O__OO, + b__OOOO, + b_____O, + b_____O, + b______}, + [0x72] {b______, + b______, + b_O_OO_, + b_OO__O, + b_O____, + b_O____, + b_O____, + b______}, + [0x73] {b______, + b______, + b__OOO_, + b_O____, + b__OOO_, + b_____O, + b_OOOO_, + b______}, + [0x74] {b__O___, + b_OOO__, + b__O___, + b__O___, + b__O___, + b__O__O, + b___OO_, + b______}, + [0x75] {b______, + b______, + b_O___O, + b_O___O, + b_O___O, + b_O__OO, + b__OO_O, + b______}, + [0x76] {b______, + b______, + b_O___O, + b_O___O, + b_O___O, + b__O_O_, + b___O__, + b______}, + [0x77] {b______, + b______, + b_O___O, + b_O___O, + b_O___O, + b_O_O_O, + b__O_O_, + b______}, + [0x78] {b______, + b______, + b_O___O, + b__O_O_, + b___O__, + b__O_O_, + b_O___O, + b______}, + [0x79] {b______, + b______, + b_O___O, + b_O___O, + b__OOOO, + b_____O, + b__OOO_, + b______}, + [0x7a] {b______, + b______, + b_OOOOO, + b____O_, + b___O__, + b__O___, + b_OOOOO, + b______}, + [0x7b] {b____O_, + b___O__, + b___O__, + b__O___, + b___O__, + b___O__, + b____O_, + b______}, + [0x7c] {b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b___O__, + b______}, + [0x7d] {b__O___, + b___O__, + b___O__, + b____O_, + b___O__, + b___O__, + b__O___, + b______}, + [0x7e] {b______, + b___O__, + b____O_, + b_OOOOO, + b____O_, + b___O__, + b______, + b______}, + + [0x7f] {b______, + b___O__, + b__O___, + b_OOOOO, + b__O___, + b___O__, + b______, + b______}, + [0xb0] {b__OOO_, + b__O_O_, + b__OOO_, + b______, + b______, + b______, + b______, + b______}, + [0xff] {bOOOOOO, + bOOOOOO, + bOOOOOO, + bOOOOOO, + bOOOOOO, + bOOOOOO, + bOOOOOO, + bOOOOOO}, +}; + +//FIXME: make big chars use less memory + +static unsigned char *fontbignum[10][24] = { + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++....++++++", + "++++++........++++", + "+++++..........+++", + "+++++....++....+++", + "+++++...++++...+++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "+++++...++++...+++", + "+++++....++....+++", + "+++++..........+++", + "++++++........++++", + "++++++++....++++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "+++++++++++++...++", + "++++++++++++....++", + "+++++++++++.....++", + "++++++++++......++", + "++++++++........++", + "+++++++.........++", + "+++++++....+....++", + "+++++++...++....++", + "+++++++.++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++.....+++++", + "++++++.........+++", + "+++++..........+++", + "+++++....+++....++", + "+++++...++++....++", + "++++++..++++....++", + "++++++++++++....++", + "++++++++++++....++", + "+++++++++++....+++", + "++++++++++....++++", + "+++++++++.....++++", + "++++++++.....+++++", + "+++++++....+++++++", + "++++++....++++++++", + "++++++....++++++++", + "+++++...........++", + "+++++...........++", + "+++++...........++", + "+++++...........++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "+++++++.....++++++", + "+++++.........++++", + "+++++.........++++", + "++++....+++....+++", + "++++....+++....+++", + "+++++++++++....+++", + "++++++++++....++++", + "+++++++++.....++++", + "+++++++++...++++++", + "+++++++++.....++++", + "+++++++++++....+++", + "++++++++++++....++", + "++++++++++++....++", + "++++....++++....++", + "++++....++++....++", + "+++++....++....+++", + "+++++..........+++", + "++++++........++++", + "+++++++.....++++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++....++++", + "++++++++++....++++", + "+++++++++.....++++", + "++++++++......++++", + "++++++++......++++", + "+++++++.......++++", + "++++++........++++", + "++++++...+....++++", + "+++++...++....++++", + "+++++...++....++++", + "++++...+++....++++", + "+++...++++....++++", + "+++.............++", + "+++.............++", + "+++.............++", + "++++++++++....++++", + "++++++++++....++++", + "++++++++++....++++", + "++++++++++....++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "++++++.........+++", + "++++++.........+++", + "+++++..........+++", + "+++++....+++++++++", + "+++++....+++++++++", + "+++++...++++++++++", + "+++++...+....+++++", + "++++..........++++", + "++++...........+++", + "++++....+++.....++", + "++++++++++++....++", + "++++++++++++....++", + "++++++++++++....++", + "++++....++++....++", + "++++....++++....++", + "+++++....++....+++", + "+++++..........+++", + "++++++........++++", + "+++++++.....++++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++.....+++++", + "+++++++........+++", + "++++++.........+++", + "+++++....++.....++", + "+++++...++++....++", + "++++....++++++++++", + "++++....++++++++++", + "++++....+....+++++", + "++++..........++++", + "++++...........+++", + "++++.....++.....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "+++++...++++....++", + "+++++....++.....++", + "++++++.........+++", + "++++++........++++", + "++++++++.....+++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "++++............++", + "++++............++", + "++++............++", + "++++++++++++....++", + "+++++++++++....+++", + "++++++++++....++++", + "++++++++++....++++", + "+++++++++....+++++", + "+++++++++...++++++", + "++++++++....++++++", + "++++++++....++++++", + "+++++++....+++++++", + "+++++++....+++++++", + "+++++++....+++++++", + "+++++++...++++++++", + "++++++....++++++++", + "++++++....++++++++", + "++++++....++++++++", + "++++++....++++++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "+++++++......+++++", + "+++++..........+++", + "+++++....++....+++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "+++++....++....+++", + "++++++........++++", + "++++++........++++", + "+++++....++....+++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "+++++....++....+++", + "+++++..........+++", + "+++++++......+++++", + "++++++++++++++++++", + "++++++++++++++++++"}, + { + "++++++++++++++++++", + "++++++++++++++++++", + "++++++++++++++++++", + "+++++++.....++++++", + "++++++........++++", + "+++++.........++++", + "++++.....++....+++", + "++++....++++...+++", + "++++....++++....++", + "++++....++++....++", + "++++....++++....++", + "++++.....++.....++", + "+++++...........++", + "++++++..........++", + "+++++++....+....++", + "++++++++++++....++", + "++++++++++++....++", + "++++....++++...+++", + "++++.....++....+++", + "+++++.........++++", + "+++++........+++++", + "+++++++.....++++++", + "++++++++++++++++++", + "++++++++++++++++++"} +}; + +static unsigned char *fontbigdp[] = { + "++++++", + "++++++", + "++++++", + "++++++", + "++++++", + "+....+", + "+....+", + "+....+", + "+....+", + "++++++", + "++++++", + "++++++", + "++++++", + "++++++", + "++++++", + "+....+", + "+....+", + "+....+", + "+....+", + "++++++", + "++++++", + "++++++", + "++++++", + "++++++" +}; diff -Nur lcdproc-0.4.5_orig/server/drivers/sed1530.h lcdproc-0.4.5/server/drivers/sed1530.h --- lcdproc-0.4.5_orig/server/drivers/sed1530.h 1970-01-01 01:00:00.000000000 +0100 +++ lcdproc-0.4.5/server/drivers/sed1530.h 2005-01-15 01:36:52.000000000 +0100 @@ -0,0 +1,21 @@ +#ifndef SED1530_H +#define SED1530_H + +extern lcd_logical_driver *sed1530; + +int sed1530_init (struct lcd_logical_driver *driver, char *args); +void sed1530_close (); +void sed1530_clear (); +void sed1530_flush (); +void sed1530_string (int x, int y, char string[]); +void sed1530_chr (int x, int y, char c); +void sed1530_vbar (int x, int len); +void sed1530_hbar (int x, int y, int len); +void sed1530_num (int x, int num); +void sed1530_set_char (int n, char *dat); +void sed1530_icon (int which, char dest); +void sed1530_flush_box (int lft, int top, int rgt, int bot); +void sed1530_draw_frame (char *dat); +void sed1530_heartbeat (int type); + +#endif