blob: 31e7800e80742bae8d3e2a1a73aae4515dbca0da [file] [log] [blame]
David Kiliani3fedd142008-11-01 00:39:12 +01001/**
2 * @file me1600_ao_reg.h
3 *
4 * @brief ME-1600 analog output subdevice register definitions.
5 * @note Copyright (C) 2007 Meilhaus Electronic GmbH (support@meilhaus.de)
6 * @author Guenter Gebhardt
7 */
8
9/*
10 * Copyright (C) 2007 Meilhaus Electronic GmbH (support@meilhaus.de)
11 *
12 * This file is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License as published by
14 * the Free Software Foundation; either version 2 of the License, or
15 * (at your option) any later version.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, write to the Free Software
24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27#ifndef _ME1600_AO_REG_H_
28#define _ME1600_AO_REG_H_
29
30#ifdef __KERNEL__
31
32#define ME1600_CHANNEL_0_REG 0x00 /**< Register to set a digital value on channel 0. */
33#define ME1600_CHANNEL_1_REG 0x02 /**< Register to set a digital value on channel 1. */
34#define ME1600_CHANNEL_2_REG 0x04 /**< Register to set a digital value on channel 2. */
35#define ME1600_CHANNEL_3_REG 0x06 /**< Register to set a digital value on channel 3. */
36#define ME1600_CHANNEL_4_REG 0x08 /**< Register to set a digital value on channel 4. */
37#define ME1600_CHANNEL_5_REG 0x0A /**< Register to set a digital value on channel 5. */
38#define ME1600_CHANNEL_6_REG 0x0C /**< Register to set a digital value on channel 6. */
39#define ME1600_CHANNEL_7_REG 0x0E /**< Register to set a digital value on channel 7. */
40#define ME1600_CHANNEL_8_REG 0x10 /**< Register to set a digital value on channel 8. */
41#define ME1600_CHANNEL_9_REG 0x12 /**< Register to set a digital value on channel 9. */
42#define ME1600_CHANNEL_10_REG 0x14 /**< Register to set a digital value on channel 10. */
43#define ME1600_CHANNEL_11_REG 0x16 /**< Register to set a digital value on channel 11. */
44#define ME1600_CHANNEL_12_REG 0x18 /**< Register to set a digital value on channel 12. */
45#define ME1600_CHANNEL_13_REG 0x1A /**< Register to set a digital value on channel 13. */
46#define ME1600_CHANNEL_14_REG 0x1C /**< Register to set a digital value on channel 14. */
47#define ME1600_CHANNEL_15_REG 0x1E /**< Register to set a digital value on channel 15. */
48
49/* Every channel one bit: bipolar = 0, unipolar = 1 */
50#define ME1600_UNI_BI_REG 0x20 /**< Register to switch between unipolar and bipolar. */
51
52/* Every channel one bit (only lower 8 Bits): 0..20mA = 0, 4..20mA = 1 */
53#define ME1600_020_420_REG 0x22 /**< Register to switch between the two current ranges. */
54
55/* If a bit is set, the corresponding DAC (4 ports each) is
56 not set at the moment you write to an output of it.
57 Clearing the bit updates the port. */
58#define ME1600_SIM_OUTPUT_REG 0x24 /**< Register to update all channels of a subdevice simultaneously. */
59
60/* Current on/off (only lower 8 bits): off = 0, on = 1 */
61#define ME1600_CURRENT_ON_REG 0x26 /**< Register to swicht between voltage and current output. */
62
63#define ME1600_AO_MAX_DATA 0x0FFF /**< The maximum digital data accepted by an analog output channel. */
64
65#endif
66#endif