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

4.104.115
Last change on this file since d0e2fa3 was a3d3d9a, checked in by Ralf Corsepius <ralf.corsepius@…>, on 04/20/04 at 10:43:39

Remove stray white spaces.

  • 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.rtems.com/license/LICENSE.
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
44uint32_t   m48t08_get_register(     /* registers are at 1 byte boundaries */
45  uint32_t    ulCtrlPort,           /*   and accessed as bytes            */
46  uint8_t     ucRegNum
47);
48
49void  m48t08_set_register(
50  uint32_t    ulCtrlPort,
51  uint8_t     ucRegNum,
52  uint32_t    ucData
53);
54
55uint32_t   m48t08_get_register_2(   /* registers are at 2 byte boundaries */
56  uint32_t    ulCtrlPort,           /*   and accessed as bytes            */
57  uint8_t     ucRegNum
58);
59
60void  m48t08_set_register_2(
61  uint32_t    ulCtrlPort,
62  uint8_t     ucRegNum,
63  uint32_t    ucData
64);
65
66uint32_t   m48t08_get_register_4(   /* registers are at 4 byte boundaries */
67  uint32_t    ulCtrlPort,           /*   and accessed as bytes            */
68  uint8_t     ucRegNum
69);
70
71void  m48t08_set_register_4(
72  uint32_t    ulCtrlPort,
73  uint8_t     ucRegNum,
74  uint32_t    ucData
75);
76
77uint32_t   m48t08_get_register_8(   /* registers are at 8 byte boundaries */
78  uint32_t    ulCtrlPort,           /*   and accessed as bytes            */
79  uint8_t     ucRegNum
80);
81
82void  m48t08_set_register_8(
83  uint32_t    ulCtrlPort,
84  uint8_t     ucRegNum,
85  uint32_t    ucData
86);
87
88#endif
89/* end of include file */
Note: See TracBrowser for help on using the repository browser.