balazsgrill/wscgo

View on GitHub
devices/devices.go

Summary

Maintainability
A
0 mins
Test Coverage
package devices

import "fmt"

// Device is the interface of a periodically operated peripheral controlled by wscgo.
type Device interface {
    // Tick is called periodically
    Tick() error
    // Initialize is called upon startup
    Initialize() error
}

func invalidPinError(pinName string) error {
    return fmt.Errorf("Pin not found: %s", pinName)
}