Revision a7b2a1c9

View differences:

Adafruit_BNO055.cpp
710 710
}
711 711

  
712 712
/*!
713
 *  @brief  Enter Suspend mode (i.e., sleep)
714
 */
715
void Adafruit_BNO055::enterSuspendMode() {
716
  adafruit_bno055_opmode_t modeback = _mode;
717

  
718
  /* Switch to config mode (just in case since this is the default) */
719
  setMode(OPERATION_MODE_CONFIG);
720
  delay(25);
721
  write8(BNO055_PWR_MODE_ADDR, 0x02);
722
  /* Set the requested operating mode (see section 3.3) */
723
  setMode(modeback);
724
  delay(20);
725
}
726

  
727
/*!
728
 *  @brief  Enter Normal mode (i.e., wake)
729
 */
730
void Adafruit_BNO055::enterNormalMode() {
731
  adafruit_bno055_opmode_t modeback = _mode;
732

  
733
  /* Switch to config mode (just in case since this is the default) */
734
  setMode(OPERATION_MODE_CONFIG);
735
  delay(25);
736
  write8(BNO055_PWR_MODE_ADDR, 0x00);
737
  /* Set the requested operating mode (see section 3.3) */
738
  setMode(modeback);
739
  delay(20);
740
}
741

  
742
/*!
713 743
 *  @brief  Writes an 8 bit value over I2C
714 744
 */
715 745
bool Adafruit_BNO055::write8(adafruit_bno055_reg_t reg, byte value) {

Also available in: Unified diff