Class for making communication easier from code to i2c connected Rohm/Kionix sensors. Maybe could be used later also for abstracting Arduino/mbed os. Code ported from 'C'-library rohm-sensor-hal.
Dependents: kionix-kx123-hello rohm-bh1790glc-hello simple-sensor-client rohm-SensorShield-example
Fork of rohm-sensor-hal by
Diff: source/I2CCommonMbedHardwareLib.cpp
- Revision:
- 1:4d6dc19a2347
- Parent:
- 0:38c206f19bb7
- Child:
- 3:309530db41ec
--- a/source/I2CCommonMbedHardwareLib.cpp Mon Apr 11 08:26:39 2016 +0000
+++ b/source/I2CCommonMbedHardwareLib.cpp Tue Apr 12 04:57:59 2016 +0000
@@ -12,10 +12,9 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-#include "../rohm-sensor-hal/rohm_hal.h" //types, USE_MBED_HARDWARE_I2C, DEBUG_print*, I2C_SDA, I2C_SCL
+#include "../rohm-sensor-hal/rohm_hal.h" //types, USE_MBED_HARDWARE_I2C, DEBUG_print*, I2C.h, I2C_SDA, I2C_SCL
#ifdef USE_MBED_HARDWARE_I2C
#include "../rohm-sensor-hal/I2CCommon.h" //prototypes
-#include "I2C.h" //I2C
#define I2C_WRITE 0
#define I2C_READ 1
I2C i2c(I2C_SDA, I2C_SCL);
@@ -73,4 +72,4 @@
#endif
-
+
