GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / linux / linux-2.6.36 / drivers / staging / comedi / drivers / am9513.h
blob2dc5f020be122648e9d833664c4b2ac20122d184
1 /*
2 module/am9513.h
3 value added preprocessor definitions for Am9513 timer chip
5 COMEDI - Linux Control and Measurement Device Interface
6 Copyright (C) 1998 David A. Schleef <ds@schleef.org>
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef _AM9513_H_
25 #define _AM9513_H_
32 #ifdef Am9513_8BITBUS
34 #define Am9513_write_register(reg, val) \
35 do { \
36 Am9513_output_control(reg); \
37 Am9513_output_data(val>>8); \
38 Am9513_output_data(val&0xff); \
39 } while (0)
41 #define Am9513_read_register(reg, val) \
42 do { \
43 Am9513_output_control(reg); \
44 val = Am9513_input_data()<<8; \
45 val |= Am9513_input_data(); \
46 } while (0)
48 #else /* Am9513_16BITBUS */
50 #define Am9513_write_register(reg, val) \
51 do { \
52 Am9513_output_control(reg); \
53 Am9513_output_data(val); \
54 } while (0)
56 #define Am9513_read_register(reg, val) \
57 do { \
58 Am9513_output_control(reg); \
59 val = Am9513_input_data(); \
60 } while (0)
62 #endif
64 #endif