enumeration

package
v0.0.0-...-f4b31ea Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

View Source
const GoogleVID = "18d1"

GoogleVID is the USB Vendor ID for Google

Variables

View Source
var GooglePIDs = map[string]string{

	"520d": "servo4.1",

	"501b": "servo4",

	"501f": "suzyq",

	"5014": "cr50",

	"504a": "ti50",
}

Functions

This section is empty.

Types

type USBDevice

type USBDevice struct {
	Serial     string
	DevicePath string
	HubPath    string
	DeviceType string
}

USBDevice represents a plugged in USB Device

func FindServoFromDUT

func FindServoFromDUT(dutSerial string, devices []USBDevice) (USBDevice, error)

FindServoFromDUT finds the Servo associated a given serial number from a DUTs cr50/ti50 by comparing the USB hub path. Both a Servo and a device plugged into a Servo will be enumerated under the Servos built-in hub in the USB device tree.

func GetAllServoUSBDevices

func GetAllServoUSBDevices() ([]USBDevice, error)

GetAllServoUSBDevices returns all the USBDevices instance of plugged devices

func NewUSBDevice

func NewUSBDevice(path string) (*USBDevice, error)

NewUSBDevice is a constructor for USBDevice

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL