mirror of
https://github.com/stianeikeland/go-rpio.git
synced 2025-02-02 15:30:36 +01:00
Fixing a bug (oops)
This commit is contained in:
parent
cf3a8b7ed1
commit
733fee47fc
8
rpio.go
8
rpio.go
|
@ -58,6 +58,7 @@ package rpio
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"reflect"
|
"reflect"
|
||||||
"sync"
|
"sync"
|
||||||
|
@ -323,10 +324,11 @@ func getGPIOBase() (base int64) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
buf := bytes.NewReader(b)
|
buf := bytes.NewReader(b)
|
||||||
var out int64
|
var out uint32
|
||||||
err = binary.Read(buf, binary.LittleEndian, &out)
|
err = binary.Read(buf, binary.BigEndian, &out)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
return out + 0x200000
|
fmt.Printf("%X", out)
|
||||||
|
return int64(out + 0x200000)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user