Felipe Neves
/
lpc4337_acc_demo
Demonstration of mbed os Threading capabilities using LPC4337 board and the general purpose shield
Revision 2:8595c827daa9, committed 2016-09-19
- Comitter:
- uLipe
- Date:
- Mon Sep 19 22:52:06 2016 +0000
- Parent:
- 1:b4065d4d692a
- Commit message:
- fix on acc task
Changed in this revision
main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Mon Sep 19 21:01:30 2016 +0000 +++ b/main.cpp Mon Sep 19 22:52:06 2016 +0000 @@ -74,7 +74,9 @@ i2c_reg_buffer[1] = 0x28; imu_comm->write(BMI160_ADDR, i2c_reg_buffer, sizeof(i2c_reg_buffer), false); - for(;;) { + for(;;) { + int err = 0; + /* reads status register */ i2c_reg_buffer[0] = 0x1B; err = imu_comm->write(BMI160_ADDR, i2c_reg_buffer, 1, true);