extenders

package
v0.0.0-...-7b92d88 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DebugConsoleUSB = "usb"

Variables

This section is empty.

Functions

func NewADC

func NewADC(instances ...devicetree.ADCPin) generator.Extender

func NewBootloaderConfig

func NewBootloaderConfig(config *board.Bootloader) generator.SimpleExtender

func NewButtons

func NewButtons(instances ...types.Pin) generator.Extender

func NewDebugUARTLog

func NewDebugUARTLog(config DebugConfig) generator.Extender

func NewLEDs

func NewLEDs(instances ...types.Pin) generator.Extender

func NewNrfxTemp

func NewNrfxTemp() generator.SimpleExtender

func NewUSBUART

func NewUSBUART() generator.Extender

NewUSBUART will add necessary configuration to enable USB UART output.

https://docs.zephyrproject.org/latest/connectivity/usb/device/usb_device.html#console-over-cdc-acm-uart

Types

type ADC

type ADC struct {
	generator.SimpleExtender

	Instances []devicetree.ADCPin
}

func (ADC) ApplyOverlay

func (l ADC) ApplyOverlay(dt *devicetree.DeviceTree) error

func (ADC) Includes

func (l ADC) Includes() []string

func (ADC) Template

func (l ADC) Template() string

func (ADC) WriteFiles

func (l ADC) WriteFiles() []generator.WriteFile

type Button

type Button struct {
	generator.SimpleExtender

	Instances []types.Pin
}

func (Button) ApplyOverlay

func (l Button) ApplyOverlay(dt *devicetree.DeviceTree) error

func (Button) Includes

func (l Button) Includes() []string

func (Button) Template

func (l Button) Template() string

type DebugConfig

type DebugConfig struct {
	Enabled bool
	LEDs    DebugLEDs
	Console string
}

type DebugLEDs

type DebugLEDs struct {
	Enabled    bool
	Power      string
	Connection string
}

type GPIO

type GPIO struct {
	generator.SimpleExtender `yaml:"-"`
}

func (GPIO) Includes

func (GPIO) Includes() []string

type I2C

type I2C struct {
	generator.SimpleExtender

	Instances []I2CInstance
}

func NewI2C

func NewI2C(instances ...I2CInstance) I2C

func (I2C) ApplyOverlay

func (i I2C) ApplyOverlay(dt *devicetree.DeviceTree) error

type I2CInstance

type I2CInstance struct {
	// ID is a actual label of pre-defined I2C peripheral.
	// For example most SoCs would have IDs something like i2c0, i2c1, ...
	ID       string
	SDA, SCL types.Pin
}

type LED

type LED struct {
	generator.SimpleExtender

	Instances []types.Pin
}

func (LED) ApplyOverlay

func (l LED) ApplyOverlay(dt *devicetree.DeviceTree) error

func (LED) Includes

func (l LED) Includes() []string

func (LED) Template

func (l LED) Template() string

type SCD4X

type SCD4X struct {
	generator.SimpleExtender
}

func NewSCD4X

func NewSCD4X() SCD4X

type Sensor

type Sensor struct{}

func NewSensor

func NewSensor() Sensor

func (Sensor) AppConfig

func (Sensor) AppConfig() []appconfig.ConfigValue

AppConfig implements appconfig.Provider.

func (Sensor) Includes

func (Sensor) Includes() []string

Includes implements templates.Extender.

func (Sensor) Template

func (Sensor) Template() string

Template implements templates.Extender.

func (Sensor) WriteFiles

func (Sensor) WriteFiles() []generator.WriteFile

WriteFiles implements templates.Extender.

func (Sensor) ZephyrModules

func (Sensor) ZephyrModules() []string

type UART

type UART struct {
	generator.SimpleExtender

	Instances []UARTInstance
}

func NewUART

func NewUART(instances ...UARTInstance) UART

func (UART) AppConfig

func (i UART) AppConfig() []appconfig.ConfigValue

func (UART) ApplyOverlay

func (i UART) ApplyOverlay(dt *devicetree.DeviceTree) error

type UARTInstance

type UARTInstance struct {
	// ID is a actual label of pre-defined UART peripheral.
	// For example most SoCs would have IDs something like uart0, uart1, ...
	ID     string
	TX, RX types.Pin
	Speed  int
}

Jump to

Keyboard shortcuts

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