modified MMA8451Q library for firefly project
Fork of MMA8451Q by
Diff: MMA8451Q.cpp
- Revision:
- 5:2948042a73f1
- Parent:
- 3:db7126dbd63f
--- a/MMA8451Q.cpp Fri Oct 12 11:35:07 2012 +0000 +++ b/MMA8451Q.cpp Mon Jun 20 06:29:58 2016 +0000 @@ -28,6 +28,7 @@ MMA8451Q::MMA8451Q(PinName sda, PinName scl, int addr) : m_i2c(sda, scl), m_addr(addr) { // activate the peripheral + m_i2c.frequency(2000000); uint8_t data[2] = {REG_CTRL_REG_1, 0x01}; writeRegs(data, 2); }