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.
Dependents: Seed_Barometer_Sensor_custom_I2C_lib
Revision 2:9d9fc94594e3, committed 2014-10-22
- Comitter:
- jaerts
- Date:
- Wed Oct 22 11:18:05 2014 +0000
- Parent:
- 1:6e73259cca6e
- Commit message:
- Reset after changing pins on init
Changed in this revision
| I2CX.cpp | Show annotated file Show diff for this revision Revisions of this file |
| I2CX.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/I2CX.cpp Wed Oct 22 10:32:42 2014 +0000
+++ b/I2CX.cpp Wed Oct 22 11:18:05 2014 +0000
@@ -37,6 +37,8 @@
_i2c.sda = sda;
_i2c.scl = scl;
+ i2c_reset(&_i2c);
+
// Used to avoid unnecessary frequency updates
_owner = this;
}
--- a/I2CX.h Wed Oct 22 10:32:42 2014 +0000
+++ b/I2CX.h Wed Oct 22 11:18:05 2014 +0000
@@ -29,11 +29,12 @@
* Example:
* @code
* // Read from I2C slave at address 0x62
- *
+ *
* #include "mbed.h"
- *
- * I2C i2c(I2C_0, p28, p27);
- *
+ * #include "I2CX.h"
+ *
+ * I2CX i2c(I2C_0, p28, p27);
+ *
* int main() {
* int address = 0x62;
* char data[2];