diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-01-20 14:35:38 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2004-01-20 14:35:38 +0000 |
commit | d198bf228c98434578920e7301fb9edf13a37d3b (patch) | |
tree | 320ff85707722fc3a8ebcdc2f346d921a3810f2f /drv_generic_parport.h | |
parent | 57a7eddbbbff009cc52746e584cfd4857c0040f8 (diff) | |
download | lcd4linux-d198bf228c98434578920e7301fb9edf13a37d3b.tar.gz |
[lcd4linux @ 2004-01-20 14:35:38 by reinelt]
drv_generic_parport added, code from parport.c
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@326 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'drv_generic_parport.h')
-rw-r--r-- | drv_generic_parport.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/drv_generic_parport.h b/drv_generic_parport.h new file mode 100644 index 0000000..6decaa7 --- /dev/null +++ b/drv_generic_parport.h @@ -0,0 +1,87 @@ +/* $Id: drv_generic_parport.h,v 1.1 2004/01/20 14:35:38 reinelt Exp $ + * + * generic driver helper for parallel port displays + * + * Copyright 1999, 2000 Michael Reinelt <reinelt@eunet.at> + * Copyright 2004 The LCD4Linux Team <lcd4linux-devel@users.sourceforge.net> + * + * 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. + * + * + * $Log: drv_generic_parport.h,v $ + * Revision 1.1 2004/01/20 14:35:38 reinelt + * drv_generic_parport added, code from parport.c + * + */ + +/* + * + * exported fuctions: + * + * int drv_generic_parport_open (void) + * reads 'Port' entry from config and opens + * the parallel port + * returns 0 if ok, -1 on failure + * + * int drv_generic_parport_close (void) + * closes parallel port + * returns 0 if ok, -1 on failure + * + * unsigned char drv_generic_parport_wire_ctrl (char *name, char *deflt) + * reads wiring for one control signal from config + * returns DRV_GENERIC_PARPORT_CONTROL_* or 255 on error + * + * unsigned char drv_generic_parport_wire_data (char *name, char *deflt) + * reads wiring for one data signal from config + * returns 1<<bitpos or 255 on error + * + * void drv_generic_parport_direction (int direction) + * 0 - write to parport + * 1 - read from parport + * + * void drv_generic_parport_control (unsigned char mask, unsigned char value) + * frobs control line and takes care of inverted signals + * + * void drv_generic_parport_toggle (unsigned char bit, int level, int delay) + * toggles the line <bit> to <level> for <delay> nanoseconds + * + * void drv_generic_parport_data (unsigned char value) + * put data bits on DB1..DB8 + * + * unsigned char drv_generic_parport_read (void) + * reads a byte from the parallel port + * + * void drv_generic_parport_debug(void) + * prints status of control lines + * + */ + +#ifndef _DRV_GENERIC_PARPORT_H_ +#define _DRV_GENERIC_PARPORT_H_ + +int drv_generic_parport_open (void); +int drv_generic_parport_close (void); +unsigned char drv_generic_parport_wire_ctrl (char *name, unsigned char *deflt); +unsigned char drv_generic_parport_wire_data (char *name, unsigned char *deflt); +void drv_generic_parport_direction (int direction); +void drv_generic_parport_control (unsigned char mask, unsigned char value); +void drv_generic_parport_toggle (unsigned char bit, int level, int delay); +void drv_generic_parport_data (unsigned char data); +unsigned char drv_generic_parport_read (void); +void drv_generic_parport_debug (void); + +#endif |