Add the viewport functions to the screens API, including a new getfont() function...
[Rockbox.git] / firmware / export / rtc.h
blob8d54e8b442d47180565d969b4a76c6f0f8da6f24
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 /* Common functions for all targets */
29 void rtc_init(void);
30 int rtc_read_datetime(unsigned char* buf);
31 int rtc_write_datetime(unsigned char* buf);
33 #if CONFIG_RTC == RTC_M41ST84W
35 /* The RTC in the Archos devices is used for much more than just the clock
36 data */
37 int rtc_read(unsigned char address);
38 int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes);
39 int rtc_write(unsigned char address, unsigned char value);
41 #endif /* RTC_M41ST84W */
43 #ifdef HAVE_RTC_ALARM
44 void rtc_set_alarm(int h, int m);
45 void rtc_get_alarm(int *h, int *m);
46 bool rtc_enable_alarm(bool enable);
47 bool rtc_check_alarm_started(bool release_alarm);
48 bool rtc_check_alarm_flag(void);
49 #endif /* HAVE_RTC_ALARM */
51 #endif /* CONFIG_RTC */
53 #endif