• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /**
2  * @file me1000_dio_reg.h
3  *
4  * @brief ME-1000 digital i/o register definitions.
5  * @note Copyright (C) 2007 Meilhaus Electronic GmbH (support@meilhaus.de)
6  * @author Guenter Gebhardt
7  * @author Krzysztof Gantzke	(k.gantzke@meilhaus.de)
8  */
9 
10 /*
11  * Copyright (C) 2007 Meilhaus Electronic GmbH (support@meilhaus.de)
12  *
13  * This file is free software; you can redistribute it and/or modify
14  * it under the terms of the GNU General Public License as published by
15  * the Free Software Foundation; either version 2 of the License, or
16  * (at your option) any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * You should have received a copy of the GNU General Public License
24  * along with this program; if not, write to the Free Software
25  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
26  */
27 
28 #ifndef _ME1000_DIO_REG_H_
29 # define _ME1000_DIO_REG_H_
30 
31 # ifdef __KERNEL__
32 
33 # define ME1000_DIO_NUMBER_CHANNELS	32				/**< The number of channels per DIO port. */
34 # define ME1000_DIO_NUMBER_PORTS	4				/**< The number of ports per ME-1000. */
35 
36 // # define ME1000_PORT_A                               0x0000                  /**< Port A base register offset. */
37 // # define ME1000_PORT_B                               0x0004                  /**< Port B base register offset. */
38 // # define ME1000_PORT_C                               0x0008                  /**< Port C base register offset. */
39 // # define ME1000_PORT_D                               0x000C                  /**< Port D base register offset. */
40 # define ME1000_PORT				0x0000			/**< Base for port's register. */
41 # define ME1000_PORT_STEP			4				/**< Distance between port's register. */
42 
43 # define ME1000_PORT_MODE			0x0010			/**< Configuration register to switch the port direction. */
44 // # define ME1000_PORT_MODE_OUTPUT_A   (1 << 0)                /**< If set, port A is in output, otherwise in input mode. */
45 // # define ME1000_PORT_MODE_OUTPUT_B   (1 << 1)                /**< If set, port B is in output, otherwise in input mode. */
46 // # define ME1000_PORT_MODE_OUTPUT_C   (1 << 2)                /**< If set, port C is in output, otherwise in input mode. */
47 // # define ME1000_PORT_MODE_OUTPUT_D   (1 << 3)                /**< If set, port D is in output, otherwise in input mode. */
48 
49 # endif	//__KERNEL__
50 #endif //_ME1000_DIO_REG_H_
51