1
0
Fork 0
forked from len0rd/rockbox

pcf50605_write_multiple must prelock driver or the series of bytes may be interrupted resulting in something you didn't intend. :)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15807 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2007-11-26 07:59:42 +00:00
parent e711de2974
commit 9beb210007

View file

@ -91,8 +91,14 @@ int pcf50605_write(int address, unsigned char val)
int pcf50605_write_multiple(int address, const unsigned char* buf, int count)
{
int i;
i2c_lock();
for (i = 0; i < count; i++)
pp_i2c_send(0x8, address + i, buf[i]);
i2c_unlock();
return 0;
}