source: rtems/c/src/libchip/rtc/m48t08.h @ c95e927

4.104.114.84.9
Last change on this file since c95e927 was c95e927, checked in by Joel Sherrill <joel.sherrill@…>, on Jul 29, 1998 at 12:18:11 AM

Added prototype for default register access routines to header files.

Corrected prototypes to reflect unsigned32 values being passed around
instead of unsigned8's.

  • Property mode set to 100644
File size: 2.0 KB
Line 
1/*
2 *  This file contains the definitions for the following real-time clocks:
3 *
4 *    + Mostek M48T08
5 *    + Mostek M48T18
6 *    + Dallas Semiconductor DS1643
7 *
8 *  COPYRIGHT (c) 1989-1998.
9 *  On-Line Applications Research Corporation (OAR).
10 *  Copyright assigned to U.S. Government, 1994.
11 *
12 *  The license and distribution terms for this file may be
13 *  found in the file LICENSE in this distribution or at
14 *  http://www.OARcorp.com/rtems/license.html.
15 *
16 *  $Id$
17 */
18
19#ifndef __LIBCHIP_M48T08_h
20#define __LIBCHIP_M48T08_h
21
22/*
23 *  Register indices
24 */
25
26#define M48T08_CONTROL     0
27#define M48T08_SECOND      1
28#define M48T08_MINUTE      2
29#define M48T08_HOUR        3
30#define M48T08_DAY_OF_WEEK 4
31#define M48T08_DATE        5
32#define M48T08_MONTH       6
33#define M48T08_YEAR        7
34 
35/*
36 *  Driver function table
37 */
38
39extern rtc_fns m48t08_fns;
40
41/*
42 * Default register access routines
43 */
44
45unsigned32 m48t08_get_register(     /* registers are at 1 byte boundaries */
46  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
47  unsigned8   ucRegNum
48);
49
50void  m48t08_set_register(
51  unsigned32  ulCtrlPort,
52  unsigned8   ucRegNum,
53  unsigned32  ucData
54);
55
56unsigned32 m48t08_get_register_2(   /* registers are at 2 byte boundaries */
57  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
58  unsigned8   ucRegNum
59);
60
61void  m48t08_set_register_2(
62  unsigned32  ulCtrlPort,
63  unsigned8   ucRegNum,
64  unsigned32  ucData
65);
66
67unsigned32 m48t08_get_register_4(   /* registers are at 4 byte boundaries */
68  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
69  unsigned8   ucRegNum
70);
71
72void  m48t08_set_register_4(
73  unsigned32  ulCtrlPort,
74  unsigned8   ucRegNum,
75  unsigned32  ucData
76);
77
78unsigned32 m48t08_get_register_8(   /* registers are at 8 byte boundaries */
79  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
80  unsigned8   ucRegNum
81);
82
83void  m48t08_set_register_8(
84  unsigned32  ulCtrlPort,
85  unsigned8   ucRegNum,
86  unsigned32  ucData
87);
88
89#endif
90/* end of include file */
Note: See TracBrowser for help on using the repository browser.