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

4.104.114.84.9
Last change on this file since 08311cc3 was 08311cc3, checked in by Joel Sherrill <joel.sherrill@…>, on Nov 17, 1999 at 5:51:34 PM

Updated copyright notice.

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