serial

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2017 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SKETCH_VERSION_GTE  = 120
	SKETCH_VERSION_LT   = 140
	ARDUINO_BUFFER_SIZE = 60
)

Variables

View Source
var BaudRates = []int{300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 28800, 38400, 57600, 115200}

Functions

func BaudRateList added in v1.1.0

func BaudRateList() string

func IsValidBaudRate added in v1.1.0

func IsValidBaudRate(r int) bool

Types

type Command added in v1.1.0

type Command interface {
	Bytes() []byte
}

type SPICommand added in v1.1.0

type SPICommand struct {
	Addr uint8
	Data []byte
}

func NewSPICommand added in v1.1.0

func NewSPICommand(addr uint8, data []byte) *SPICommand

func NewSPICommand1 added in v1.1.0

func NewSPICommand1(addr uint8, data byte) *SPICommand

func (*SPICommand) Bytes added in v1.1.0

func (c *SPICommand) Bytes() []byte

type SerialPort

type SerialPort struct {
	// contains filtered or unexported fields
}

func NewSerialPort

func NewSerialPort(deviceName string, baudRate int) (*SerialPort, error)

func (*SerialPort) Close

func (sp *SerialPort) Close()

func (*SerialPort) Flush added in v1.2.0

func (sp *SerialPort) Flush() bool

func (*SerialPort) SendAllOff

func (sp *SerialPort) SendAllOff()

func (*SerialPort) SendAnalogGain

func (sp *SerialPort) SendAnalogGain(g int)

0<=g<4

func (*SerialPort) SendFineTune

func (sp *SerialPort) SendFineTune(ch, INT, FRAC int)

0<=INT<4 0<=FRAC<512

func (*SerialPort) SendFineTuneByFloat

func (sp *SerialPort) SendFineTuneByFloat(ch int, r float64)

func (*SerialPort) SendKeyOff

func (sp *SerialPort) SendKeyOff(ch, ToneNum int)

func (*SerialPort) SendKeyOn

func (sp *SerialPort) SendKeyOn(ch int, note enums.Note, delta float64, VoVol, ToneNum int)

func (*SerialPort) SendMasterVolume

func (sp *SerialPort) SendMasterVolume(v int)

0<=v<64

func (*SerialPort) SendMuteAndEGReset

func (sp *SerialPort) SendMuteAndEGReset(ch int)

func (*SerialPort) SendPitch

func (sp *SerialPort) SendPitch(ch int, note enums.Note, delta float64)

func (*SerialPort) SendSeqVol

func (sp *SerialPort) SendSeqVol(v int)

0<=v<32

func (*SerialPort) SendTerminate

func (sp *SerialPort) SendTerminate()

func (*SerialPort) SendTones

func (sp *SerialPort) SendTones(data []*voice.VM35FMVoice)

func (*SerialPort) SendVibrato

func (sp *SerialPort) SendVibrato(ch, vib int)

0<=vib<8

func (*SerialPort) SendVolume

func (sp *SerialPort) SendVolume(ch, ChVol int, DIR_CV bool)

0<=ChVol<32

func (*SerialPort) SendWait added in v1.1.0

func (sp *SerialPort) SendWait(msec int)

type TerminateCommand added in v1.1.0

type TerminateCommand struct {
}

func (*TerminateCommand) Bytes added in v1.1.0

func (c *TerminateCommand) Bytes() []byte

type WaitCommand added in v1.1.0

type WaitCommand struct {
	Msec int
}

func (*WaitCommand) Bytes added in v1.1.0

func (c *WaitCommand) Bytes() []byte

Jump to

Keyboard shortcuts

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