mirror of
https://github.com/stianeikeland/go-rpio.git
synced 2025-03-15 17:38:44 +01:00
Fixed the comment for getGPIOBase()
This commit is contained in:
parent
733fee47fc
commit
10a90652fd
4
rpio.go
4
rpio.go
|
@ -309,8 +309,8 @@ func Close() error {
|
|||
return syscall.Munmap(mem8)
|
||||
}
|
||||
|
||||
// Read /proc/cpuinfo and detect whether we're running on an RPI1 or RPI2.
|
||||
// Returns 1 or 2 depending on platform.
|
||||
// Read /proc/device-tree/soc/ranges and determine the base address.
|
||||
// Use the default Raspberry Pi 1 base address if this fails.
|
||||
func getGPIOBase() (base int64) {
|
||||
base = pi1GPIOBase
|
||||
ranges, err := os.Open("/proc/device-tree/soc/ranges")
|
||||
|
|
Loading…
Reference in New Issue
Block a user