summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Purchase <shotofadds@rockbox.org>2008-04-20 21:20:16 +0000
committerRob Purchase <shotofadds@rockbox.org>2008-04-20 21:20:16 +0000
commita333e489d2e984b87f7a33f33b9411292e04f489 (patch)
tree2754e5a574b5fa3fdb263e0f2d90b05afd4b94d0
parentac1b30ef7351fdda552dede1cd08add823ca602c (diff)
downloadrockbox-a333e489d2e984b87f7a33f33b9411292e04f489.tar.gz
rockbox-a333e489d2e984b87f7a33f33b9411292e04f489.zip
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
-rw-r--r--firmware/drivers/pcf50606.c10
-rw-r--r--firmware/export/config-cowond2.h2
2 files changed, 11 insertions, 1 deletions
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)
27 return i2c_write(PCF50606_ADDR, data, 2); 27 return i2c_write(PCF50606_ADDR, data, 2);
28} 28}
29 29
30int pcf50606_write_multiple(int address, const unsigned char* buf, int count)
31{
32 int i;
33
34 for (i = 0; i < count; i++)
35 pcf50606_write(address + i, buf[i]);
36
37 return 0;
38}
39
30int pcf50606_read(int address) 40int pcf50606_read(int address)
31{ 41{
32 unsigned char val = -1; 42 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 @@
59#define HAVE_TOUCHPAD 59#define HAVE_TOUCHPAD
60 60
61/* define this if you have a real-time clock */ 61/* define this if you have a real-time clock */
62//#define CONFIG_RTC RTC_TCC780X 62#define CONFIG_RTC RTC_PCF50606
63 63
64/* define this if you have RTC RAM available for settings */ 64/* define this if you have RTC RAM available for settings */
65//#define HAVE_RTC_RAM 65//#define HAVE_RTC_RAM