hidraw

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HidDevice

type HidDevice struct {
	// contains filtered or unexported fields
}

func FindFIDO

func FindFIDO() (*HidDevice, error)

func NewHidDevice

func NewHidDevice(path string) (*HidDevice, error)

func (*HidDevice) Close

func (h *HidDevice) Close() error

func (*HidDevice) GetRawInfo

func (h *HidDevice) GetRawInfo() (*unix.HIDRawDevInfo, error)

func (*HidDevice) GetRawName

func (h *HidDevice) GetRawName() (string, error)

func (*HidDevice) IsFido

func (h *HidDevice) IsFido() (bool, error)

func (*HidDevice) Read

func (h *HidDevice) Read(buf []byte) (int, error)

func (*HidDevice) SendAndReceive

func (h *HidDevice) SendAndReceive(cmd uint8, data []byte) ([]byte, error)

func (*HidDevice) SetNewCID

func (h *HidDevice) SetNewCID(newCid uint32)

func (*HidDevice) SetReportSize

func (h *HidDevice) SetReportSize() error

func (*HidDevice) Write

func (h *HidDevice) Write(buf []byte) (int, error)

type PACKET

type PACKET struct {
	CMD   uint8
	BCNTH uint8
	BCNTL uint8
	DATA  []byte
	// contains filtered or unexported fields
}

func (*PACKET) FromReport

func (p *PACKET) FromReport(in []byte) (bool, error)

func (*PACKET) ToReport

func (p *PACKET) ToReport() [][]byte

Jump to

Keyboard shortcuts

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