forked from len0rd/rockbox
FS#6419 - driver for H1x0 series RTC Mod with runtime detection
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12520 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
343c428f2c
commit
50b5ee4781
18 changed files with 660 additions and 268 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#define _RTC_H_
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <system.h>
|
||||
|
||||
#ifdef CONFIG_RTC
|
||||
|
||||
|
|
@ -27,6 +28,10 @@ extern const int dayname[];
|
|||
|
||||
extern const int monthname[];
|
||||
|
||||
#if CONFIG_RTC == RTC_DS1339_DS3231
|
||||
extern bool rtc_detected;
|
||||
#endif
|
||||
|
||||
/* Common functions for all targets */
|
||||
void rtc_init(void);
|
||||
int rtc_read_datetime(unsigned char* buf);
|
||||
|
|
@ -40,6 +45,8 @@ int rtc_read(unsigned char address);
|
|||
int rtc_read_multiple(unsigned char address, unsigned char *buf, int numbytes);
|
||||
int rtc_write(unsigned char address, unsigned char value);
|
||||
|
||||
#endif /* RTC_M41ST84W */
|
||||
|
||||
#ifdef HAVE_ALARM_MOD
|
||||
void rtc_set_alarm(int h, int m);
|
||||
void rtc_get_alarm(int *h, int *m);
|
||||
|
|
@ -48,8 +55,6 @@ bool rtc_check_alarm_started(bool release_alarm);
|
|||
bool rtc_check_alarm_flag(void);
|
||||
#endif /* HAVE_ALARM_MOD */
|
||||
|
||||
#endif /* RTC_M41ST84W */
|
||||
|
||||
#endif /* CONFIG_RTC */
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue