diff options
Diffstat (limited to 'firmware/drivers/pcf50605.c')
-rw-r--r-- | firmware/drivers/pcf50605.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/firmware/drivers/pcf50605.c b/firmware/drivers/pcf50605.c index c8ea4a499f..a8c61b1789 100644 --- a/firmware/drivers/pcf50605.c +++ b/firmware/drivers/pcf50605.c | |||
@@ -23,6 +23,7 @@ | |||
23 | * KIND, either express or implied. | 23 | * KIND, either express or implied. |
24 | * | 24 | * |
25 | ****************************************************************************/ | 25 | ****************************************************************************/ |
26 | #include "system.h" | ||
26 | #include "config.h" | 27 | #include "config.h" |
27 | #if CONFIG_I2C == I2C_PP5020 | 28 | #if CONFIG_I2C == I2C_PP5020 |
28 | #include "i2c-pp5020.h" | 29 | #include "i2c-pp5020.h" |
@@ -72,15 +73,8 @@ int pcf50605_read(int address) | |||
72 | 73 | ||
73 | int pcf50605_read_multiple(int address, unsigned char* buf, int count) | 74 | int pcf50605_read_multiple(int address, unsigned char* buf, int count) |
74 | { | 75 | { |
75 | int i; | 76 | int read = i2c_readbytes(0x08, address, count, buf); |
76 | 77 | return read - count; | |
77 | for (i=0;i<count;i++) | ||
78 | { | ||
79 | buf[i]=pcf50605_read(address); | ||
80 | address++; | ||
81 | } | ||
82 | |||
83 | return 0; | ||
84 | } | 78 | } |
85 | 79 | ||
86 | int pcf50605_write(int address, unsigned char val) | 80 | int pcf50605_write(int address, unsigned char val) |