Documentation ¶
Overview ¶
Package dds provides device drivers for direct digital synthesizer.
Index ¶
- Variables
- type Config
- type DDS
- type Mockup
- func (d *Mockup) Amplitude() float64
- func (d *Mockup) Exec() error
- func (d *Mockup) Frequency() float64
- func (d *Mockup) Init() error
- func (d *Mockup) PhaseOffset() float64
- func (d *Mockup) Playback() PlaybackConfig
- func (d *Mockup) Reset() error
- func (d *Mockup) SetAmplitude(x float64)
- func (d *Mockup) SetFrequency(x float64)
- func (d *Mockup) SetPhaseOffset(x float64)
- func (d *Mockup) SetPlayback(c PlaybackConfig)
- func (d *Mockup) SetSweep(c SweepConfig)
- func (d *Mockup) Sweep() SweepConfig
- type Param
- type PlaybackConfig
- type SweepConfig
Constants ¶
This section is empty.
Variables ¶
var ( ParamAmplitude = dds.ParamAmplitude ParamFrequency = dds.ParamFrequency ParamPhase = dds.ParamPhase )
Params alias dds.Params.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { dds.Config `yaml:",inline"` ResetPin gpio.PinIO UpdatePin gpio.PinIO SPIPort spi.Port }
Config extends dds.Config with hardware specific configuration.
type DDS ¶
type DDS interface { driver.Driver Reset() error Amplitude() float64 SetAmplitude(float64) Frequency() float64 SetFrequency(float64) PhaseOffset() float64 SetPhaseOffset(float64) Sweep() SweepConfig SetSweep(SweepConfig) Playback() PlaybackConfig SetPlayback(PlaybackConfig) Exec() error }
DDS interface represents a direct digital synthesizer device.
type Mockup ¶
type Mockup struct { Debug bool HadReset bool HadExec bool // contains filtered or unexported fields }
Mockup implements DDS interface.
Mockup can be used to test the DDS interface without the need of fully functioning hardware present.
func (*Mockup) PhaseOffset ¶
PhaseOffset implements DDS interface.
func (*Mockup) Playback ¶
func (d *Mockup) Playback() PlaybackConfig
Playback implements DDS interface.
func (*Mockup) SetAmplitude ¶
SetAmplitude implements DDS interface.
func (*Mockup) SetFrequency ¶
SetFrequency implements DDS interface.
func (*Mockup) SetPhaseOffset ¶
SetPhaseOffset implements DDS interface.
func (*Mockup) SetPlayback ¶
func (d *Mockup) SetPlayback(c PlaybackConfig)
SetPlayback implements DDS interface.
func (*Mockup) SetSweep ¶
func (d *Mockup) SetSweep(c SweepConfig)
SetSweep implements DDS interface.
type PlaybackConfig ¶
type PlaybackConfig = dds.PlaybackConfig
PlaybackConfig aliases dds.PlaybackConfig.