SDC.0 pin has a physical pull-up resistor
504563
protected static Pin createDigitalPinNoPullDown(int address, String name) {
        return createDigitalPin(RaspiGpioProvider.NAME, address, name,
                EnumSet.of(PinPullResistance.OFF, PinPullResistance.PULL_UP),
                PinEdge.all());
    }
778352
async def extended_analog(self, pin, data):
        
        analog_data = [pin, data & 0x7f, (data >> 7) & 0x7f, (data >> 14) & 0x7f]
        await self._send_sysex(PrivateConstants.EXTENDED_ANALOG, analog_data)
991715
def convert_ram_sdp_rf(ADDR_WIDTH=8, DATA_WIDTH=8):
    '''  '''
    clk = Signal(bool(0))
    we = Signal(bool(0))
    addrw = Signal(intbv(0)[ADDR_WIDTH:])
    addrr = Signal(intbv(0)[ADDR_WIDTH:])
    di = Signal(intbv(0)[DATA_WIDTH:])
    do = Signal(intbv(0)[DATA_WIDTH:])
    toVerilog(ram_sdp_rf, clk, we, addrw, addrr, di, do)
1367894
private static void isrCallback(int pin) {
        // dispatch callback to the subscribers for this pin
        List<GpioInterruptCallback> callbacks = isrCallbacks[pin];

        // ensure callbacks collection exists for this pins number
        if(callbacks != null && !callbacks.isEmpty()){
            // iterate over each callback delegate and invoke the callback if the pin and edge type match
            for(GpioInterruptCallback callback : callbacks){
                callback.callback(pin);
            }
        }
    }
873111
function DevAdapter (controller) {
    this.id        = controller.svc;
    this.uid       = "//" + controller.svcopts.adapter + "/" + controller.svc + ":" +  controller.svcopts.port;;
    this.info      = 'Restapi';
    this.debug     = controller.svcopts.debug;  // inherit debug from controller
    this.controller= controller;  // keep a link to device controller and TCP socket
    this.control   = 'http';
    this.cors      = controller.svcopts.cors || false;
}
896259
def power_up(self):
        
        GPIO.output(self._pd_sck, False)
        time.sleep(0.01)
        return True
358316
def get_gpio_pin(self, pin_number, dest_addr_long=None):
        
        frame = self._send_and_wait(
            command=const.IO_PIN_COMMANDS[pin_number],
            dest_addr_long=dest_addr_long
        )
        value = frame["parameter"]
        return const.GPIO_SETTINGS[value]
420427
def read(pin):
    '''
    '''
    f = _open[pin].value
    out = int(_read(f))
    log.debug("Read {0}: {1}".format(pin, out))
    return out
1266003
def update_control_board_calibration(control_board, fitted_params):
    '''
    
    '''
    # Update the control board with the new fitted capacitor and resistor
    # values for the reference load analog input (channel 0).
    control_board.a0_series_resistance = fitted_params['fitted R'].values
    control_board.a0_series_capacitance = fitted_params['fitted C'].values
1002531
def pin_6_pwm_128():
    
    # instantiate the pymata_core API
    board = PyMata3()

    # set the pin mode
    board.set_pin_mode(6, Constants.PWM)
    board.analog_write(6, 128)

    # wait for 3 seconds to see the LED lit
    board.sleep(3)

    # reset the board and exit
    board.shutdown()
