customlinux

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package customlinux implements a board running linux

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PinConfigFilePath string `json:"pin_config_filepath"`
	genericlinux.Config
}

A Config describes the configuration of a board and all of its connected parts.

func (*Config) Validate

func (conf *Config) Validate(path string) ([]string, error)

Validate ensures all parts of the config are valid.

type GenericLinuxPin

type GenericLinuxPin struct {
	Name            string `json:"name"`
	Ngpio           int    `json:"ngpio"` // this is the ngpio number of the chip the pin is attached to
	LineNumber      int    `json:"line_number"`
	PwmChipSysfsDir string `json:"pwm_chip_sysfs_dir,omitempty"`
	PwmID           int    `json:"pwm_id,omitempty"`
}

GenericLinuxPin describes a gpio pin on a linux board.

func (*GenericLinuxPin) UnmarshalJSON

func (conf *GenericLinuxPin) UnmarshalJSON(text []byte) error

UnmarshalJSON handles setting defaults for pin configs.

func (*GenericLinuxPin) Validate

func (conf *GenericLinuxPin) Validate(path string) error

Validate ensures all parts of the config are valid.

type GenericLinuxPins

type GenericLinuxPins struct {
	Pins []GenericLinuxPin `json:"pins"`
}

GenericLinuxPins describes a list of pins on a linux board.

Jump to

Keyboard shortcuts

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