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

Subversion Repositories or1k

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

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
 *    + 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 208 chris
 *  $Id: m48t08.h,v 1.2 2001-09-27 12:01:42 chris Exp $
16 158 chris
 */
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
 
38
extern rtc_fns m48t08_fns;
39
 
40
/*
41
 * Default register access routines
42
 */
43
 
44
unsigned32 m48t08_get_register(     /* registers are at 1 byte boundaries */
45
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
46
  unsigned8   ucRegNum
47
);
48
 
49
void  m48t08_set_register(
50
  unsigned32  ulCtrlPort,
51
  unsigned8   ucRegNum,
52
  unsigned32  ucData
53
);
54
 
55
unsigned32 m48t08_get_register_2(   /* registers are at 2 byte boundaries */
56
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
57
  unsigned8   ucRegNum
58
);
59
 
60
void  m48t08_set_register_2(
61
  unsigned32  ulCtrlPort,
62
  unsigned8   ucRegNum,
63
  unsigned32  ucData
64
);
65
 
66
unsigned32 m48t08_get_register_4(   /* registers are at 4 byte boundaries */
67
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
68
  unsigned8   ucRegNum
69
);
70
 
71
void  m48t08_set_register_4(
72
  unsigned32  ulCtrlPort,
73
  unsigned8   ucRegNum,
74
  unsigned32  ucData
75
);
76
 
77
unsigned32 m48t08_get_register_8(   /* registers are at 8 byte boundaries */
78
  unsigned32  ulCtrlPort,           /*   and accessed as bytes            */
79
  unsigned8   ucRegNum
80
);
81
 
82
void  m48t08_set_register_8(
83
  unsigned32  ulCtrlPort,
84
  unsigned8   ucRegNum,
85
  unsigned32  ucData
86
);
87
 
88
#endif
89
/* end of include file */

powered by: WebSVN 2.1.0

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