Package for determining the used Raspberry Pi hardware with corresponding information during runtime.
This package determines the running Raspberry Pi hardware by checking either /proc/cpuinfo
or /proc/device-tree/system/linux,revision
.
It returns information about:
- hardware version
- Pi model type
- oscillator frequency
- base address for 'physical memory'
- description of the model
The list is inspired by github.com/jgarff/rpi_ws281x.
go get github.com/DerLukas15/rpihardware
Import the package
import ("github.com/DerLukas15/rpihardware")
Get the struct containing the information about the hardware:
curHardware, err := rpihardware.Check()
MIT, see LICENSE