From 1645d61018c24013525f3953613aaea56714bab4 Mon Sep 17 00:00:00 2001 From: reinelt Date: Wed, 9 Aug 2000 09:50:29 +0000 Subject: [lcd4linux @ 2000-08-09 09:50:29 by reinelt] opened 0.98 development removed driver-specific signal-handlers added 'quit'-function to driver structure added global signal-handler git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@61 3ae390bd-cb1e-0410-b409-cd5a39f66f1f --- Crystalfontz.c | 38 ++++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) (limited to 'Crystalfontz.c') diff --git a/Crystalfontz.c b/Crystalfontz.c index 09d41d1..9b3c370 100644 --- a/Crystalfontz.c +++ b/Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: Crystalfontz.c,v 1.3 2000/06/04 21:43:50 herp Exp $ +/* $Id: Crystalfontz.c,v 1.4 2000/08/09 09:50:29 reinelt Exp $ * * driver for display modules from Crystalfontz * @@ -19,6 +19,13 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: Crystalfontz.c,v $ + * Revision 1.4 2000/08/09 09:50:29 reinelt + * + * opened 0.98 development + * removed driver-specific signal-handlers + * added 'quit'-function to driver structure + * added global signal-handler + * * Revision 1.3 2000/06/04 21:43:50 herp * minor bugfix (zero length) * @@ -31,9 +38,9 @@ #include #include #include -#include #include +#include "debug.h" #include "cfg.h" #include "lock.h" #include "display.h" @@ -56,8 +63,9 @@ static char isTxtDirty; static char *isBarDirty; static char isAnyBarDirty; -static void cryfonquit() { +int cryfonquit(void) { + debug ("closing port %s\n", Port); close(Device); unlock_port(Port); exit(0); @@ -94,7 +102,7 @@ struct termios portset; return fd; } -static int cryfoninit(LCD *Self) { +int cryfoninit(LCD *Self) { char *port; char *speed; char *backlight; @@ -140,6 +148,8 @@ char cmd_contrast[2]={ CRYFON_CONTRAST_CTRL, }; return -1; } + debug ("using port %s at %d baud\n", Port, atoi(speed)); + if ((Device=cryfonopen())==-1) return -1; @@ -185,10 +195,6 @@ char cmd_contrast[2]={ CRYFON_CONTRAST_CTRL, }; isAnyBarDirty=0; isTxtDirty=0; - signal(SIGINT,cryfonquit); - signal(SIGQUIT,cryfonquit); - signal(SIGTERM,cryfonquit); - usleep(350000); write(Device, CRYFON_HIDE_CURSOR CRYFON_SCROLL_OFF CRYFON_WRAP_OFF,3); backlight=cfg_get("Backlight")?:NULL; @@ -206,13 +212,13 @@ char cmd_contrast[2]={ CRYFON_CONTRAST_CTRL, }; return 0; } -static int cryfonclear() { +int cryfonclear() { memset(Txtbuf,' ',tdim); memset(Barbuf,0,bdim); return 0; } -static int cryfonput(int row,int col,char *text) { +int cryfonput(int row,int col,char *text) { int pos; pos=row*Lcd.cols+col; @@ -254,7 +260,7 @@ static void whiten(int bitfrom,int len,int pos,int startbyte,int endbyte) { } } -static int cryfonbar(int type,int row,int col,int max,int len1,int len2) { +int cryfonbar(int type,int row,int col,int max,int len1,int len2) { int endb,maxb; int bitfrom; int pos; @@ -529,7 +535,7 @@ int i,j,k1,k2,ci; flushBarCharBuf(); } -static int cryfonflush() { +int cryfonflush() { if (isTxtDirty) { writeTxtDiff(); @@ -544,9 +550,9 @@ static int cryfonflush() { } LCD Crystalfontz[] = { - { "626", 2, 16, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush }, - { "636", 2, 16, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush }, - { "632", 2, 16, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush }, - { "634", 4, 20, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush }, + { "626", 2, 16, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush, cryfonquit }, + { "636", 2, 16, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush, cryfonquit }, + { "632", 2, 16, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush, cryfonquit }, + { "634", 4, 20, XRES, YRES, BARS, cryfoninit, cryfonclear, cryfonput, cryfonbar, cryfonflush, cryfonquit }, { NULL } }; -- cgit v1.2.3 / .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# DVB-T Wuerzburg/Bayern
#Thorsten Becker (thorsten.becker@cloupage.de)

# T freq bw fec_hi fec_lo mod transmission-mode guard-interval hierarchy
T 212500000 7MHz 3/4 NONE QAM16 8k 1/4 NONE #K10, ARD
T 506000000 8MHz 2/3 NONE QAM16 8k 1/4 NONE #K25, ZDF
T 666000000 8MHz 2/3 NONE QAM16 8k 1/8 NONE #K45, BR