dds

package
v0.0.0-...-5837768 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package dds provides device drivers for direct digital synthesizer.

Index

Constants

This section is empty.

Variables

View Source
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) Amplitude

func (d *Mockup) Amplitude() float64

Amplitude implements DDS interface.

func (*Mockup) Exec

func (d *Mockup) Exec() error

Exec implements DDS interface.

func (*Mockup) Frequency

func (d *Mockup) Frequency() float64

Frequency implements DDS interface.

func (*Mockup) Init

func (d *Mockup) Init() error

Init implements driver.Driver interface.

func (*Mockup) PhaseOffset

func (d *Mockup) PhaseOffset() float64

PhaseOffset implements DDS interface.

func (*Mockup) Playback

func (d *Mockup) Playback() PlaybackConfig

Playback implements DDS interface.

func (*Mockup) Reset

func (d *Mockup) Reset() error

Reset implements DDS interface.

func (*Mockup) SetAmplitude

func (d *Mockup) SetAmplitude(x float64)

SetAmplitude implements DDS interface.

func (*Mockup) SetFrequency

func (d *Mockup) SetFrequency(x float64)

SetFrequency implements DDS interface.

func (*Mockup) SetPhaseOffset

func (d *Mockup) SetPhaseOffset(x float64)

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.

func (*Mockup) Sweep

func (d *Mockup) Sweep() SweepConfig

Sweep implements DDS interface.

type Param

type Param = dds.Param

Param alias dds.Param.

type PlaybackConfig

type PlaybackConfig = dds.PlaybackConfig

PlaybackConfig aliases dds.PlaybackConfig.

type SweepConfig

type SweepConfig = dds.SweepConfig

SweepConfig aliases dds.SweepConfig.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL