OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rtems/] [c/] [src/] [libchip/] [rtc/] [icm7170.h] - Blame information for rev 1773

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 158 chris
/*
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 208 chris
 *  $Id: icm7170.h,v 1.2 2001-09-27 12:01:42 chris Exp $
14 158 chris
 */
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
 
48
extern rtc_fns icm7170_fns;
49
 
50
/*
51
 * Default register access routines
52
 */
53
 
54
unsigned32 icm7170_get_register(    /* registers are at 1 byte boundaries */
55
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
56
  unsigned8   ucRegNum
57
);
58
 
59
void  icm7170_set_register(
60
  unsigned32  ulCtrlPort,
61
  unsigned8   ucRegNum,
62
  unsigned32  ucData
63
);
64
 
65
unsigned32 icm7170_get_register_2(  /* registers are at 2 byte boundaries */
66
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
67
  unsigned8   ucRegNum
68
);
69
 
70
void  icm7170_set_register_2(
71
  unsigned32  ulCtrlPort,
72
  unsigned8   ucRegNum,
73
  unsigned32  ucData
74
);
75
 
76
unsigned32 icm7170_get_register_4(  /* registers are at 4 byte boundaries */
77
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
78
  unsigned8   ucRegNum
79
);
80
 
81
void  icm7170_set_register_4(
82
  unsigned32  ulCtrlPort,
83
  unsigned8   ucRegNum,
84
  unsigned32  ucData
85
);
86
 
87
unsigned32 icm7170_get_register_8(  /* registers are at 8 byte boundaries */
88
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
89
  unsigned8   ucRegNum
90
);
91
 
92
void  icm7170_set_register_8(
93
  unsigned32  ulCtrlPort,
94
  unsigned8   ucRegNum,
95
  unsigned32  ucData
96
);
97
 
98
#endif
99
/* end of include file */

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.