Documentation ¶
Index ¶
- Constants
- func FakeGpioImpl(p GpioPlatform, startupState map[uint32]bool) *fakeGpio
- func LogGpio(line string, c chan bool, d bool)
- func NativeEndian() binary.ByteOrder
- func Reboot()
- func Shell()
- func StartNcsi(iface string)
- func Startup(p Platform) (error, chan error)
- func StartupWithConfig(p Platform, c *config.Config) (error, chan error)
- type Addresser
- type FanPlatform
- type FanSystem
- type GpioCallback
- type GpioPlatform
- type GpioSystem
- func (g *GpioSystem) Button(b pb.Button) chan chan bool
- func (g *GpioSystem) Hog(lines map[string]bool)
- func (g *GpioSystem) ManageButton(line string, b pb.Button, flags int)
- func (g *GpioSystem) Monitor(lines map[string]GpioCallback)
- func (g *GpioSystem) PressButton(ctx context.Context, b pb.Button, durMs uint32) (chan bool, error)
- type NDUserOpt
- type Platform
- type RDNSSOption
- type RPCServer
- type Uart
Constants ¶
View Source
const ( GPIO_INVERTED = 0x1 GPIO_EVENT_UNKNOWN = 0 GPIO_EVENT_RISING_EDGE = 1 GPIO_EVENT_FALLING_EDGE = 2 )
View Source
const ( GPIO_GET_CHIPINFO_IOCTL = 0x8044b401 GPIO_GET_LINEINFO_IOCTL = 0xc048b402 GPIO_GET_LINEHANDLE_IOCTL = 0xc16cb403 GPIO_GET_LINEEVENT_IOCTL = 0xc030b404 GPIOHANDLE_SET_LINE_VALUES_IOCTL = 0xc040b409 GPIOHANDLE_GET_LINE_VALUES_IOCTL = 0xc040b408 GPIOHANDLE_REQUEST_INPUT = (1 << 0) GPIOHANDLE_REQUEST_OUTPUT = (1 << 1) GPIOHANDLE_REQUEST_ACTIVE_LOW = (1 << 2) GPIOHANDLE_REQUEST_OPEN_DRAIN = (1 << 3) GPIOHANDLE_REQUEST_OPEN_SOURCE = (1 << 4) GPIOEVENT_REQUEST_RISING_EDGE = (1 << 0) GPIOEVENT_REQUEST_FALLING_EDGE = (1 << 1) GPIOEVENT_REQUEST_BOTH_EDGES = GPIOEVENT_REQUEST_RISING_EDGE | GPIOEVENT_REQUEST_FALLING_EDGE GPIOEVENT_EVENT_RISING_EDGE = 1 GPIOEVENT_EVENT_FALLING_EDGE = 2 )
View Source
const ( ND_ROUTER_ADVERT = 134 ND_OPT_RDNSS = 25 )
Variables ¶
This section is empty.
Functions ¶
func FakeGpioImpl ¶
func FakeGpioImpl(p GpioPlatform, startupState map[uint32]bool) *fakeGpio
func NativeEndian ¶
Types ¶
type GpioCallback ¶
type GpioPlatform ¶
type GpioSystem ¶
type GpioSystem struct {
// contains filtered or unexported fields
}
func NewGpioSystem ¶
func NewGpioSystem(p GpioPlatform, impl gpioImpl) *GpioSystem
func (*GpioSystem) Hog ¶
func (g *GpioSystem) Hog(lines map[string]bool)
func (*GpioSystem) ManageButton ¶
func (g *GpioSystem) ManageButton(line string, b pb.Button, flags int)
func (*GpioSystem) Monitor ¶
func (g *GpioSystem) Monitor(lines map[string]GpioCallback)
func (*GpioSystem) PressButton ¶
type NDUserOpt ¶
type NDUserOpt struct { Family uint8 Ifindex uint32 ICMPType uint8 ICMPCode uint8 RDNSS []*RDNSSOption }
type Platform ¶
type Platform interface { InitializeSystem() error HostUart() (string, int) GpioPlatform FanPlatform }
type RPCServer ¶
type RPCServer interface {
EnableRemote(*tls.Certificate) error
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.