From a333e489d2e984b87f7a33f33b9411292e04f489 Mon Sep 17 00:00:00 2001 From: Rob Purchase Date: Sun, 20 Apr 2008 21:20:16 +0000 Subject: Enable RTC for Cowon D2. Time readout works, but date is currently junk. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17200 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/pcf50606.c | 10 ++++++++++ firmware/export/config-cowond2.h | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/firmware/drivers/pcf50606.c b/firmware/drivers/pcf50606.c index a93b94399e..d28fc00e7d 100644 --- a/firmware/drivers/pcf50606.c +++ b/firmware/drivers/pcf50606.c @@ -27,6 +27,16 @@ int pcf50606_write(int address, unsigned char val) return i2c_write(PCF50606_ADDR, data, 2); } +int pcf50606_write_multiple(int address, const unsigned char* buf, int count) +{ + int i; + + for (i = 0; i < count; i++) + pcf50606_write(address + i, buf[i]); + + return 0; +} + int pcf50606_read(int address) { unsigned char val = -1; diff --git a/firmware/export/config-cowond2.h b/firmware/export/config-cowond2.h index d3b23b225d..d71e528134 100644 --- a/firmware/export/config-cowond2.h +++ b/firmware/export/config-cowond2.h @@ -59,7 +59,7 @@ #define HAVE_TOUCHPAD /* define this if you have a real-time clock */ -//#define CONFIG_RTC RTC_TCC780X +#define CONFIG_RTC RTC_PCF50606 /* define this if you have RTC RAM available for settings */ //#define HAVE_RTC_RAM -- cgit v1.2.3