summaryrefslogtreecommitdiff
path: root/firmware/drivers/pcf50605.c
diff options
context:
space:
mode:
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)
89 89
90int pcf50605_write_multiple(int address, const unsigned char* buf, int count) 90int pcf50605_write_multiple(int address, const unsigned char* buf, int count)
91{ 91{
92 /* TODO */ 92 int i;
93 (void)address; 93 for (i = 0; i < count; i++)
94 (void)buf; 94 pp_i2c_send(0x8, address + i, buf[i]);
95 (void)count;
96 return 0; 95 return 0;
97} 96}
98 97
@@ -102,7 +101,8 @@ int pcf50605_write_multiple(int address, const unsigned char* buf, int count)
102 power on your iPod again. */ 101 power on your iPod again. */
103void pcf50605_standby_mode(void) 102void pcf50605_standby_mode(void)
104{ 103{
105 pcf50605_write(OOCC1, GOSTDBY | CHGWAK | EXTONWAK); 104 const char mask = pcf50605_read(OOCC1) | GOSTDBY | CHGWAK | EXTONWAK;
105 pcf50605_write(OOCC1, mask);
106} 106}
107 107
108void pcf50605_init(void) 108void pcf50605_init(void)