RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
icm7170.h
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.rtems.org/license/LICENSE.
12 */
13
14#ifndef __LIBCHIP_ICM7170_h
15#define __LIBCHIP_ICM7170_h
16
17/*
18 * Register indices
19 */
20
21#define ICM7170_CONTROL 0x11
22
23
24#define ICM7170_COUNTER_HUNDREDTHS 0x00
25#define ICM7170_HOUR 0x01
26#define ICM7170_MINUTE 0x02
27#define ICM7170_SECOND 0x03
28#define ICM7170_MONTH 0x04
29#define ICM7170_DATE 0x05
30#define ICM7170_YEAR 0x06
31#define ICM7170_DAY_OF_WEEK 0x07
32
33/*
34 * Configuration information in the parameters field
35 */
36
37#define ICM7170_AT_32_KHZ 0x00
38#define ICM7170_AT_1_MHZ 0x01
39#define ICM7170_AT_2_MHZ 0x02
40#define ICM7170_AT_4_MHZ 0x03
41
42/*
43 * Driver function table
44 */
45
46extern rtc_fns icm7170_fns;
47
48/*
49 * Default register access routines
50 */
51
52uint32_t icm7170_get_register( /* registers are at 1 byte boundaries */
53 uintptr_t ulCtrlPort, /* and accessed as bytes */
54 uint8_t ucRegNum
55);
56
57void icm7170_set_register(
58 uintptr_t ulCtrlPort,
59 uint8_t ucRegNum,
60 uint32_t ucData
61);
62
63uint32_t icm7170_get_register_2( /* registers are at 2 byte boundaries */
64 uintptr_t ulCtrlPort, /* and accessed as bytes */
65 uint8_t ucRegNum
66);
67
68void icm7170_set_register_2(
69 uintptr_t ulCtrlPort,
70 uint8_t ucRegNum,
71 uint32_t ucData
72);
73
74uint32_t icm7170_get_register_4( /* registers are at 4 byte boundaries */
75 uintptr_t ulCtrlPort, /* and accessed as bytes */
76 uint8_t ucRegNum
77);
78
79void icm7170_set_register_4(
80 uintptr_t ulCtrlPort,
81 uint8_t ucRegNum,
82 uint32_t ucData
83);
84
85uint32_t icm7170_get_register_8( /* registers are at 8 byte boundaries */
86 uintptr_t ulCtrlPort, /* and accessed as bytes */
87 uint8_t ucRegNum
88);
89
90void icm7170_set_register_8(
91 uintptr_t ulCtrlPort,
92 uint8_t ucRegNum,
93 uint32_t ucData
94);
95
96#endif
97/* end of include file */
Definition: rtc.h:27