diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2001-02-13 09:00:13 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2001-02-13 09:00:13 +0000 |
commit | 468d6dd5c3767a2db881230ecc629ef35ab29110 (patch) | |
tree | 6d80d403c07b6b9ffdc81fad68b919522bfff220 | |
parent | 4af4f9434259a369bdfaafbe75aa41163f0296c4 (diff) | |
download | lcd4linux-468d6dd5c3767a2db881230ecc629ef35ab29110.tar.gz |
[lcd4linux @ 2001-02-13 09:00:13 by reinelt]
prepared framework for GPO's (general purpose outputs)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@77 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
-rw-r--r-- | BeckmannEgle.c | 8 | ||||
-rw-r--r-- | Crystalfontz.c | 16 | ||||
-rw-r--r-- | HD44780.c | 8 | ||||
-rw-r--r-- | MatrixOrbital.c | 21 | ||||
-rw-r--r-- | PalmPilot.c | 8 | ||||
-rw-r--r-- | Raster.c | 8 | ||||
-rw-r--r-- | SIN.c | 8 | ||||
-rw-r--r-- | Skeleton.c | 13 | ||||
-rw-r--r-- | XWindow.c | 8 | ||||
-rw-r--r-- | display.c | 16 | ||||
-rw-r--r-- | display.h | 9 | ||||
-rw-r--r-- | processor.c | 13 |
12 files changed, 103 insertions, 33 deletions
diff --git a/BeckmannEgle.c b/BeckmannEgle.c index d434092..bc6055e 100644 --- a/BeckmannEgle.c +++ b/BeckmannEgle.c @@ -1,4 +1,4 @@ -/* $Id: BeckmannEgle.c,v 1.4 2000/08/10 09:44:09 reinelt Exp $ +/* $Id: BeckmannEgle.c,v 1.5 2001/02/13 09:00:13 reinelt Exp $ * * driver for Beckmann+Egle mini terminals * @@ -20,6 +20,10 @@ * * * $Log: BeckmannEgle.c,v $ + * Revision 1.5 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.4 2000/08/10 09:44:09 reinelt * * new debugging scheme: error(), info(), debug() @@ -542,6 +546,6 @@ int BE_quit (void) } LCD BeckmannEgle[] = { - { "BLC100x", 0, 0, XRES, YRES, BARS, BE_init, BE_clear, BE_put, BE_bar, BE_flush, BE_quit }, + { "BLC100x",0,0,XRES,YRES,BARS,0,BE_init,BE_clear,BE_put,BE_bar,NULL,BE_flush,BE_quit }, { NULL } }; diff --git a/Crystalfontz.c b/Crystalfontz.c index f3aea30..c88f55d 100644 --- a/Crystalfontz.c +++ b/Crystalfontz.c @@ -1,4 +1,4 @@ -/* $Id: Crystalfontz.c,v 1.5 2000/08/10 09:44:09 reinelt Exp $ +/* $Id: Crystalfontz.c,v 1.6 2001/02/13 09:00:13 reinelt Exp $ * * driver for display modules from Crystalfontz * @@ -19,6 +19,10 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * * $Log: Crystalfontz.c,v $ + * Revision 1.6 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.5 2000/08/10 09:44:09 reinelt * * new debugging scheme: error(), info(), debug() @@ -550,9 +554,9 @@ int cryfonflush() { } LCD Crystalfontz[] = { - { "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 } + { "626",2,16,XRES,YRES,BARS,0,cryfoninit,cryfonclear,cryfonput,cryfonbar,NULL,cryfonflush,cryfonquit }, + { "636",2,16,XRES,YRES,BARS,0,cryfoninit,cryfonclear,cryfonput,cryfonbar,NULL,cryfonflush,cryfonquit }, + { "632",2,16,XRES,YRES,BARS,0,cryfoninit,cryfonclear,cryfonput,cryfonbar,NULL,cryfonflush,cryfonquit }, + { "634",4,20,XRES,YRES,BARS,0,cryfoninit,cryfonclear,cryfonput,cryfonbar,NULL,cryfonflush,cryfonquit }, + { NULL } }; @@ -1,4 +1,4 @@ -/* $Id: HD44780.c,v 1.9 2000/10/20 07:17:07 reinelt Exp $ +/* $Id: HD44780.c,v 1.10 2001/02/13 09:00:13 reinelt Exp $ * * driver for display modules based on the HD44780 chip * @@ -20,6 +20,10 @@ * * * $Log: HD44780.c,v $ + * Revision 1.10 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.9 2000/10/20 07:17:07 reinelt * * @@ -540,6 +544,6 @@ int HD_quit (void) } LCD HD44780[] = { - { "HD44780", 0, 0, XRES, YRES, BARS, HD_init, HD_clear, HD_put, HD_bar, HD_flush, HD_quit }, + { "HD44780",0,0,XRES,YRES,BARS,0,HD_init,HD_clear,HD_put,HD_bar,HD_gpo,HD_flush,HD_quit }, { NULL } }; diff --git a/MatrixOrbital.c b/MatrixOrbital.c index 6388a16..cb23d92 100644 --- a/MatrixOrbital.c +++ b/MatrixOrbital.c @@ -1,4 +1,4 @@ -/* $Id: MatrixOrbital.c,v 1.19 2000/08/10 09:44:09 reinelt Exp $ +/* $Id: MatrixOrbital.c,v 1.20 2001/02/13 09:00:13 reinelt Exp $ * * driver for Matrix Orbital serial display modules * @@ -20,6 +20,10 @@ * * * $Log: MatrixOrbital.c,v $ + * Revision 1.20 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.19 2000/08/10 09:44:09 reinelt * * new debugging scheme: error(), info(), debug() @@ -536,6 +540,11 @@ int MO_bar (int type, int row, int col, int max, int len1, int len2) return 0; } +int MO_gpo (int num, int val) +{ + return 0; +} + int MO_flush (void) { char buffer[256]="\376G"; @@ -581,10 +590,10 @@ int MO_quit (void) } LCD MatrixOrbital[] = { - { "LCD0821", 2, 8, XRES, YRES, BARS, MO_init, MO_clear, MO_put, MO_bar, MO_flush, MO_quit }, - { "LCD1621", 2, 16, XRES, YRES, BARS, MO_init, MO_clear, MO_put, MO_bar, MO_flush, MO_quit }, - { "LCD2021", 2, 20, XRES, YRES, BARS, MO_init, MO_clear, MO_put, MO_bar, MO_flush, MO_quit }, - { "LCD2041", 4, 20, XRES, YRES, BARS, MO_init, MO_clear, MO_put, MO_bar, MO_flush, MO_quit }, - { "LCD4021", 2, 40, XRES, YRES, BARS, MO_init, MO_clear, MO_put, MO_bar, MO_flush, MO_quit }, + { "LCD0821",2, 8,XRES,YRES,BARS,0,MO_init,MO_clear,MO_put,MO_bar,MO_gpo,MO_flush,MO_quit }, + { "LCD1621",2,16,XRES,YRES,BARS,0,MO_init,MO_clear,MO_put,MO_bar,MO_gpo,MO_flush,MO_quit }, + { "LCD2021",2,20,XRES,YRES,BARS,0,MO_init,MO_clear,MO_put,MO_bar,MO_gpo,MO_flush,MO_quit }, + { "LCD2041",4,20,XRES,YRES,BARS,0,MO_init,MO_clear,MO_put,MO_bar,MO_gpo,MO_flush,MO_quit }, + { "LCD4021",2,40,XRES,YRES,BARS,0,MO_init,MO_clear,MO_put,MO_bar,MO_gpo,MO_flush,MO_quit }, { NULL } }; diff --git a/PalmPilot.c b/PalmPilot.c index 940c304..44d7b86 100644 --- a/PalmPilot.c +++ b/PalmPilot.c @@ -1,4 +1,4 @@ -/* $Id: PalmPilot.c,v 1.3 2000/08/10 09:44:09 reinelt Exp $ +/* $Id: PalmPilot.c,v 1.4 2001/02/13 09:00:13 reinelt Exp $ * * driver for 3Com Palm Pilot * @@ -20,6 +20,10 @@ * * * $Log: PalmPilot.c,v $ + * Revision 1.4 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.3 2000/08/10 09:44:09 reinelt * * new debugging scheme: error(), info(), debug() @@ -284,6 +288,6 @@ int Palm_quit (void) } LCD PalmPilot[] = { - { "PalmPilot", 0, 0, 0, 0, BARS, Palm_init, Palm_clear, Palm_put, Palm_bar, Palm_flush, Palm_quit }, + { "PalmPilot",0,0,0,0,BARS,0,Palm_init,Palm_clear,Palm_put,Palm_bar,NULL,Palm_flush,Palm_quit }, { NULL } }; @@ -1,4 +1,4 @@ -/* $Id: Raster.c,v 1.10 2000/08/10 09:44:09 reinelt Exp $ +/* $Id: Raster.c,v 1.11 2001/02/13 09:00:13 reinelt Exp $ * * driver for raster formats * @@ -20,6 +20,10 @@ * * * $Log: Raster.c,v $ + * Revision 1.11 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.10 2000/08/10 09:44:09 reinelt * * new debugging scheme: error(), info(), debug() @@ -285,6 +289,6 @@ int Raster_bar (int type, int row, int col, int max, int len1, int len2) LCD Raster[] = { - { "PPM", 0, 0, 0, 0, BARS, Raster_init, Raster_clear, Raster_put, Raster_bar, Raster_flush }, + { "PPM",0,0,0,0,BARS,0,Raster_init,Raster_clear,Raster_put,Raster_bar,NULL,Raster_flush }, { NULL } }; @@ -1,4 +1,4 @@ -/* $Id: SIN.c,v 1.5 2000/12/07 20:47:54 reinelt Exp $ +/* $Id: SIN.c,v 1.6 2001/02/13 09:00:13 reinelt Exp $ * * driver for SIN router displays * @@ -20,6 +20,10 @@ * * * $Log: SIN.c,v $ + * Revision 1.6 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.5 2000/12/07 20:47:54 reinelt * * first try for SIN bars @@ -255,6 +259,6 @@ int SIN_quit (void) } LCD SIN[] = { - { "SIN", 8, 40, XRES, YRES, BARS, SIN_init, SIN_clear, SIN_put, SIN_bar, SIN_flush, SIN_quit }, + { "SIN",8,40,XRES,YRES,BARS,0,SIN_init,SIN_clear,SIN_put,SIN_bar,NULL,SIN_flush,SIN_quit }, { NULL } }; @@ -1,4 +1,4 @@ -/* $Id: Skeleton.c,v 1.5 2000/08/10 09:44:09 reinelt Exp $ +/* $Id: Skeleton.c,v 1.6 2001/02/13 09:00:13 reinelt Exp $ * * skeleton driver for new display modules * @@ -20,6 +20,10 @@ * * * $Log: Skeleton.c,v $ + * Revision 1.6 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.5 2000/08/10 09:44:09 reinelt * * new debugging scheme: error(), info(), debug() @@ -90,6 +94,11 @@ int Skel_bar (int type, int row, int col, int max, int len1, int len2) return 0; } +int Skel_gpo (int num, int val) +{ + return 0; +} + int Skel_flush (void) { return 0; @@ -97,6 +106,6 @@ int Skel_flush (void) LCD Skeleton[] = { - { "Skeleton", 4, 20, 5, 8, BAR_L | BAR_R, Skel_init, Skel_clear, Skel_put, Skel_bar, Skel_flush }, + { "Skeleton",4,20,5,8,BAR_L|BAR_R,0,Skel_init,Skel_clear,Skel_put,Skel_bar,Skel_gpo,Skel_flush }, { NULL } }; @@ -1,4 +1,4 @@ -/* $Id: XWindow.c,v 1.21 2000/08/10 18:42:20 reinelt Exp $ +/* $Id: XWindow.c,v 1.22 2001/02/13 09:00:13 reinelt Exp $ * * X11 Driver for LCD4Linux * @@ -20,6 +20,10 @@ * * * $Log: XWindow.c,v $ + * Revision 1.22 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.21 2000/08/10 18:42:20 reinelt * * fixed some bugs with the new syslog code @@ -507,7 +511,7 @@ XEvent ev; } LCD XWindow[] = { - { "X11", 0, 0, 0, 0, BARS, xlcdinit, xlcdclear, xlcdput, xlcdbar, xlcdflush, xlcdquit }, + { "X11",0,0,0,0,BARS,0,xlcdinit,xlcdclear,xlcdput,xlcdbar,NULL,xlcdflush,xlcdquit }, { NULL } }; @@ -1,4 +1,4 @@ -/* $Id: display.c,v 1.21 2000/11/28 16:46:11 reinelt Exp $ +/* $Id: display.c,v 1.22 2001/02/13 09:00:13 reinelt Exp $ * * framework for device drivers * @@ -20,6 +20,10 @@ * * * $Log: display.c,v $ + * Revision 1.22 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.21 2000/11/28 16:46:11 reinelt * * first try to support display of SIN router @@ -136,6 +140,9 @@ * int lcd_bar (int type, int row, int col, int max, int len1, int len2) * draws a specified bar at row, col with len * + * int lcd_gpo (int num, int val) + * sets GPO #num to val + * * int lcd_flush (void) * flushes the framebuffer to the display * @@ -253,6 +260,13 @@ int lcd_bar (int type, int row, int col, int max, int len1, int len2) return Lcd->bar (type & BAR_HV, row-1, col-1, max, len1, len2); } +int lcd_gpo (int num, int val) +{ + if (num<1 || num>Lcd->gpos) return -1; + if (Lcd->gpo==NULL) return 0; + return Lcd->gpo(num-1, val); +} + int lcd_flush (void) { if (Lcd->flush==NULL) return 0; @@ -1,4 +1,4 @@ -/* $Id: display.h,v 1.11 2000/08/09 09:50:29 reinelt Exp $ +/* $Id: display.h,v 1.12 2001/02/13 09:00:13 reinelt Exp $ * * framework for device drivers * @@ -20,6 +20,10 @@ * * * $Log: display.h,v $ + * Revision 1.12 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) + * * Revision 1.11 2000/08/09 09:50:29 reinelt * * opened 0.98 development @@ -92,10 +96,12 @@ typedef struct LCD { int xres; int yres; int bars; + int gpos; int (*init) (struct LCD *Self); int (*clear) (void); int (*put) (int x, int y, char *text); int (*bar) (int type, int x, int y, int max, int len1, int len2); + int (*gpo) (int num, int val); int (*flush) (void); int (*quit) (void); } LCD; @@ -111,6 +117,7 @@ int lcd_query (int *rows, int *cols, int *xres, int *yres, int *bars); int lcd_clear (void); int lcd_put (int row, int col, char *text); int lcd_bar (int type, int row, int col, int max, int len1, int len2); +int lcd_gpo (int num, int val); int lcd_flush (void); int lcd_quit (void); diff --git a/processor.c b/processor.c index 752c48f..18eb22e 100644 --- a/processor.c +++ b/processor.c @@ -1,4 +1,4 @@ -/* $Id: processor.c,v 1.9 2001/02/11 23:34:07 reinelt Exp $ +/* $Id: processor.c,v 1.10 2001/02/13 09:00:13 reinelt Exp $ * * main data processing * @@ -20,12 +20,15 @@ * * * $Log: processor.c,v $ - * Revision 1.9 2001/02/11 23:34:07 reinelt + * Revision 1.10 2001/02/13 09:00:13 reinelt + * + * prepared framework for GPO's (general purpose outputs) * + * Revision 1.9 2001/02/11 23:34:07 reinelt * - * fixed a small bug where the throughput of an offline ISDN connection is displayed as '----', but the - * online value is 5 chars long. corrected to ' ----'. - * thanks to Carsten Nau <info@cnau.de> + * fixed a small bug where the throughput of an offline ISDN connection + * is displayed as '----', but the online value is 5 chars long. + * corrected to ' ----'. Thanks to Carsten Nau <info@cnau.de> * * Revision 1.8 2000/08/10 09:44:09 reinelt * |