source: rtems/c/src/libchip/serial/z85c30_reg.c @ ae55da72

4.115
Last change on this file since ae55da72 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.4 KB
Line 
1/*
2 *  This file contains a typical set of register access routines which may be
3 *  used with the z85c30 chip if accesses to the chip are as follows:
4 *
5 *    + registers are accessed as bytes
6 *
7 *  COPYRIGHT (c) 1989-1997.
8 *  On-Line Applications Research Corporation (OAR).
9 *
10 *  The license and distribution terms for this file may be
11 *  found in the file LICENSE in this distribution or at
12 *  http://www.rtems.com/license/LICENSE.
13 */
14
15#include <rtems.h>
16
17#ifndef _Z85C30_MULTIPLIER
18#define _Z85C30_MULTIPLIER 1
19#define _Z85C30_NAME(_X) _X
20#define _Z85C30_TYPE uint8_t
21#endif
22
23/*
24 *  Z85C30 Get Register Routine
25 */
26
27uint8_t   _Z85C30_NAME(z85c30_get_register)(
28  uintptr_t   ulCtrlPort,
29  uint8_t     ucRegNum
30)
31{
32  _Z85C30_TYPE          *port;
33  uint8_t                data;
34  rtems_interrupt_level  level;
35
36  port = (_Z85C30_TYPE *)ulCtrlPort;
37
38  rtems_interrupt_disable(level);
39
40    if(ucRegNum) {
41      *port = ucRegNum;
42    }
43    data = *port;
44  rtems_interrupt_enable(level);
45
46  return data;
47}
48
49/*
50 *  Z85C30 Set Register Routine
51 */
52
53void _Z85C30_NAME(z85c30_set_register)(
54  uintptr_t   ulCtrlPort,
55  uint8_t     ucRegNum,
56  uint8_t     ucData
57)
58{
59  _Z85C30_TYPE          *port;
60  rtems_interrupt_level  level;
61
62  port = (_Z85C30_TYPE *)ulCtrlPort;
63
64  rtems_interrupt_disable(level);
65    if(ucRegNum) {
66      *port = ucRegNum;
67    }
68    *port = ucData;
69  rtems_interrupt_enable(level);
70}
Note: See TracBrowser for help on using the repository browser.