2002-06-24 13:23:01 +00:00
|
|
|
/***************************************************************************
|
|
|
|
* __________ __ ___.
|
|
|
|
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
|
|
|
|
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
|
|
|
|
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
|
|
|
|
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
|
|
|
|
* \/ \/ \/ \/ \/
|
|
|
|
* $Id$
|
|
|
|
*
|
2003-01-22 12:50:34 +00:00
|
|
|
* Copyright (C) 2002 by Linus Nielsen Feltzing, Uwe Freese
|
2002-06-24 13:23:01 +00:00
|
|
|
*
|
|
|
|
* All files in this archive are subject to the GNU General Public License.
|
|
|
|
* See the file COPYING in the source tree root for full license agreement.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
****************************************************************************/
|
|
|
|
#ifndef _RTC_H_
|
|
|
|
#define _RTC_H_
|
|
|
|
|
2003-01-22 12:50:34 +00:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
2002-06-24 13:23:01 +00:00
|
|
|
#ifdef HAVE_RTC
|
2002-08-06 08:12:29 +00:00
|
|
|
void rtc_init(void);
|
2002-06-24 13:23:01 +00:00
|
|
|
int rtc_read(unsigned char address);
|
2002-11-20 00:00:56 +00:00
|
|
|
int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes);
|
2002-06-24 13:23:01 +00:00
|
|
|
int rtc_write(unsigned char address, unsigned char value);
|
2003-01-22 12:50:34 +00:00
|
|
|
|
|
|
|
#ifdef HAVE_ALARM_MOD
|
|
|
|
void rtc_set_alarm(int h, int m);
|
|
|
|
void rtc_get_alarm(int *h, int *m);
|
|
|
|
bool rtc_enable_alarm(bool enable);
|
2005-02-05 19:57:19 +00:00
|
|
|
bool rtc_check_alarm_started(bool release_alarm);
|
2005-02-06 17:21:42 +00:00
|
|
|
bool rtc_check_alarm_flag(void);
|
2003-01-22 12:50:34 +00:00
|
|
|
#endif /* HAVE_ALARM_MOD */
|
|
|
|
|
|
|
|
#endif /* HAVE_RTC */
|
2002-06-24 13:23:01 +00:00
|
|
|
|
|
|
|
#endif
|