Use USB vendor/product IDs instead of bus/dev IDs
This commit is contained in:
parent
8fd8def548
commit
a8f5af7bd0
4 changed files with 23 additions and 15 deletions
|
|
@ -1,6 +1,7 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"encoding/binary"
|
||||
"regexp"
|
||||
"strings"
|
||||
"unicode"
|
||||
|
|
@ -28,3 +29,9 @@ func ValidateDevName(s string) bool {
|
|||
|
||||
return devNameRegexp.MatchString(s)
|
||||
}
|
||||
|
||||
func Uint16ToBytesBE(v uint16) []byte {
|
||||
b := make([]byte, 2)
|
||||
binary.BigEndian.PutUint16(b, v)
|
||||
return b
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue