Index: Linux/userapps/lcdproc/LCDd.conf diff -c Linux/userapps/lcdproc/LCDd.conf:1.1.1.1 Linux/userapps/lcdproc/LCDd.conf:1.1.1.1.2.1 *** Linux/userapps/lcdproc/LCDd.conf:1.1.1.1 Tue Jan 28 03:12:02 2003 --- Linux/userapps/lcdproc/LCDd.conf Tue Jan 28 05:04:41 2003 *************** *** 40,48 **** [server] # Server section with all kinds of settings for the LCDd server ! Driver=none #Driver=curses ! #Driver=HD44780 #Driver=lcdm001 #Driver=MtxOrb #Driver=CFontz --- 40,48 ---- [server] # Server section with all kinds of settings for the LCDd server ! #Driver=none #Driver=curses ! Driver=HD44780 #Driver=lcdm001 #Driver=MtxOrb #Driver=CFontz *************** *** 70,76 **** # User to run as. LCDd will drop its root priviledges, # if any, and run as this user instead. ! ServerScreen=no # Enables the built-in server screen [Default: no] # yes : always, # no : when there are no other screens active. --- 70,76 ---- # User to run as. LCDd will drop its root priviledges, # if any, and run as this user instead. ! ServerScreen=yes # Enables the built-in server screen [Default: no] # yes : always, # no : when there are no other screens active. *************** *** 97,109 **** # off Heartbeat disabled # slash Heartbeat replaced with a rotating slash ! Backlight=open # The server has serveral backlight modes # on Stays on all the time # off Stays off all the time # open Can be controlled by all clients ! InitialBacklight=on # This sets the initial backlight state if the backlight mode is "open" # Affects the server screen only ;) --- 97,109 ---- # off Heartbeat disabled # slash Heartbeat replaced with a rotating slash ! Backlight=off # The server has serveral backlight modes # on Stays on all the time # off Stays off all the time # open Can be controlled by all clients ! InitialBacklight=off # This sets the initial backlight state if the backlight mode is "open" # Affects the server screen only ;) *************** *** 237,246 **** # Hitachi HD44780 driver # See docs/hd44780_howto.txt ! Port=0x378 # Port where the LPT is. Usual values are 0x278, 0x378 and 0x3BC ! ConnectionType=4bit # Select what type of connection. See documentation for types. Keypad=no --- 237,249 ---- # Hitachi HD44780 driver # See docs/hd44780_howto.txt ! #Port=0x378 # Port where the LPT is. Usual values are 0x278, 0x378 and 0x3BC + Port=0x72 + # For a TS SBC, the lcd is at port 0x72 ! #ConnectionType=4bit ! ConnectionType=8bitTS # Select what type of connection. See documentation for types. Keypad=no *************** *** 250,256 **** Backlight=no # If you have a switchable backlight. ! Size=20x4 # Specifies the size of the LCD. # In case of multiple combined displays, this should be the total size. --- 253,259 ---- Backlight=no # If you have a switchable backlight. ! Size=24x4 # Specifies the size of the LCD. # In case of multiple combined displays, this should be the total size. Index: Linux/userapps/lcdproc/configure diff -c Linux/userapps/lcdproc/configure:1.1.1.1 Linux/userapps/lcdproc/configure:1.1.1.1.2.1 *** Linux/userapps/lcdproc/configure:1.1.1.1 Tue Jan 28 03:12:02 2003 --- Linux/userapps/lcdproc/configure Tue Jan 28 04:37:52 2003 *************** *** 3962,3967 **** --- 3962,3968 ---- else DRIVERS="$DRIVERS hd44780.o hd44780-picanlcd.o" fi + DRIVERS="$DRIVERS hd44780-TS.o" cat >> confdefs.h <<\EOF #define HD44780_DRV 1 EOF Index: Linux/userapps/lcdproc/server/drivers/hd44780-TS.c diff -c /dev/null Linux/userapps/lcdproc/server/drivers/hd44780-TS.c:1.1.2.1 *** /dev/null Thu Feb 5 14:47:03 2004 --- Linux/userapps/lcdproc/server/drivers/hd44780-TS.c Tue Jan 28 04:37:52 2003 *************** *** 0 **** --- 1,129 ---- + /* + * 8-bit driver module for Hitachi HD44780 based LCD displays. + * The LCD is operated in it's 8 bit-mode on a Technologic Systems' + * Single Based Computer Board with a dedicated LCD port. + * + * Copyright (c) 1999, 1995 Benjamin Tse + * 2001 Joris Robijn + * 2003 Liberty Young + * + * For pin-outs and connections, see the SBC's product manual + * found on the Technologic Systems website + * http://www.embeddedx86.com/ + * + * Backlight: not supported + * Keypad connection (optional): none + * + * Created modular driver Dec 1999, Benjamin Tse + * + * Based on the code in the ts package which uses the LCD + * controller in its 8-bit mode. + * + * 02.2003 Liberty Young + * Customized hd44780-ext8bit.c and .h files for our Board + * + * This file is released under the GNU General Public License. Refer to the + * COPYING file distributed with this package. + */ + + #include "hd44780-TS.h" + #include "hd44780.h" + + #include "port.h" + #include "lcd_sem.h" + #include + #include + #include + + extern int errno; + extern lcd_logical_driver *HD44780; + + // Generally, any function that accesses the LCD control lines needs to be + // implemented separately for each HW design. This is typically (but not + // restricted to): + // HD44780_senddata + + void ts_HD44780_senddata (unsigned char displayID, unsigned char flags, unsigned char ch); + + void ts_nullheartbeat (int); + //void ts_flush( ); + + //override draw-frame, too + + static unsigned int ts_lcdport; + + static int semid; + + // initialise the driver + // L.Y let's ignore port for now + int hd_init_ts (HD44780_functions * hd44780_functions, + lcd_logical_driver * driver, + char *args, unsigned int port) + { + semid = sem_get (); + + if (port != 0x72){ + printf("*********************************************\n"); + printf("** WARNING..INVALID PORT..proceeding anyway *\n"); + printf("*********************************************\n"); + } + + ts_lcdport = port; + + if ( (port_access(ts_lcdport + DATA_PORT) < 0 ) + || (port_access(ts_lcdport+ CMD_PORT) < 0) + || (port_access(TS_LCD_ENABLE) < 0 )) { + perror ("hd44780-TS.c::hd_init_ts(...):"); + return -1; + } + + port_out (TS_LCD_ENABLE, TS_LCDENABLE_KEY); + + //set the functions used by the system + hd44780_functions->senddata = ts_HD44780_senddata; + + // setup the lcd in 8 bit mode + hd44780_functions->senddata (0, RS_INSTR, FUNCSET | IF_8BIT); + hd44780_functions->uPause (4100); + hd44780_functions->senddata (0, RS_INSTR, FUNCSET | IF_8BIT); + hd44780_functions->uPause (100); + hd44780_functions->senddata(0,RS_INSTR, FUNCSET | IF_8BIT); + hd44780_functions->uPause (100); + + hd44780_functions->senddata (0, RS_INSTR, FUNCSET | IF_8BIT | + TWOLINE | SMALLCHAR); + hd44780_functions->uPause (40); + hd44780_functions->senddata(0, RS_INSTR, ONOFFCTRL | DISPOFF + | CURSORNOBLINK | CURSORON); + hd44780_functions->uPause(40); + + hd44780_functions->senddata(0, RS_INSTR, ONOFFCTRL | DISPON ); + hd44780_functions->uPause(40); + + common_init(); + + return 0; + } + + + void ts_HD44780_senddata (unsigned char displayID, + unsigned char flags, unsigned char ch) + { + unsigned char portControl; + + if (flags == RS_INSTR) + portControl = CMD_PORT; + else //if (iflags == RS_DATA) + portControl = DATA_PORT; + + sem_wait (semid); + + port_out (ts_lcdport + portControl, ch); + + // this should be changed to monitor the status of + // the BUSY bit of the hitachi controller + if( delayBus ) hd44780_functions->uPause (1); + + sem_signal (semid); + } + Index: Linux/userapps/lcdproc/server/drivers/hd44780-TS.h diff -c /dev/null Linux/userapps/lcdproc/server/drivers/hd44780-TS.h:1.1.2.1 *** /dev/null Thu Feb 5 14:47:03 2004 --- Linux/userapps/lcdproc/server/drivers/hd44780-TS.h Tue Jan 28 04:37:52 2003 *************** *** 0 **** --- 1,16 ---- + #ifndef HD_TS_H + #define HD_TS_H + + #define TS_LCD_ENABLE 0x7d + #define TS_LCDENABLE_KEY 0x10 + #define DATA_PORT 1 + #define CMD_PORT 0 + + #include "lcd.h" /* for lcd_logical_driver */ + #include "hd44780-low.h" /* for HD44780_functions */ + + // initialise this particular driver + int hd_init_ts (HD44780_functions * hd44780_functions, lcd_logical_driver * driver, + char *args, unsigned int port); + + #endif Index: Linux/userapps/lcdproc/server/drivers/hd44780-drivers.h diff -c Linux/userapps/lcdproc/server/drivers/hd44780-drivers.h:1.1.1.1 Linux/userapps/lcdproc/server/drivers/hd44780-drivers.h:1.1.1.1.2.1 *** Linux/userapps/lcdproc/server/drivers/hd44780-drivers.h:1.1.1.1 Tue Jan 28 03:12:03 2003 --- Linux/userapps/lcdproc/server/drivers/hd44780-drivers.h Tue Jan 28 04:37:52 2003 *************** *** 11,16 **** --- 11,17 ---- #define HD44780_DRIVERS_H // hd44780 specific header files + #include"hd44780-TS.h" #ifdef HAVE_PCSTYLE_LPT_CONTROL # include "hd44780-4bit.h" # include "hd44780-ext8bit.h" *************** *** 21,26 **** --- 22,28 ---- // add new connection type header files here enum connectionType { HD_4bit, HD_8bit, HD_serialLpt, HD_winamp, HD_picanlcd, + HD_ts, // add new connection types here HD_unknown }; *************** *** 43,50 **** { HD_serialLpt, "serialLpt", hd_init_serialLpt, "\tnone\n"}, { HD_winamp, "winamp", hd_init_winamp, "\t-e\t--extended\tEnable three or more displays\n"}, #endif - { HD_picanlcd, "picanlcd", hd_init_picanlcd, ""}, // add new connection types and their string specifier here // default, end of structure element (do not delete) { HD_unknown, "", NULL, ""} --- 45,52 ---- { HD_serialLpt, "serialLpt", hd_init_serialLpt, "\tnone\n"}, { HD_winamp, "winamp", hd_init_winamp, "\t-e\t--extended\tEnable three or more displays\n"}, #endif { HD_picanlcd, "picanlcd", hd_init_picanlcd, ""}, + { HD_ts, "8bitTS", hd_init_ts, "\tnone\n"}, // add new connection types and their string specifier here // default, end of structure element (do not delete) { HD_unknown, "", NULL, ""}