Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ET232 ¶
type ET232 struct {
// contains filtered or unexported fields
}
func NewSerialET232 ¶
NewSerialET232 returns an ET232 that will attempt to communicate with the device over the specified serial port (e.g. "COM1" on Windows or "/dev/ttyUSB0" on *nix).
func (*ET232) Handshake ¶
Handshake attempts to perform a serial handshake with the device. This must be performed every time the device is powercycled. After calling this function, the device should be powercycled for this function to succeed.
func (*ET232) Info ¶
Info reads from the device and summarizes the device state in a human-readable string.
func (*ET232) WriteSetting ¶
func (e *ET232) WriteSetting(mem ET232Mem, setting ET232Setting) error
WriteSetting sets the specified ET232Mem to the passed setting.
type ET232Mem ¶
type ET232Mem uint8
ET232Mem represents an ET232 memory address.
const ( PulseWidthA ET232Mem = 0x08 // PulseWidthA is Channel A Pulse Width FreqRecA ET232Mem = 0x09 // FreqRecA is Channel A Pulse Frequency Reciprocal PulseAmpA ET232Mem = 0x0A // PulseAmpA is Channel A Pulse Amplitude PowerCompA ET232Mem = 0x0B // PowerCompA is Channel A Power Compensation PulsePolarityEnA ET232Mem = 0x0C // PulsePolarityEnA is Channel A Pulse Enable Polarity PulseWidthB ET232Mem = 0x0E // PulseWidthB is Channel B Pulse Width FreqRecB ET232Mem = 0x0F // FreqRecB is Channel B Pulse Frequency Reciprocal PulseAmpB ET232Mem = 0x10 // PulseAmpB is Channel B Pulse Amplitude PowerCompB ET232Mem = 0x11 // PowerCompB is Channel B Power Compensation PulsePolarityEnB ET232Mem = 0x12 // PulsePolarityEnB is Channel B Pulse Enable Polarity PotB ET232Mem = 0x88 // PotB is Position of Pot B PotMA ET232Mem = 0x89 // PotMA is Position of MA Pot BatteryVoltage ET232Mem = 0x8A // BatteryVoltage is Battery Voltage AudioInput ET232Mem = 0x8B // AudioInput is Audio Input Level PotA ET232Mem = 0x8C // PotA is Position of Pot A Mode ET232Mem = 0xA2 // Mode is Mode Switch Position ModeOverride ET232Mem = 0xA3 // ModeOverride is Mode Switch Override AnalogOverride ET232Mem = 0xA4 // AnalogOverride is Analog Input Override AutoPowerOffTimer ET232Mem = 0xD3 // AutoPowerOffTimer is Auto Power Off Timer ProgramFadeInTimer ET232Mem = 0xD8 // ProgramFadeInTimer is Program Fade In Timer )
func ET232MemString ¶
type ET232Setting ¶
type ET232Setting string
ET232Setting is a named setting for an ET232Mem. This is used for certain ET232Mems that only take certain discrete values (e.g. the Mode switch).
const ( ModeWaves ET232Setting = "ModeWaves" // Waves setting for "Mode" and "ModeOverride" ModeIntense ET232Setting = "ModeIntense" // Intense setting for "Mode" and "ModeOverride" ModeRandom ET232Setting = "ModeRandom" // Random setting for "Mode" and "ModeOverride" ModeAudioSoft ET232Setting = "ModeAudioSoft" // AudioSoft setting for "Mode" and "ModeOverride" ModeAudioLoud ET232Setting = "ModeAudioLoud" // AudioLoud setting for "Mode" and "ModeOverride" ModeAudioWaves ET232Setting = "ModeAudioWaves" // AudioWaves setting for "Mode" and "ModeOverride" ModeUser ET232Setting = "ModeUser" // User setting for "Mode" and "ModeOverride" ModeHiFreq ET232Setting = "ModeHiFreq" // HiFreq setting for "Mode" and "ModeOverride" ModeClimb ET232Setting = "ModeClimb" // Climb setting for "Mode" and "ModeOverride" ModeThrob ET232Setting = "ModeThrob" // Throb setting for "Mode" and "ModeOverride" ModeCombo ET232Setting = "ModeCombo" // Combo setting for "Mode" and "ModeOverride" ModeThrust ET232Setting = "ModeThrust" // Thrust setting for "Mode" and "ModeOverride" ModeThump ET232Setting = "ModeThump" // Thump setting for "Mode" and "ModeOverride" ModeRamp ET232Setting = "ModeRamp" // Ramp setting for "Mode" and "ModeOverride" ModeStroke ET232Setting = "ModeStroke" // Stroke setting for "Mode" and "ModeOverride" ModeOff ET232Setting = "ModeOff" // Off setting for "Mode" and "ModeOverride" OverrideAll ET232Setting = "OverrideAll" OverrideOff ET232Setting = "OverrideOff" )
func GetSetting ¶
func GetSetting(mem ET232Mem, val uint8) (ET232Setting, error)
GetSetting returns the ET232Setting corresponding to a specified ET232Mem and value.