Fix typo.
[Rockbox.git] / firmware / export / rtc.h
blob3d7a6d6ead6b984df5b3091dc480680bf39c172e
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Linus Nielsen Feltzing, Uwe Freese
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
19 #ifndef _RTC_H_
20 #define _RTC_H_
22 #include <stdbool.h>
23 #include "system.h"
24 #include "config.h"
26 #if CONFIG_RTC
28 extern const int dayname[];
30 extern const int monthname[];
32 /* Common functions for all targets */
33 void rtc_init(void);
34 int rtc_read_datetime(unsigned char* buf);
35 int rtc_write_datetime(unsigned char* buf);
37 #if CONFIG_RTC == RTC_M41ST84W
39 /* The RTC in the Archos devices is used for much more than just the clock
40 data */
41 int rtc_read(unsigned char address);
42 int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes);
43 int rtc_write(unsigned char address, unsigned char value);
45 #endif /* RTC_M41ST84W */
47 #ifdef HAVE_RTC_ALARM
48 void rtc_set_alarm(int h, int m);
49 void rtc_get_alarm(int *h, int *m);
50 bool rtc_enable_alarm(bool enable);
51 bool rtc_check_alarm_started(bool release_alarm);
52 bool rtc_check_alarm_flag(void);
53 #endif /* HAVE_RTC_ALARM */
55 #endif /* CONFIG_RTC */
57 #endif