Subversion Repositories shark

Rev

Rev 684 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
684 giacomo 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Paolo Gai           <pj@gandalf.sssup.it>
10
 *   Massimiliano Giorgi <massy@gandalf.sssup.it>
11
 *   Luca Abeni          <luca@gandalf.sssup.it>
12
 *   (see the web pages for full authors list)
13
 *
14
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
15
 *
16
 * http://www.sssup.it
17
 * http://retis.sssup.it
18
 * http://shark.sssup.it
19
 */
20
 
21
/**
22
 ------------
23
 CVS :        $Id: rtcfunc.h,v 1.1 2004-05-26 10:12:42 giacomo Exp $
24
 
25
 File:        $File$
26
 Revision:    $Revision: 1.1 $
27
 Last update: $Date: 2004-05-26 10:12:42 $
28
 ------------
29
 
30
**/
31
 
32
/*
33
 * Copyright (C) 2000 Massimiliano Giorgi
34
 *
35
 * This program is free software; you can redistribute it and/or modify
36
 * it under the terms of the GNU General Public License as published by
37
 * the Free Software Foundation; either version 2 of the License, or
38
 * (at your option) any later version.
39
 *
40
 * This program is distributed in the hope that it will be useful,
41
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
42
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43
 * GNU General Public License for more details.
44
 *
45
 * You should have received a copy of the GNU General Public License
46
 * along with this program; if not, write to the Free Software
47
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
48
 *
49
 */
50
 
51
/* Project:     HARTIK 3.0                                      */
52
/* Description: Hard Real TIme Kernel for 8086 compatible       */
53
/* Author:      Massimiliano Giorgi                             */
54
 
55
#ifndef __RTC_H__
56
#define __RTC_H__
57
 
58
#include <time.h>
59
 
1689 fabio 60
#include <arch/sys/cdefs.h>
684 giacomo 61
 
62
__BEGIN_DECLS
63
 
64
/*
65
 * The struct used to pass data via the following ioctl. Similar to the
66
 * struct tm in <time.h>, but it needs to be here so that the kernel
67
 * source is self contained, allowing cross-compiles, etc. etc.
68
 */
69
 
70
struct rtc_time {
71
  int tm_sec;
72
  int tm_min;
73
  int tm_hour;
74
  int tm_mday;
75
  int tm_mon;
76
  int tm_year;
77
  int tm_wday;
78
  int tm_yday;
79
  int tm_isdst;
80
};
81
 
82
int get_rtc_time (struct rtc_time *rtc_tm);
83
int set_rtc_time (struct rtc_time *rtc_tm);
84
 
85
time_t sys_getdate(void);
86
 
87
__END_DECLS
88
#endif