Put the device into standby mode so that the registers can be set.
        @return: No return value
7401
def standby(self):
        
        register = self.MMA8452Q_Register['CTRL_REG1']
        self.board.i2c_read_request(self.address, register, 1,
                                    Constants.I2C_READ | Constants.I2C_END_TX_MASK,
                                    self.data_val, Constants.CB_TYPE_DIRECT)


        ctrl1 = self.wait_for_read_result()

        ctrl1 = (ctrl1[self.data_start]) & ~0x01
        self.callback_data = []

        self.board.i2c_write_request(self.address, [register, ctrl1])
1212394
def trigger(self):
        
        ibsta = self._lib.ibtrg(self._device)
        self._check_status(ibsta)
1216150
def init_device(self):
        """"""
        Device.init_device(self)
        time.sleep(0.1)
        self.set_state(DevState.STANDBY)
404641
def enable(self):
        """"""
        # Flip on the power and enable bits.
        self._write8(TCS34725_ENABLE, TCS34725_ENABLE_PON)
        time.sleep(0.01)
        self._write8(TCS34725_ENABLE, (TCS34725_ENABLE_PON | TCS34725_ENABLE_AEN))
1256348
def no_sleep():
	
	mode = power.ES.continuous | power.ES.system_required
	handle_nonzero_success(power.SetThreadExecutionState(mode))
	try:
		yield
	finally:
		handle_nonzero_success(power.SetThreadExecutionState(power.ES.continuous))
257173
def device_not_active(self, addr):
        """"""
        self.aldb_device_handled(addr)
        for callback in self._cb_device_not_active:
            callback(addr)
554481
def registrationEnabled(self):
        '''  '''
        return self.status in [self.RegStatus.enabled,self.RegStatus.heldOpen,self.RegStatus.heldClosed]
628758
def set_synchronous_standby(self, name):
        """"""
        if name and name != '*':
            name = quote_ident(name)
        if name != self._synchronous_standby_names:
            if name is None:
                self._server_parameters.pop('synchronous_standby_names', None)
            else:
                self._server_parameters['synchronous_standby_names'] = name
            self._synchronous_standby_names = name
            if self.state == 'running':
                self._write_postgresql_conf()
                self.reload()
1031530
def set_beeper_mode(self, state):
        
        values = {"desired_state": {"beeper_enabled": state}}
        response = self.api_interface.set_device_state(self, values)
        self._update_state_from_response(response)
1247998
def set_state(self, state):
        
        desired_state = {"desired_state": {"powered": state}}
        response = self.api_interface.set_device_state(self, desired_state)
        self._update_state_from_response(response)
1169684
def _initialize(self, device_description, permitted_ips):
        

        self._initialize_installation()
        self._register_device(device_description, permitted_ips)
        self._initialize_session()
757832
def set_enable(self, channel, value):
        '''
        '''
        try:
            bit = self._ch_map[channel]['GPIOEN']['bit']
        except KeyError:
            raise ValueError('set_enable() not supported for channel %s' % channel)
        self._set_power_gpio_value(bit=bit, value=value)
105616
def _lock(self):
        """"""
        if not self.locked:
            try:
                self.device.cu.lock()
                self.locked = True
            except JnprLockError as jle:
                raise LockError(py23_compat.text_type(jle))
900866
def _on_power_state(self, header, payload, rest, addr):
        
        with self.lock:
            self.power_state[header.mac] = payload
            if len(self.power_state) >= self.num_bulbs:
                self.power_state_event.set()

        self.callbacks.put(EVENT_POWER_STATE, self.get_bulb(header.mac),
                           is_on=bool(payload['is_on']))
656787
def activate_firmware_and_wait(self, rollback_override=None,
                                   timeout=2, interval=1):
        
        try:
            self.activate_firmware(rollback_override)
        except CompletionCodeError as e:
            if e.cc == CC_LONG_DURATION_CMD_IN_PROGRESS:
                self.wait_for_long_duration_command(
                            constants.CMDID_HPM_ACTIVATE_FIRMWARE,
                            timeout, interval)
            else:
                raise HpmError('activate_firmware CC=0x%02x' % e.cc)
        except IpmiTimeoutError:
            # controller is in reset and flashed new firmware
            pass
1156208
def set_lock_state(self, code, device_label, state):
        
        response = None
        try:
            response = requests.put(
                urls.set_lockstate(self._giid, device_label, state),
                headers={
                    'Accept': 'application/json, text/javascript, */*; q=0.01',
                    'Content-Type': 'application/json',
                    'Cookie': 'vid={}'.format(self._vid)},
                data=json.dumps({"code": str(code)}))
        except requests.exceptions.RequestException as ex:
            raise RequestError(ex)
        _validate_response(response)
        return json.loads(response.text)
878498
def reload
      device = SimCtl.device(udid: udid)
      device.instance_variables.each do |ivar|
        instance_variable_set(ivar, device.instance_variable_get(ivar))
      end
    end