conf

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package conf provides the interface used to modify STUSB4500 configuration.

Index

Constants

View Source
const (
	DefaultUSBPDTimeout = 200 // messages sent
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	ResetPin  machine.Pin
	AlertPin  machine.Pin
	AttachPin machine.Pin

	OnInitFail     ErrorCallback // I2C initialization failure
	OnResetFail    ErrorCallback // I2C reconnection to STUSB4500 failed
	OnConnect      EventCallback // I2C connection to STUSB4500 succeeded
	OnConnectFail  ErrorCallback // I2C connection to STUSB4500 failed
	OnError        ErrorCallback // I2C or STUSB4500 runtime error
	OnCableAttach  EventCallback // USB Type-C cable connected
	OnCableDetach  EventCallback // USB Type-C cable disconnected
	OnCapabilities EventCallback // USB PD capabilities received from source

	USBPDTimeout int // -1 = unlimited (never timeout)
}

type ErrorCallback

type ErrorCallback func(error)

type EventCallback

type EventCallback func()

Jump to

Keyboard shortcuts

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