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: Base_I2C_Device.cpp
- Revision:
- 1:700cce0a0ca8
- Parent:
- 0:fa683f936086
- Child:
- 2:0a77105ec549
--- a/Base_I2C_Device.cpp Wed May 06 02:49:13 2015 +0000
+++ b/Base_I2C_Device.cpp Tue Jul 28 14:45:29 2015 +0000
@@ -32,8 +32,7 @@
temp_write[0] = reg;
temp_write[1] = value; //check order of these (endianness)
- i2c.write(m_address, temp_write, 2, 0);
- return 0;
+ return i2c.write(m_address, temp_write, 2, 0);
}
int Base_I2C_Device::WriteRegister(uint8_t reg, uint16_t value)
@@ -43,6 +42,5 @@
temp_write[0] = reg;
temp_write[1] = value>>8;
temp_write[2] = (value & 0xFF);
- i2c.write(m_address, temp_write, 3, 0);
- return 0;
+ return i2c.write(m_address, temp_write, 3, 0);
}
\ No newline at end of file