Versions in this module Expand all Collapse all v0 v0.2.0 Jan 24, 2025 v0.1.0 Nov 8, 2024 Changes in this version + const ProductID + const VendorID + type ChipVersion struct + ChipCode []byte + Reserved []byte + type Dev struct + func New(dev *hid.Device) *Dev + func (dev *Dev) ChipVersion() (*ChipVersion, error) + func (dev *Dev) Close() error + func (dev *Dev) GetSystemStatus() (*SystemStatus, error) + func (dev *Dev) I2CInputReport() ([]byte, error) + func (dev *Dev) I2CReadRequest(slaveAddr uint8, flag I2CCondition, dataLength uint16) error + func (dev *Dev) I2CReset() error + func (dev *Dev) I2CWriteRequest(slaveAddr uint8, data []byte, flag I2CCondition) (int, error) + func (dev *Dev) SetI2CClockSpeed(speedInKhz uint16) error + func (dev *Dev) SetI2CMode(enable bool) error + type I2CCondition uint8 + const I2CConditionNone + const I2CConditionRepeatedStart + const I2CConditionStart + const I2CConditionStartAndStop + const I2CConditionStop + type SystemClockSpeed uint8 + const SystemClockSpeed12MHz + const SystemClockSpeed24MHz + const SystemClockSpeed48MHz + type SystemStatus struct + ChipMode uint8 + ClkCtl SystemClockSpeed + EnablePowerSaving bool + EnableWakeupInt bool + GPIO2Function uint8 + GPIOAFunction uint8 + GPIOGFunction uint8 + HIDOverI2CEnable bool + I2CEnable bool + IntrCond uint8 + PowerEnableStatus bool + Reserved []byte + SuspendOutPol uint8 + SuspendStatus bool + UARTMode UARTMode + type UARTMode uint8 + const UARTModeCtsRts + const UARTModeDtrDts + const UARTModeNoFlowControl + const UARTModeOff + const UARTModeXonXoff