Closed romatou18 closed 3 years ago
v1 and v3 are incompatible. Use one or the other. See https://periph.io/news/2020/a_new_start/ for more information.
@maruel I am not sure that you've read my report, this is not about trying both libs together but trying v3 first and watching it fail, then as for investigating trying the older version and watching it succeeding. If this is what it takes i ll create a new bug report for v3 and show just that: on exactly the same OS and platform, same config, it fails to list gpios while it should not.
Please take the time to read the report and investigate it this time.
Thanks and regards
Describe the bug Trying to list GPIOs using
gpioreg.All() fails to list the gpios on the board len() == 0
Similarly any attempt go get hold of a pint by name fails just the same i.e.
When using the old library lets call it v1 using instead:
This works perfectly.
To Reproduce
import ( "fmt" "log"
)
func getGPIOSystemIndex(port, index int) int { name := ((((port) - 1) 32) + ((index) & 31)) alternative := (port-1)32 + index
}
func main() {
}
Platform (please complete the following information):
Additional context The distribution used are the standard downloadable demo yocto using on the demo board VAR-DT8Customboard v1.4 All in all this is a market standard IMX8 board. Fails with both IMX8 and IMX8 plus Socs on Zeus kernel 5.4 and Sumo kernel 4.14 versions of yocto.