518695
function (controlPoint, uuid, location, desc, localAddress) {
    EventEmitter.call(this);

    if (TRACE) {
        logger.info({
            method: "UpnpDevice",
            uuid: uuid,
        }, "new device object");
    }
    this.controlPoint = controlPoint;

    this.uuid = uuid;
    this.udn = desc.UDN[0];

    this.forgotten = false
    this.last_seen = (new Date()).getTime();

    this.location = location;

    this.deviceType = desc.deviceType ? desc.deviceType[0] : null;
    this.friendlyName = desc.friendlyName ? desc.friendlyName[0] : null;
    this.manufacturer = desc.manufacturer ? desc.manufacturer[0] : null;
    this.manufacturerUrl = desc.manufacturerURL ? desc.manufacturerURL[0] : null;
    this.modelNumber = desc.modelNumber ? desc.modelNumber[0] : null;
    this.modelDescription = desc.modelDescription ? desc.modelDescription[0] : null;
    this.modelName = desc.modelName ? desc.modelName[0] : null;
    this.modelUrl = desc.modelURL ? desc.modelURL[0] : null;
    this.softwareVersion = desc.softwareVersion ? desc.softwareVersion[0] : null;
    this.hardwareVersion = desc.hardwareVersion ? desc.hardwareVersion[0] : null;
    this.serialNum = desc.serialNum ? desc.serialNum[0] : null;

    var u = url.parse(this.location);
    this.host = u.hostname;
    this.port = u.port;

    this.localAddress = localAddress;

    this.devices = {}; // sub-devices

    this.services = {};

    this._handleDeviceInfo(desc);

    if (seend[this.uuid] === undefined) {
        seend[this.uuid] = true;
        logger.info({
            method: "UpnpDevice",
            device: {
                loction: this.location,
                uuid: this.uuid,
                deviceType: this.deviceType,
                friendlyName: this.friendlyName,
                manufacturer: this.manufacturer,
                manufacturerUrl: this.manufacturerURL,
                modelNumber: this.modelNumber,
                modelDescription: this.modelDescription,
                modelName: this.modelName,
                modelUrl: this.modelURL,
            }
        }, "previously unseen UPnP device");
    }
    // var self = this;
    // this._getDeviceDetails(function(desc) {
    // self._handleDeviceInfo(desc);
    // });

}
581453
def push_byte(self, stack_pointer, byte):
        
        # FIXME: self.system_stack_pointer -= 1
        stack_pointer.decrement(1)
        addr = stack_pointer.value

#        log.info(
#         log.error(
#            "%x|\tpush $%x to %s stack at $%x\t|%s",
#            self.last_op_address, byte, stack_pointer.name, addr,
#            self.cfg.mem_info.get_shortest(self.last_op_address)
#        )
        self.memory.write_byte(addr, byte)
496536
def pull_byte(self, stack_pointer):
        
        addr = stack_pointer.value
        byte = self.memory.read_byte(addr)
#        log.info(
#         log.error(
#            "%x|\tpull $%x from %s stack at $%x\t|%s",
#            self.last_op_address, byte, stack_pointer.name, addr,
#            self.cfg.mem_info.get_shortest(self.last_op_address)
#        )

        # FIXME: self.system_stack_pointer += 1
        stack_pointer.increment(1)

        return byte
37683
def _paloadstr(ins):
    ''' 
    '''
    output = _paddr(ins.quad[2])

    output.append('call __ILOADSTR')
    output.append('push hl')
    REQUIRES.add('loadstr.asm')

    return output
1127958
def vcpu_pin(vm_, vcpu, cpus):
    '''
    
    '''
    with _get_xapi_session() as xapi:

        vm_uuid = _get_label_uuid(xapi, 'VM', vm_)
        if vm_uuid is False:
            return False

        # from xm's main
        def cpu_make_map(cpulist):
            cpus = []
            for c in cpulist.split(','):
                if c == '':
                    continue
                if '-' in c:
                    (x, y) = c.split('-')
                    for i in range(int(x), int(y) + 1):
                        cpus.append(int(i))
                else:
                    # remove this element from the list
                    if c[0] == '^':
                        cpus = [x for x in cpus if x != int(c[1:])]
                    else:
                        cpus.append(int(c))
            cpus.sort()
            return ','.join(map(str, cpus))

        if cpus == 'all':
            cpumap = cpu_make_map('0-63')
        else:
            cpumap = cpu_make_map('{0}'.format(cpus))

        try:
            xapi.VM.add_to_VCPUs_params_live(vm_uuid,
                                             'cpumap{0}'.format(vcpu), cpumap)
            return True
        # VM.add_to_VCPUs_params_live() implementation in xend 4.1+ has
        # a bug which makes the client call fail.
        # That code is accurate for all others XenAPI implementations, but
        # for that particular one, fallback to xm / xl instead.
        except Exception:
            return __salt__['cmd.run'](
                    '{0} vcpu-pin {1} {2} {3}'.format(_get_xtool(), vm_, vcpu, cpus),
                    python_shell=False)
276363
def power_pins(id = nil, options = {}, &block)
      id, options = nil, id if id.is_a?(Hash)
      options = {
        power_pin: true
      }.merge(options)
      pins(id, options, &block)
    end
356095
def set_slave_bus_bypass(self, enable):
        
        current = self.i2c_read_register(0x37, 1)[0]
        if enable:
            current |= 0b00000010
        else:
            current &= 0b11111101
        self.i2c_write_register(0x37, current)