- add Makefile
- improve README.md - smaller fixes regarding configuration
This commit is contained in:
@@ -1,25 +1,23 @@
|
||||
package PinControlService
|
||||
|
||||
type PinConfig struct {
|
||||
PinNumber int `yaml:"number"`
|
||||
Name string `yaml:"name"`
|
||||
Direction PinDirection `yaml:"direction"`
|
||||
PullConfig PinPull `yaml:"pull-config"`
|
||||
InitialState PinCommand `yaml:"initial-state"`
|
||||
SendPollingEvents *bool `yaml:"send-polling-events"`
|
||||
SendChangeEvents *bool `yaml:"send-change-events"`
|
||||
|
||||
PinNumber int `yaml:"number"`
|
||||
Name string `yaml:"name"`
|
||||
Direction PinDirection `yaml:"direction"`
|
||||
PullConfig PinPull `yaml:"pull-config"`
|
||||
InitialState *PinCommand `yaml:"initial-state"`
|
||||
SendPollingEvents *bool `yaml:"send-polling-events"`
|
||||
SendChangeEvents *bool `yaml:"send-change-events"`
|
||||
}
|
||||
|
||||
type PinControlConfig struct {
|
||||
GpioPins []PinConfig `yaml:"gpio-pins"`
|
||||
PollingTimeMs int `yaml:"polling-time-ms"`
|
||||
|
||||
GpioPins []PinConfig `yaml:"gpio-pins"`
|
||||
PollingTimeMs int `yaml:"polling-time-ms"`
|
||||
}
|
||||
|
||||
func NewPinControlConfig() PinControlConfig {
|
||||
return PinControlConfig{
|
||||
GpioPins: make([]PinConfig, 0),
|
||||
GpioPins: make([]PinConfig, 0),
|
||||
PollingTimeMs: 100,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user