Versions in this module Expand all Collapse all v0 v0.1.1 Feb 6, 2020 Changes in this version + const ModeLEDI2C + const ModeLEDURx + const ModeLEDUTx v0.1.0 Feb 5, 2020 Changes in this version + const ClkHz + const DirInput + const DirInvalid + const DirOutput + const GPPinCount + const I2CBaudRate + const I2CMaxAddr + const I2CMinAddr + const ModeADC + const ModeAltFunc0 + const ModeAltFunc1 + const ModeAltFunc2 + const ModeCLKOUT + const ModeDAC + const ModeDediFunc + const ModeGPIO + const ModeInterrupt + const ModeInvalid + const ModeSSPND + const ModeUSBCFG + const MsgSz + const PID + const VID + const VersionMaj + const VersionMin + const VersionPch + const VersionPkg + const WordClr + const WordSet + func AttachedDevices(vid uint16, pid uint16) []usb.DeviceInfo + func PackageVersion() string + func Version() string + type ADC struct + func (mod *ADC) FlashConfig(pin byte, ref VRef) error + func (mod *ADC) GetConfig(pin byte) (VRef, error) + func (mod *ADC) Read(pin byte) (uint16, error) + func (mod *ADC) SetConfig(pin byte, ref VRef) error + type ChipSecurity byte + const SecLocked1 + const SecLocked2 + const SecPassword + const SecUnsecured + type DAC struct + func (mod *DAC) FlashConfig(pin byte, ref VRef, val byte) error + func (mod *DAC) GetConfig(pin byte) (byte, VRef, error) + func (mod *DAC) SetConfig(pin byte, ref VRef) error + func (mod *DAC) Write(val uint16) error + type Flash struct + func (mod *Flash) FactorySerialNo() (string, error) + func (mod *Flash) USBManufacturer() (string, error) + func (mod *Flash) USBProduct() (string, error) + func (mod *Flash) USBSerialNo() (string, error) + type GPIO struct + func (mod *GPIO) FlashConfig(pin byte, val byte, mode GPIOMode, dir GPIODir) error + func (mod *GPIO) Get(pin byte) (byte, error) + func (mod *GPIO) GetConfig(pin byte) (byte, GPIOMode, GPIODir, error) + func (mod *GPIO) Set(pin byte, val byte) error + func (mod *GPIO) SetConfig(pin byte, val byte, mode GPIOMode, dir GPIODir) error + type GPIODir byte + type GPIOMode byte + type I2C struct + func (mod *I2C) Cancel() error + func (mod *I2C) Read(rep bool, addr uint8, cnt uint16) ([]byte, error) + func (mod *I2C) ReadReady() (bool, error) + func (mod *I2C) ReadReg(addr uint8, reg uint8, cnt uint16) ([]byte, error) + func (mod *I2C) ReadReg16(addr uint8, reg uint16, msb bool, cnt uint16) ([]byte, error) + func (mod *I2C) Scan(start uint8, stop uint8) ([]uint8, error) + func (mod *I2C) SetConfig(baud uint32) error + func (mod *I2C) Write(stop bool, addr uint8, out []byte, cnt uint16) error + type IOC struct + func (mod *IOC) FlashConfig(edge IOCEdge) error + func (mod *IOC) GetConfig() (IOCEdge, error) + func (mod *IOC) SetConfig(edge IOCEdge) error + type IOCEdge byte + const DisableIOC + const FallingEdge + const RisingEdge + const RisingFallingEdge + type MCP2221A struct + ADC *ADC + DAC *DAC + Device *usb.Device + Flash *Flash + GPIO *GPIO + I2C *I2C + IOC *IOC + Index byte + PID uint16 + SRAM *SRAM + VID uint16 + func New(idx byte, vid uint16, pid uint16) (*MCP2221A, error) + func (mcp *MCP2221A) Close() error + func (mcp *MCP2221A) Reset(timeout time.Duration) error + type Polarity bool + type SRAM struct + type VRef byte + const VRef1p024 + const VRef2p048 + const VRef4p096 + const VRefDefault + const VRefOff + const VRefVdd