-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 141359 b: refs/heads/master c: fc59905 h: refs/heads/master i: 141357: b767818 141355: 3d5c34c 141351: 5908dbe 141343: 05d3d10 v: v3
- Loading branch information
David Schleef
authored and
Greg Kroah-Hartman
committed
Apr 3, 2009
1 parent
316e8c1
commit 489ee49
Showing
3 changed files
with
536 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 8b93f9034efbf2874d8809a9b8233e596bcbd5b1 | ||
refs/heads/master: fc59905e44d43fb2121c87b2c4381e3d0efd87b6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
/* | ||
module/am9513.h | ||
value added preprocessor definitions for Am9513 timer chip | ||
COMEDI - Linux Control and Measurement Device Interface | ||
Copyright (C) 1998 David A. Schleef <ds@schleef.org> | ||
This program 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 of the License, or | ||
(at your option) any later version. | ||
This program 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. | ||
*/ | ||
|
||
#ifndef _AM9513_H_ | ||
#define _AM9513_H_ | ||
|
||
#if 0 | ||
|
||
/* | ||
* Before including this file, the following need to be defined: | ||
*/ | ||
#define Am9513_8BITBUS xxx | ||
/* or */ | ||
#define Am9513_16BITBUS xxx | ||
|
||
#define Am9513_output_control(a) xxx | ||
#define Am9513_input_status() xxx | ||
#define Am9513_output_data(a) xxx | ||
#define Am9513_input_data() xxx | ||
|
||
#endif | ||
|
||
/* | ||
* | ||
*/ | ||
|
||
#ifdef Am9513_8BITBUS | ||
|
||
#define Am9513_write_register(reg,val) \ | ||
do{ \ | ||
Am9513_output_control(reg); \ | ||
Am9513_output_data(val>>8); \ | ||
Am9513_output_data(val&0xff); \ | ||
}while(0) | ||
|
||
#define Am9513_read_register(reg,val) \ | ||
do{ \ | ||
Am9513_output_control(reg); \ | ||
val=Am9513_input_data()<<8; \ | ||
val|=Am9513_input_data(); \ | ||
}while(0) | ||
|
||
#else /* Am9513_16BITBUS */ | ||
|
||
#define Am9513_write_register(reg,val) \ | ||
do{ \ | ||
Am9513_output_control(reg); \ | ||
Am9513_output_data(val); \ | ||
}while(0) | ||
|
||
#define Am9513_read_register(reg,val) \ | ||
do{ \ | ||
Am9513_output_control(reg); \ | ||
val=Am9513_input_data(); \ | ||
}while(0) | ||
|
||
#endif | ||
|
||
#endif |
Oops, something went wrong.