Fork of X_NUCLEO_COMMON lib adding 16-bit SPI support
Fork of X_NUCLEO_COMMON by
Revision 5:efc56a90dc5a, committed 2015-05-27
- Comitter:
- Wolfgang Betz
- Date:
- Wed May 27 11:56:24 2015 +0200
- Parent:
- 4:33ee0cf483de
- Child:
- 6:e16d452ac87b
- Commit message:
- Refine board's component types
Changed in this revision
| DevI2C/DevI2C.h | Show annotated file Show diff for this revision Revisions of this file |
--- 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;
