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