Documentation ¶
Index ¶
- Constants
- type UsbIO2
- func (self *UsbIO2) Cleanup()
- func (self *UsbIO2) CreateCommand(requestId byte) ([]byte, error)
- func (self *UsbIO2) CreateCommandWithData(requestId byte, data []byte) ([]byte, error)
- func (self *UsbIO2) GetConfig() (*UsbIO2Config, error)
- func (self *UsbIO2) GetDeviceName() string
- func (self *UsbIO2) GetPortStatus() (uint16, error)
- func (self *UsbIO2) Read() ([]byte, error)
- func (self *UsbIO2) Write(data []byte) error
- func (self *UsbIO2) WriteRead(command []byte) ([]byte, error)
- type UsbIO2Config
Constants ¶
View Source
const ( USB_VENDOR uint16 = 0x1352 USB_PRODUCT_ORIG uint16 = 0x0120 // ORIGINAL USB_PRODUCT_AKI uint16 = 0x0121 // AKIZUKI Compatible COMMANDSIZE int = 64 // Command CMD_WRITEREAD byte = 0x20 CMD_READWRITE byte = 0x21 // for original CMD_REPEATWRITE byte = 0x22 // for original CMD_READFROMFLASH byte = 0xF0 CMD_WRITETOFLASH byte = 0xF1 CMD_READCONFIG byte = 0xF8 CMD_WEIRWCONFIG byte = 0xF9 // Config CNF_P2_PULLUP_ENABLE byte = 0x00 CNF_P2_PULLUP_DISABLE byte = 0x01 CNF_P2_PULLUP_DEFALUT byte = CNF_P2_PULLUP_ENABLE CNF_P1_PIN_DEFAULT byte = 0x00 CNF_P2_PIN_DEFAULT byte = 0x0F )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UsbIO2 ¶
type UsbIO2 struct {
// contains filtered or unexported fields
}
func (*UsbIO2) CreateCommandWithData ¶
func (*UsbIO2) GetConfig ¶
func (self *UsbIO2) GetConfig() (*UsbIO2Config, error)
func (*UsbIO2) GetDeviceName ¶
func (*UsbIO2) GetPortStatus ¶
type UsbIO2Config ¶
type UsbIO2Config struct { // "Disable" Port2 pullup settings // bit0 on: Disable, bit0 off: Enable EnablePullUp bool // Pin Settings // true: input, false: output Port1 []bool Port2 []bool }
func NewUsbIO2Config ¶
func NewUsbIO2Config() *UsbIO2Config
func (*UsbIO2Config) FromBytes ¶
func (self *UsbIO2Config) FromBytes(buf []byte)
func (*UsbIO2Config) ToBytes ¶
func (self *UsbIO2Config) ToBytes() []byte
Click to show internal directories.
Click to hide internal directories.