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.
Fork of BalanceCar by
Diff: I2Cdev.cpp
- Revision:
- 2:99785a1007a4
- Parent:
- 0:a4d8f5b3c546
--- a/I2Cdev.cpp Sat Jun 04 04:06:36 2016 +0000
+++ b/I2Cdev.cpp Tue Jun 07 05:26:03 2016 +0000
@@ -1,15 +1,22 @@
#include "I2Cdev.h"
+extern DigitalOut myled;
static uint8_t buffer[24];
I2C g_i2c(P0_11, P0_10);
uint16_t I2Cdev::readTimeout = I2CDEV_DEFAULT_READ_TIMEOUT;
+void I2Cdev::init()
+{
+ g_i2c.frequency(267000);
+}
+
/** Default constructor.
*/
I2Cdev::I2Cdev()
{
g_i2c.frequency(400000);
+ //myled = 1;
}
/** Read a single bit from an 8-bit device register.
