gofmt
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"flag"
|
||||
"fmt"
|
||||
"log"
|
||||
|
||||
"github.com/kylelemons/gousb/usb"
|
||||
|
@@ -32,9 +32,9 @@ func (e Endpoint) Direction() EndpointDirection {
|
||||
func (e Endpoint) String() string {
|
||||
return fmt.Sprintf("Endpoint %d %-3s %s - %s %s",
|
||||
e.Number(), e.Direction(),
|
||||
TransferType(e.Attributes) & TRANSFER_TYPE_MASK,
|
||||
IsoSyncType(e.Attributes) & ISO_SYNC_TYPE_MASK,
|
||||
IsoUsageType(e.Attributes) & ISO_USAGE_TYPE_MASK,
|
||||
TransferType(e.Attributes)&TRANSFER_TYPE_MASK,
|
||||
IsoSyncType(e.Attributes)&ISO_SYNC_TYPE_MASK,
|
||||
IsoUsageType(e.Attributes)&ISO_USAGE_TYPE_MASK,
|
||||
)
|
||||
}
|
||||
|
||||
|
@@ -89,7 +89,8 @@ func (d *Device) Reset() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
var ControlTimeout = 5*time.Second
|
||||
var ControlTimeout = 5 * time.Second
|
||||
|
||||
func (d *Device) Control(rType, request uint8, val, idx uint16, data []byte) (int, error) {
|
||||
dataSlice := (*reflect.SliceHeader)(unsafe.Pointer(&data))
|
||||
n := C.libusb_control_transfer(
|
||||
|
Reference in New Issue
Block a user