diff options
author | David Kiliani <mail@davidkiliani.de> | 2008-11-01 00:39:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-06 13:52:29 -0800 |
commit | 3fedd14818592016f7ffd84dfe134881b3896ecf (patch) | |
tree | 22574873dc7d844d4cc33d04f7e6ba03f23c639e /drivers/staging/meilhaus/me8255_reg.h | |
parent | 5ec5ec78060481e6a0cecc06ab0c6ec8b213ec80 (diff) |
Staging: Add the Meilhaus ME-IDS driver package
Originally written by Guenter Gebhardt <g.gebhardt@meilhaus.de>
and Krzysztof Gantzke <k.gantzke@meilhaus.de>
This is the drv/lnx/mod directory of ME-IDS 1.2.9 tarball with
some files from drv/lnx/include.
Signed-off-by: David Kiliani <mail@davidkiliani.de>
Cc: Guenter Gebhardt <g.gebhardt@meilhaus.de>
Cc: Krzysztof Gantzke <k.gantzke@meilhaus.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/meilhaus/me8255_reg.h')
-rw-r--r-- | drivers/staging/meilhaus/me8255_reg.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/staging/meilhaus/me8255_reg.h b/drivers/staging/meilhaus/me8255_reg.h new file mode 100644 index 00000000000..d1dea1a447f --- /dev/null +++ b/drivers/staging/meilhaus/me8255_reg.h @@ -0,0 +1,50 @@ +/** + * @file me8255_reg.h + * + * @brief 8255 counter register definitions. + * @note Copyright (C) 2006 Meilhaus Electronic GmbH (support@meilhaus.de) + * @author Guenter Gebhardt + */ + +#ifndef _ME8255_REG_H_ +#define _ME8255_REG_H_ + +#ifdef __KERNEL__ + +#define ME8255_NUMBER_CHANNELS 8 /**< The number of channels per 8255 port. */ + +#define ME1400AB_PORT_A_0 0x0000 /**< Port 0 offset. */ +#define ME1400AB_PORT_A_1 0x0001 /**< Port 1 offset. */ +#define ME1400AB_PORT_A_2 0x0002 /**< Port 2 offset. */ +#define ME1400AB_PORT_A_CTRL 0x0003 /**< Control register for 8255 A. */ + +#define ME1400AB_PORT_B_0 0x0008 /**< Port 0 offset. */ +#define ME1400AB_PORT_B_1 0x0009 /**< Port 1 offset. */ +#define ME1400AB_PORT_B_2 0x000A /**< Port 2 offset. */ +#define ME1400AB_PORT_B_CTRL 0x000B /**< Control register for 8255 B. */ + +#define ME1400CD_PORT_A_0 0x0000 /**< Port 0 offset. */ +#define ME1400CD_PORT_A_1 0x0001 /**< Port 1 offset. */ +#define ME1400CD_PORT_A_2 0x0002 /**< Port 2 offset. */ +#define ME1400CD_PORT_A_CTRL 0x0003 /**< Control register for 8255 A. */ + +#define ME1400CD_PORT_B_0 0x0040 /**< Port 0 offset. */ +#define ME1400CD_PORT_B_1 0x0041 /**< Port 1 offset. */ +#define ME1400CD_PORT_B_2 0x0042 /**< Port 2 offset. */ +#define ME1400CD_PORT_B_CTRL 0x0043 /**< Control register for 8255 B. */ + +#define ME8255_MODE_OOO 0x80 /**< Port 2 = Output, Port 1 = Output, Port 0 = Output */ +#define ME8255_MODE_IOO 0x89 /**< Port 2 = Input, Port 1 = Output, Port 0 = Output */ +#define ME8255_MODE_OIO 0x82 /**< Port 2 = Output, Port 1 = Input, Port 0 = Output */ +#define ME8255_MODE_IIO 0x8B /**< Port 2 = Input, Port 1 = Input, Port 0 = Output */ +#define ME8255_MODE_OOI 0x90 /**< Port 2 = Output, Port 1 = Output, Port 0 = Input */ +#define ME8255_MODE_IOI 0x99 /**< Port 2 = Input, Port 1 = Output, Port 0 = Input */ +#define ME8255_MODE_OII 0x92 /**< Port 2 = Output, Port 1 = Input, Port 0 = Input */ +#define ME8255_MODE_III 0x9B /**< Port 2 = Input, Port 1 = Input, Port 0 = Input */ + +#define ME8255_PORT_0_OUTPUT 0x1 /**< If set in mirror then port 0 is in output mode. */ +#define ME8255_PORT_1_OUTPUT 0x2 /**< If set in mirror then port 1 is in output mode. */ +#define ME8255_PORT_2_OUTPUT 0x4 /**< If set in mirror then port 2 is in output mode. */ + +#endif +#endif |