Versions in this module Expand all Collapse all v0 v0.0.1 Feb 5, 2021 Changes in this version + type Break int + const BreakOff + const BreakOn + type CBusFunction byte + const CBusBBRD + const CBusBBWR + const CBusClk12 + const CBusClk24 + const CBusClk48 + const CBusClk6 + const CBusIOMode + const CBusPwrEn + const CBusRxLED + const CBusSleep + const CBusTxEn + const CBusTxLED + const CBusTxRxLED + func (c CBusFunction) String() string + type Channel uint32 + const ChannelA + const ChannelAny + const ChannelB + const ChannelC + const ChannelD + type ChannelType byte + const ChannelCPU + const ChannelFIFO + const ChannelFT1284 + const ChannelOPTO + const ChannelUART + func (ct ChannelType) String() string + type DataBits int + const DataBits7 + const DataBits8 + type Device struct + func Open(vendor, product int, description, serial string, index uint, c Channel) (*Device, error) + func OpenFirst(vendor, product int, c Channel) (*Device, error) + func OpenUSBDev(u *USBDev, c Channel) (*Device, error) + func (d *Device) ChipID() (uint32, error) + func (d *Device) Close() error + func (d *Device) EEPROM() EEPROM + func (d *Device) LatencyTimer() (int, error) + func (d *Device) Pins() (b byte, err error) + func (d *Device) PurgeBuffers() error + func (d *Device) PurgeReadBuffer() error + func (d *Device) PurgeWriteBuffer() error + func (d *Device) Read(data []byte) (int, error) + func (d *Device) ReadByte() (byte, error) + func (d *Device) ReadChunkSize() (int, error) + func (d *Device) Reset() error + func (d *Device) SetBaudrate(br int) error + func (d *Device) SetBitmode(iomask byte, mode Mode) error + func (d *Device) SetDTR(dtr int) error + func (d *Device) SetDTRRTS(dtr, rts int) error + func (d *Device) SetFlowControl(flowctrl FlowCtrl) error + func (d *Device) SetLatencyTimer(lt int) error + func (d *Device) SetLineProperties(bits DataBits, stopbits StopBits, parity Parity) error + func (d *Device) SetLineProperties2(bits DataBits, stopbits StopBits, parity Parity, breaks Break) error + func (d *Device) SetRTS(rts int) error + func (d *Device) SetReadChunkSize(cs int) error + func (d *Device) SetWriteChunkSize(cs int) error + func (d *Device) SubmitRead(data []byte) (*Transfer, error) + func (d *Device) SubmitWrite(data []byte) (*Transfer, error) + func (d *Device) Type() Type + func (d *Device) Write(data []byte) (int, error) + func (d *Device) WriteByte(b byte) error + func (d *Device) WriteChunkSize() (int, error) + func (d *Device) WriteString(s string) (int, error) + type EEPROM struct + func (e EEPROM) Build() error + func (e EEPROM) CBusFunction(n int) CBusFunction + func (e EEPROM) ChannelDriver(c Channel) bool + func (e EEPROM) ChannelRS485(c Channel) bool + func (e EEPROM) ChannelType(c Channel) ChannelType + func (e EEPROM) ChipSize() int + func (e EEPROM) ChipType() byte + func (e EEPROM) Decode() error + func (e EEPROM) HighCurrent(c Channel) bool + func (e EEPROM) Invert() int + func (e EEPROM) IsNotPNP() bool + func (e EEPROM) IsochronousInp() bool + func (e EEPROM) IsochronousOut() bool + func (e EEPROM) MaxPower() int + func (e EEPROM) ProductId() uint16 + func (e EEPROM) Read() error + func (e EEPROM) ReleaseNumber() uint16 + func (e EEPROM) RemoteWakeup() bool + func (e EEPROM) SelfPowered() bool + func (e EEPROM) SetCBusFunction(n int, v CBusFunction) + func (e EEPROM) SetChannelDriver(c Channel, v bool) + func (e EEPROM) SetChannelRS485(c Channel, v bool) + func (e EEPROM) SetChannelType(c Channel, v ChannelType) + func (e EEPROM) SetChipType(v byte) + func (e EEPROM) SetHighCurrent(c Channel, v bool) + func (e EEPROM) SetInvert(v int) + func (e EEPROM) SetIsNotPNP(v bool) + func (e EEPROM) SetIsochronousInp(v bool) + func (e EEPROM) SetIsochronousOut(v bool) + func (e EEPROM) SetMaxPower(v int) + func (e EEPROM) SetProductId(v uint16) + func (e EEPROM) SetReleaseNumber(v uint16) + func (e EEPROM) SetRemoteWakeup(v bool) + func (e EEPROM) SetSelfPowered(v bool) + func (e EEPROM) SetSuspendDBus7(v bool) + func (e EEPROM) SetSuspendPullDowns(v bool) + func (e EEPROM) SetUSBVersion(v uint16) + func (e EEPROM) SetUseSerial(v bool) + func (e EEPROM) SetUseUSBVersion(v bool) + func (e EEPROM) SetVendorId(v uint16) + func (e EEPROM) String() string + func (e EEPROM) SuspendDBus7() bool + func (e EEPROM) SuspendPullDowns() bool + func (e EEPROM) USBVersion() uint16 + func (e EEPROM) UseSerial() bool + func (e EEPROM) UseUSBVersion() bool + func (e EEPROM) VendorId() uint16 + func (e EEPROM) Write() error + type Error struct + func (e *Error) Code() int + func (e *Error) Error() string + type FlowCtrl int + const FlowCtrlDTRDSR + const FlowCtrlDisable + const FlowCtrlRTSCTS + const FlowCtrlXONXOFF + type Mode byte + const ModeBitbang + const ModeCBUS + const ModeFT1284 + const ModeMCU + const ModeMPSSE + const ModeOpto + const ModeReset + const ModeSyncBB + const ModeSyncFF + type Parity int + const ParityEven + const ParityMark + const ParityNone + const ParityOdd + const ParitySpace + type StopBits int + const StopBits1 + const StopBits15 + const StopBits2 + type Transfer struct + func (t *Transfer) Done() (int, error) + type Type uint32 + const Type2232C + const Type2232H + const Type230x + const Type232H + const Type4232H + const TypeAM + const TypeBM + const TypeR + func (t Type) String() string + type USBDev struct + Description string + Manufacturer string + Serial string + func FindAll(vendor, product int) ([]*USBDev, error) + func (u *USBDev) Close() + type USBError int + func (e USBError) Error() string