Some improvements on mrcrsch's BNO055_fusion library
Fork of BNO055_fusion by
Diff: BNO055.h
- Revision:
- 1:cb7e19c0a702
- Parent:
- 0:86a17116e8be
- Child:
- 2:0f225b686cd5
--- a/BNO055.h Sun Apr 05 04:12:58 2015 +0000 +++ b/BNO055.h Tue Apr 07 12:03:58 2015 +0000 @@ -7,7 +7,7 @@ * http://www.page.sannet.ne.jp/kenjia/index.html * http://mbed.org/users/kenjiArai/ * Created: March 30th, 2015 - * Revised: April 5th, 2015 + * Revised: April 7th, 2015 * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE @@ -113,7 +113,7 @@ * * Serial pc(USBTX,USBRX); * I2C i2c(PB_9, PB_8); // SDA, SCL - * BNO055 imu(i2c); + * BNO055 imu(i2c, PA_8); // Reset * * BNO055_ID_INF_TypeDef bno055_id_inf; * BNO055_EULER_TypeDef euler_angles; @@ -144,25 +144,25 @@ * @param data SDA and SCL pins * @param device address */ - BNO055(PinName p_sda, PinName p_scl, uint8_t addr, uint8_t mode); + BNO055(PinName p_sda, PinName p_scl, PinName p_reset, uint8_t addr, uint8_t mode); /** Configure data pin * @param data SDA and SCL pins * @param Other parameters are set default data */ - BNO055(PinName p_sda, PinName p_scl); + BNO055(PinName p_sda, PinName p_scl, PinName p_reset); /** Configure data pin (with other devices on I2C line) * @param I2C previous definition * @param device address */ - BNO055(I2C& p_i2c, uint8_t addr, uint8_t mode); + BNO055(I2C& p_i2c, PinName p_reset, uint8_t addr, uint8_t mode); /** Configure data pin (with other devices on I2C line) * @param I2C previous definition * @param Other parameters are set default data */ - BNO055(I2C& p_i2c); + BNO055(I2C& p_i2c, PinName p_reset); /** Get Euler Angles * @param double type of 3D data address @@ -215,6 +215,12 @@ */ uint8_t chip_ready(void); + /** Reset + * @param none + * @return 0 = sucess, 1 = Not avirable chip + */ + uint8_t reset(void); + /** Set I2C clock frequency * @param freq. * @return none @@ -256,6 +262,7 @@ uint8_t select_page(uint8_t page); I2C _i2c; + DigitalOut _res; private: char dt[10]; // working buffer