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: Adafruit-BNO055-test
Diff: Adafruit_BNO055.cpp
- Revision:
- 1:b48e4192c101
- Parent:
- 0:22c544c8741a
- Child:
- 2:8092160b6a59
diff -r 22c544c8741a -r b48e4192c101 Adafruit_BNO055.cpp
--- a/Adafruit_BNO055.cpp Wed Sep 16 19:48:33 2015 +0000
+++ b/Adafruit_BNO055.cpp Wed Sep 16 20:27:32 2015 +0000
@@ -398,7 +398,9 @@
{
char reg_to_write = (char)(reg);
i2c->write(_address<<1, ®_to_write, 1, true);
+ wait(0.001);
i2c->write(_address<<1, &value, 1, false);
+ wait(0.001);
/* ToDo: Check for error! */
return true;
@@ -415,8 +417,9 @@
char to_write = (char)reg;
i2c->write(_address<<1, &to_write, 1, false);
+ wait(0.001);
i2c->read(_address<<1, &to_read, 1, false);
-
+ wait(0.001);
return to_read;
}
@@ -430,7 +433,9 @@
char reg_to_write = (char)(reg);
i2c->write(_address<<1, ®_to_write, 1, false);
+ wait(0.001);
i2c->read(_address<<1, buffer, len, false);
+ wait(0.001);
/* ToDo: Check for errors! */
return true;