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 ITG3200 by
Diff: ITG3200.cpp
- Revision:
- 7:43b936a53b64
- Parent:
- 6:a7ad6046824c
- Child:
- 8:ac0365ab3cef
--- a/ITG3200.cpp Thu Sep 13 14:36:13 2012 +0000 +++ b/ITG3200.cpp Sat Sep 29 14:34:17 2012 +0000 @@ -35,12 +35,16 @@ #include "ITG3200.h" -ITG3200::ITG3200(PinName sda, PinName scl) : calibSamples(0), i2c_(sda, scl){ +ITG3200::ITG3200(PinName sda, PinName scl, bool fastmode) : calibSamples(0), i2c_(sda, scl){ offset[0] = offset[1] = offset[2] = 0; - //400kHz, fast mode. - i2c_.frequency(400000); + if(fastmode){ + //400kHz, fast mode. + i2c_.frequency(400000); + } + else + i2c_.frequency(100000); //Set FS_SEL to 0x03 for proper operation. //See datasheet for details.