Computes Euler angles
Fork of X_NUCLEO_COMMON by
Diff: DevI2C/DevI2C.h
- Revision:
- 5:efc56a90dc5a
- Parent:
- 4:33ee0cf483de
- Child:
- 6:e16d452ac87b
diff -r 33ee0cf483de -r efc56a90dc5a DevI2C/DevI2C.h --- 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;