Documentation ¶
Overview ¶
Package host defines the host itself.
The host is the machine where this code is running.
Subpackages contain the drivers that are loaded automatically.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
Init calls periph.Init() and returns it as-is.
The only difference is that by calling host.Init(), you are guaranteed to have all the drivers implemented in this library to be implicitly loaded.
Example ¶
state, err := Init() if err != nil { log.Fatalf("failed to initialize periph: %v", err) } fmt.Printf("Using drivers:\n") for _, driver := range state.Loaded { fmt.Printf("- %s\n", driver) } fmt.Printf("Drivers skipped:\n") for _, failure := range state.Skipped { fmt.Printf("- %s: %s\n", failure.D, failure.Err) } // Having drivers failing to load may not require process termination. It // is possible to continue to run in partial failure mode. fmt.Printf("Drivers failed to load:\n") for _, failure := range state.Failed { fmt.Printf("- %s: %v\n", failure.D, failure.Err) } // Use pins, buses, devices, etc.
Output:
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package allwinner exposes the GPIO functionality that is common to all AllWinner processors.
|
Package allwinner exposes the GPIO functionality that is common to all AllWinner processors. |
Package bcm283x exposes the BCM283x GPIO functionality.
|
Package bcm283x exposes the BCM283x GPIO functionality. |
Package chip contains header definitions for NextThing Co's C.H.I.P. board.
|
Package chip contains header definitions for NextThing Co's C.H.I.P. board. |
chipsmoketest
Package chipsmoketest is leveraged by periph-smoketest to verify that basic CHIP specific functionality works.
|
Package chipsmoketest is leveraged by periph-smoketest to verify that basic CHIP specific functionality works. |
Package cpu implements functions relating to the host CPU itself.
|
Package cpu implements functions relating to the host CPU itself. |
Package distro implements common functionality to auto-detect features on the host; generally about linux distributions.
|
Package distro implements common functionality to auto-detect features on the host; generally about linux distributions. |
Package fs provides access to the file system on the host.
|
Package fs provides access to the file system on the host. |
Package odroidc1 contains header definitions for Hardkernel's ODROID C0, C1, and C1+ boards.
|
Package odroidc1 contains header definitions for Hardkernel's ODROID C0, C1, and C1+ boards. |
odroidc1smoketest
Package odroidc1smoketest is leveraged by periph-smoketest to verify that basic ODROID-C1 specific functionality works.
|
Package odroidc1smoketest is leveraged by periph-smoketest to verify that basic ODROID-C1 specific functionality works. |
Package pine64 contains Pine64 hardware logic.
|
Package pine64 contains Pine64 hardware logic. |
Package pmem implements handling of physical memory for user space programs.
|
Package pmem implements handling of physical memory for user space programs. |
Package rpi contains Raspberry Pi hardware logic.
|
Package rpi contains Raspberry Pi hardware logic. |
Package sysfs implements a sane library to interact with sysfs provided hardware access.
|
Package sysfs implements a sane library to interact with sysfs provided hardware access. |
Package videocore interacts with the VideoCore GPU found on bcm283x.
|
Package videocore interacts with the VideoCore GPU found on bcm283x. |
Click to show internal directories.
Click to hide internal directories.