1
0
Fork 0
mirror of https://github.com/kidoman/embd synced 2025-07-03 11:57:38 +02:00

embd, rpi: determine pi revision, make rev2 pinmap default

added a function to determine the revision of the pi the program is
running on from "Revision" field in /proc/cpuinfo, also made the rev2
gpio pinmap the default
This commit is contained in:
alsm 2014-09-09 15:57:27 +01:00
parent 6ad940090c
commit 9401acd013
2 changed files with 21 additions and 3 deletions

View file

@ -61,9 +61,9 @@ var ledMap = embd.LEDMap{
func init() {
embd.Register(embd.HostRPi, func(rev int) *embd.Descriptor {
var pins = rev1Pins
if rev > 1 {
pins = rev2Pins
var pins = rev2Pins
if rev < 4 {
pins = rev1Pins
}
return &embd.Descriptor{