Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: DevI2C/DevI2C.h
- Revision:
- 5:efc56a90dc5a
- Parent:
- 4:33ee0cf483de
- Child:
- 6:e16d452ac87b
--- a/DevI2C/DevI2C.h Fri May 22 14:33:42 2015 +0200 +++ b/DevI2C/DevI2C.h Wed May 27 11:56:24 2015 +0200 @@ -82,7 +82,7 @@ tmp[0] = RegisterAddr; memcpy(tmp+1, pBuffer, NumByteToWrite); - ret = write(DeviceAddr, (const char*)tmp, NumByteToWrite+1, 0); + ret = write(DeviceAddr, (const char*)tmp, NumByteToWrite+1, false); if(ret) return -1; return 0; @@ -105,10 +105,10 @@ int ret; /* Send device address, with no STOP condition */ - ret = write(DeviceAddr, (const char*)&RegisterAddr, 1, 1); + ret = write(DeviceAddr, (const char*)&RegisterAddr, 1, true); if(!ret) { /* Read data, with STOP condition */ - ret = read(DeviceAddr, (char*)pBuffer, NumByteToRead, 0); + ret = read(DeviceAddr, (char*)pBuffer, NumByteToRead, false); } if(ret) return -1;