Documentation
¶
Index ¶
- Constants
- func DeserializePacket(channel uint16, buffer []byte, sequenceIdx uint16, ble bool) (result []byte, totalResponseLength uint16, err error)
- func ListDevices()
- func SerializePacket(channel uint16, command []byte, packetSize int, sequenceIdx uint16, ble bool) (result []byte, offset int, err error)
- func UnwrapResponseAPDU(channel uint16, pipe <-chan []byte, packetSize int, ble bool) ([]byte, error)
- func WrapCommandAPDU(channel uint16, command []byte, packetSize int, ble bool) (result []byte, err error)
- type Device
- type Ledger
Constants ¶
View Source
const ( VendorLedger = 0x2c97 UsagePageLedger = 0xffa0 //ProductNano = 1 Channel = 0x0101 PacketSize = 64 )
Variables ¶
This section is empty.
Functions ¶
func DeserializePacket ¶
func ListDevices ¶
func ListDevices()
func SerializePacket ¶
Types ¶
type Device ¶
type Device interface {
// Close closes the device and associated resources.
Close()
// Write writes an output report to device. The first byte must be the
// report number to write, zero if the device does not use numbered reports.
Write([]byte) error
// ReadCh returns a channel that will be sent input reports from the device.
// If the device uses numbered reports, the first byte will be the report
// number.
ReadCh() <-chan []byte
// ReadError returns the read error, if any after the channel returned from
// ReadCh has been closed.
ReadError() error
}
A Device provides access to a HID device.
Click to show internal directories.
Click to hide internal directories.