mirror of
https://github.com/BertoldVdb/ms-tools.git
synced 2025-12-10 07:44:46 +01:00
24 lines
431 B
Go
24 lines
431 B
Go
// +build puregohid
|
|
|
|
package main
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/BertoldVdb/ms-tools/gohid"
|
|
)
|
|
|
|
func OpenDevice() (gohid.HIDDevice, error) {
|
|
if CLI.RawPath == "" {
|
|
return nil, errors.New("RawPath must be specified when using pure GO HID")
|
|
}
|
|
|
|
return gohid.OpenHID(CLI.RawPath)
|
|
}
|
|
|
|
type ListHIDCmd struct {
|
|
}
|
|
|
|
func (l *ListHIDCmd) Run(c *Context) error {
|
|
return errors.New("This command is not supported using pure GO HID")
|
|
}
|