summaryrefslogtreecommitdiff
path: root/firmware/drivers/pcf50605.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-02-28 21:55:11 +0000
committerThom Johansen <thomj@rockbox.org>2007-02-28 21:55:11 +0000
commit8fd6d658a1caeddc0a84dd69ffe45739bd466e74 (patch)
tree91f79d4d40d898a303998710a18ae62d8b8c7082 /firmware/drivers/pcf50605.c
parentab66955664f8987d064247dc6d585b5618745d29 (diff)
Add wake on alarm support for Ipods. Rename HAVE_ALARM_MOD to HAVE_ALARM_RTC since it's not always a mod. Make Ipod PCF driver keep other flags in OOCC1 that have been set instead of overwriting them.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12522 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/pcf50605.c')
-rw-r--r--firmware/drivers/pcf50605.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/drivers/pcf50605.c b/firmware/drivers/pcf50605.c
index 0610f41aec..cf4ea9fecb 100644
--- a/firmware/drivers/pcf50605.c
+++ b/firmware/drivers/pcf50605.c
@@ -89,10 +89,9 @@ int pcf50605_write(int address, unsigned char val)
int pcf50605_write_multiple(int address, const unsigned char* buf, int count)
{
- /* TODO */
- (void)address;
- (void)buf;
- (void)count;
+ int i;
+ for (i = 0; i < count; i++)
+ pp_i2c_send(0x8, address + i, buf[i]);
return 0;
}
@@ -102,7 +101,8 @@ int pcf50605_write_multiple(int address, const unsigned char* buf, int count)
power on your iPod again. */
void pcf50605_standby_mode(void)
{
- pcf50605_write(OOCC1, GOSTDBY | CHGWAK | EXTONWAK);
+ const char mask = pcf50605_read(OOCC1) | GOSTDBY | CHGWAK | EXTONWAK;
+ pcf50605_write(OOCC1, mask);
}
void pcf50605_init(void)