source: rtems/c/src/libchip/rtc/rtc.h @ 509fec9c

4.104.114.84.95
Last change on this file since 509fec9c was ee4f57d, checked in by Ralf Corsepius <ralf.corsepius@…>, on 03/23/04 at 09:59:52

2004-03-23 Ralf Corsepius <ralf_corsepius@…>

  • libchip/ide/ata.c, libchip/ide/ata_internal.h, libchip/ide/ide_controller.c, libchip/ide/ide_ctrl_cfg.h, libchip/ide/ide_ctrl_io.h, libchip/network/cs8900.c, libchip/network/dec21140.c, libchip/network/elnk.c, libchip/network/if_fxp.c, libchip/network/open_eth.c, libchip/network/open_eth.h, libchip/network/sonic.c, libchip/network/sonic.h, libchip/rtc/icm7170.c, libchip/rtc/icm7170.h, libchip/rtc/icm7170_reg.c, libchip/rtc/icm7170_reg2.c, libchip/rtc/icm7170_reg4.c, libchip/rtc/icm7170_reg8.c, libchip/rtc/m48t08.c, libchip/rtc/m48t08.h, libchip/rtc/m48t08_reg.c, libchip/rtc/m48t08_reg2.c, libchip/rtc/m48t08_reg4.c, libchip/rtc/m48t08_reg8.c, libchip/rtc/rtc.h, libchip/serial/mc68681.c, libchip/serial/mc68681.h, libchip/serial/mc68681_reg.c, libchip/serial/mc68681_reg2.c, libchip/serial/mc68681_reg4.c, libchip/serial/mc68681_reg8.c, libchip/serial/ns16550.c, libchip/serial/ns16550_p.h, libchip/serial/serial.h, libchip/serial/z85c30.c, libchip/serial/z85c30.h, libchip/serial/z85c30_p.h, libchip/serial/z85c30_reg.c, libchip/shmdr/addlq.c, libchip/shmdr/cnvpkt.c, libchip/shmdr/dump.c, libchip/shmdr/fatal.c, libchip/shmdr/getlq.c, libchip/shmdr/init.c, libchip/shmdr/initlq.c, libchip/shmdr/intr.c, libchip/shmdr/poll.c, libchip/shmdr/send.c, libchip/shmdr/shm_driver.h: Convert to using c99 fixed-size types.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1/*
2 *  This file contains the Real-Time Clock definitions.
3 *
4 *  COPYRIGHT (c) 1989-1999.
5 *  On-Line Applications Research Corporation (OAR).
6 *
7 *  The license and distribution terms for this file may be
8 *  found in the file LICENSE in this distribution or at
9 *  http://www.rtems.com/license/LICENSE.
10 *
11 *
12 *  $Id$
13 */
14
15#ifndef __LIBCHIP_RTC_h
16#define __LIBCHIP_RTC_h
17
18/*
19 *  Types for get and set register routines
20 */
21
22typedef uint32_t   (*getRegister_f)(uint32_t   port, uint8_t   register);
23typedef void       (*setRegister_f)(
24                            uint32_t   port, uint8_t   reg, uint32_t   value);
25
26typedef struct _rtc_fns {
27  void    (*deviceInitialize)(int minor);
28  int     (*deviceGetTime)(int minor, rtems_time_of_day *time);
29  int     (*deviceSetTime)(int minor, rtems_time_of_day *time);
30} rtc_fns;
31
32typedef enum {
33  RTC_M48T08,                  /* SGS-Thomsom M48T08 or M48T18 */
34  RTC_ICM7170,                 /* Harris ICM-7170 */
35  RTC_CUSTOM                   /* BSP specific driver */
36} rtc_devs;
37
38/*
39 * Each field is interpreted thus:
40 *
41 * sDeviceName  This is the name of the device.
42 *
43 * deviceType   This indicates the chip type.
44 *
45 * pDeviceFns   This is a pointer to the set of driver routines to use.
46 *
47 * pDeviceParams This contains either device specific data or a pointer to a
48 *              device specific information table.
49 *
50 * ulCtrlPort1  This is the primary control port number for the device.
51 *
52 * ulCtrlPort2  This is the secondary control port number.
53 *
54 * ulDataPort   This is the port number for the data port of the device
55 *
56 * getRegister  This is the routine used to read register values.
57 *
58 * setRegister  This is the routine used to write register values.
59 */
60
61typedef struct _rtc_tbl {
62  char          *sDeviceName;
63  rtc_devs       deviceType;
64  rtc_fns       *pDeviceFns;
65  boolean      (*deviceProbe)(int minor);
66  void          *pDeviceParams;
67  uint32_t       ulCtrlPort1;
68  uint32_t       ulDataPort;
69  getRegister_f  getRegister;
70  setRegister_f  setRegister;
71} rtc_tbl;
72
73extern rtc_tbl        RTC_Table[];
74extern unsigned long  RTC_Count;
75
76
77boolean rtc_probe( int minor );
78
79#endif
80/* end of include file */
Note: See TracBrowser for help on using the repository browser.