source: rtems/c/src/libchip/rtc/icm7170.h @ 6a9db57

4.104.114.84.95
Last change on this file since 6a9db57 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on 11/17/99 at 17:51:34

Updated copyright notice.

  • Property mode set to 100644
File size: 2.3 KB
Line 
1/*
2 *  This file contains the definitions for the following real-time clocks:
3 *
4 *    + Harris Semiconduction ICM7170
5 *
6 *  COPYRIGHT (c) 1989-1999.
7 *  On-Line Applications Research Corporation (OAR).
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#ifndef __LIBCHIP_ICM7170_h
17#define __LIBCHIP_ICM7170_h
18
19/*
20 *  Register indices
21 */
22
23#define ICM7170_CONTROL             0x11
24
25
26#define ICM7170_COUNTER_HUNDREDTHS  0x00
27#define ICM7170_HOUR                0x01
28#define ICM7170_MINUTE              0x02
29#define ICM7170_SECOND              0x03
30#define ICM7170_MONTH               0x04
31#define ICM7170_DATE                0x05
32#define ICM7170_YEAR                0x06
33#define ICM7170_DAY_OF_WEEK         0x07
34
35/*
36 *  Configuration information in the parameters field
37 */
38
39#define ICM7170_AT_32_KHZ  0x00
40#define ICM7170_AT_1_MHZ   0x01
41#define ICM7170_AT_2_MHZ   0x02
42#define ICM7170_AT_4_MHZ   0x03
43
44/*
45 *  Driver function table
46 */
47
48extern rtc_fns icm7170_fns;
49
50/*
51 * Default register access routines
52 */
53
54unsigned32 icm7170_get_register(    /* registers are at 1 byte boundaries */
55  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
56  unsigned8   ucRegNum
57);
58
59void  icm7170_set_register(
60  unsigned32  ulCtrlPort,
61  unsigned8   ucRegNum,
62  unsigned32  ucData
63);
64
65unsigned32 icm7170_get_register_2(  /* registers are at 2 byte boundaries */
66  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
67  unsigned8   ucRegNum
68);
69
70void  icm7170_set_register_2(
71  unsigned32  ulCtrlPort,
72  unsigned8   ucRegNum,
73  unsigned32  ucData
74);
75
76unsigned32 icm7170_get_register_4(  /* registers are at 4 byte boundaries */
77  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
78  unsigned8   ucRegNum
79);
80
81void  icm7170_set_register_4(
82  unsigned32  ulCtrlPort,
83  unsigned8   ucRegNum,
84  unsigned32  ucData
85);
86
87unsigned32 icm7170_get_register_8(  /* registers are at 8 byte boundaries */
88  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
89  unsigned8   ucRegNum
90);
91
92void  icm7170_set_register_8(
93  unsigned32  ulCtrlPort,
94  unsigned8   ucRegNum,
95  unsigned32  ucData
96);
97
98#endif
99/* end of include file */
Note: See TracBrowser for help on using the repository browser.