Versions in this module Expand all Collapse all v3 v3.7.5 Jul 26, 2022 v3.7.4 Jul 21, 2022 Changes in this version + var LEDs []*LED + var Pins map[int]*Pin + var ThermalSensors []*ThermalSensor + func I2CSetSpeedHook(h func(f physic.Frequency) error) error + type I2C struct + func NewI2C(busNumber int) (*I2C, error) + func (i *I2C) Close() error + func (i *I2C) SCL() gpio.PinIO + func (i *I2C) SDA() gpio.PinIO + func (i *I2C) SetSpeed(f physic.Frequency) error + func (i *I2C) String() string + func (i *I2C) Tx(addr uint16, w, r []byte) error + type LED struct + func LEDByName(name string) (*LED, error) + func (l *LED) DefaultPull() gpio.Pull + func (l *LED) Func() pin.Func + func (l *LED) Function() string + func (l *LED) Halt() error + func (l *LED) In(pull gpio.Pull, edge gpio.Edge) error + func (l *LED) Name() string + func (l *LED) Number() int + func (l *LED) Out(level gpio.Level) error + func (l *LED) PWM(d gpio.Duty, f physic.Frequency) error + func (l *LED) Pull() gpio.Pull + func (l *LED) Read() gpio.Level + func (l *LED) SetFunc(f pin.Func) error + func (l *LED) String() string + func (l *LED) SupportedFuncs() []pin.Func + func (l *LED) WaitForEdge(timeout time.Duration) bool + type Pin struct + func (p *Pin) DefaultPull() gpio.Pull + func (p *Pin) Func() pin.Func + func (p *Pin) Function() string + func (p *Pin) Halt() error + func (p *Pin) In(pull gpio.Pull, edge gpio.Edge) error + func (p *Pin) Name() string + func (p *Pin) Number() int + func (p *Pin) Out(l gpio.Level) error + func (p *Pin) PWM(gpio.Duty, physic.Frequency) error + func (p *Pin) Pull() gpio.Pull + func (p *Pin) Read() gpio.Level + func (p *Pin) SetFunc(f pin.Func) error + func (p *Pin) String() string + func (p *Pin) SupportedFuncs() []pin.Func + func (p *Pin) WaitForEdge(timeout time.Duration) bool + type SPI struct + func NewSPI(busNumber, chipSelect int) (*SPI, error) + func (s *SPI) CLK() gpio.PinOut + func (s *SPI) CS() gpio.PinOut + func (s *SPI) Close() error + func (s *SPI) Connect(f physic.Frequency, mode spi.Mode, bits int) (spi.Conn, error) + func (s *SPI) LimitSpeed(f physic.Frequency) error + func (s *SPI) MISO() gpio.PinIn + func (s *SPI) MOSI() gpio.PinOut + func (s *SPI) MaxTxSize() int + func (s *SPI) String() string + type ThermalSensor struct + func ThermalSensorByName(name string) (*ThermalSensor, error) + func (t *ThermalSensor) Halt() error + func (t *ThermalSensor) Precision(e *physic.Env) + func (t *ThermalSensor) Sense(e *physic.Env) error + func (t *ThermalSensor) SenseContinuous(interval time.Duration) (<-chan physic.Env, error) + func (t *ThermalSensor) String() string + func (t *ThermalSensor) Type() string