/* This API sets the power mode of the sensor.  */
int8_t bmi160_set_power_mode(struct bmi160_dev *dev)
/* This API sets the power mode of the sensor.  */
int8_t bmi160_set_power_mode(struct bmi160_dev *dev)
{
    int8_t rslt = 0;
    if ((dev == NULL) || (dev->delay_ms == NULL))
    {
        rslt = BMI160_E_NULL_PTR;
    }
    else
    {
        rslt = set_accel_pwr(dev);
        if (rslt == BMI160_OK)
        {
            rslt = set_gyro_pwr(dev);
        }
    }
    return rslt;
}