/* Set the SFH5712 execution mode. 
SENSOR_STATE_NORMAL: Setting the sleep mode puts sensor in continuous measurement mode. */
static bool sfh5712_set_state(sensor_hal_t *hal, sensor_state_t state)
/* Set the SFH5712 execution mode. 
SENSOR_STATE_NORMAL: Setting the sleep mode puts sensor in continuous measurement mode. */
static bool sfh5712_set_state(sensor_hal_t *hal, sensor_state_t state)
{
	switch (state) {
	case SENSOR_STATE_SLEEP:
		sensor_bus_put(hal, SFH5712_ALS_CONTROL, ALS_MODE_STANDBY);
		break;
	case SENSOR_STATE_NORMAL:
		sensor_bus_put(hal, SFH5712_ALS_CONTROL, ALS_MODE_ACTIVE);
		break;
	default:
		return false;
	}
	return true;
}