4.115
Last change
on this file since 9b4422a2 was
9b4422a2,
checked in by Joel Sherrill <joel.sherrill@…>, on 05/03/12 at 15:09:24
|
Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.
+ remove occurrences of two blank comment lines
next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
contain CVS Ids
+ If the processing left a blank line at the top of
a file, it was removed.
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Rev | Line | |
---|
[cce9322] | 1 | /* |
---|
| 2 | * This file contains a typical set of register access routines which may be |
---|
| 3 | * used with the mc68681 chip if accesses to the chip are as follows: |
---|
| 4 | * |
---|
| 5 | * + registers are accessed as bytes |
---|
| 6 | * + registers are only byte-aligned (no address gaps) |
---|
| 7 | * |
---|
| 8 | * COPYRIGHT (c) 1989-1997. |
---|
| 9 | * On-Line Applications Research Corporation (OAR). |
---|
| 10 | * |
---|
| 11 | * The license and distribution terms for this file may be |
---|
| 12 | * found in the file LICENSE in this distribution or at |
---|
[94365d9] | 13 | * http://www.rtems.com/license/LICENSE. |
---|
[cce9322] | 14 | */ |
---|
| 15 | |
---|
| 16 | #include <rtems.h> |
---|
| 17 | |
---|
| 18 | #ifndef _MC68681_MULTIPLIER |
---|
| 19 | #define _MC68681_MULTIPLIER 1 |
---|
| 20 | #define _MC68681_NAME(_X) _X |
---|
[a3d3d9a] | 21 | #define _MC68681_TYPE uint8_t |
---|
[cce9322] | 22 | #endif |
---|
| 23 | |
---|
| 24 | #define CALCULATE_REGISTER_ADDRESS( _base, _reg ) \ |
---|
| 25 | (_MC68681_TYPE *)((_base) + ((_reg) * _MC68681_MULTIPLIER )) |
---|
| 26 | |
---|
[a3d3d9a] | 27 | /* |
---|
[cce9322] | 28 | * MC68681 Get Register Routine |
---|
| 29 | */ |
---|
| 30 | |
---|
[ee4f57d] | 31 | uint8_t _MC68681_NAME(mc68681_get_register)( |
---|
[642c500] | 32 | uintptr_t ulCtrlPort, |
---|
[ee4f57d] | 33 | uint8_t ucRegNum |
---|
[cce9322] | 34 | ) |
---|
| 35 | { |
---|
[849dc107] | 36 | _MC68681_TYPE *port; |
---|
[cce9322] | 37 | |
---|
| 38 | port = CALCULATE_REGISTER_ADDRESS( ulCtrlPort, ucRegNum ); |
---|
| 39 | |
---|
| 40 | return *port; |
---|
| 41 | } |
---|
| 42 | |
---|
| 43 | /* |
---|
| 44 | * MC68681 Set Register Routine |
---|
| 45 | */ |
---|
| 46 | |
---|
| 47 | void _MC68681_NAME(mc68681_set_register)( |
---|
[642c500] | 48 | uintptr_t ulCtrlPort, |
---|
[ee4f57d] | 49 | uint8_t ucRegNum, |
---|
| 50 | uint8_t ucData |
---|
[cce9322] | 51 | ) |
---|
| 52 | { |
---|
[849dc107] | 53 | _MC68681_TYPE *port; |
---|
[cce9322] | 54 | |
---|
| 55 | port = CALCULATE_REGISTER_ADDRESS( ulCtrlPort, ucRegNum ); |
---|
| 56 | |
---|
| 57 | *port = ucData; |
---|
| 58 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.