/* AKM AK8975 device state set routine. 
This function places the AK8975 device in the specified state. */
static bool ak8975_set_state(sensor_hal_t *hal, sensor_state_t state)
/* AKM AK8975 device state set routine. 
This function places the AK8975 device in the specified state. */
static bool ak8975_set_state(sensor_hal_t *hal, sensor_state_t state)
{
	if ((state == SENSOR_STATE_POWER_DOWN) ||
			(state == SENSOR_STATE_SLEEP)) {
		sensor_bus_put(hal, AK8975_REG_CNTL1, AK8975_POWER_DOWN_MODE);
		return true;
	}
	return false;
}