graycatlabs / PyBBIO

A Python library for Arduino-style hardware IO support on the Beaglebone
https://github.com/graycatlabs/PyBBIO/wiki
MIT License
251 stars 89 forks source link

Fix bus numbering #73

Closed alexanderhiam closed 9 years ago

alexanderhiam commented 9 years ago

Currently the SPI and I2C modules assume the buses are numbered according to the subsystem numbering, but the kernel actually numbers them incrementally in the order they're enabled.

PyBBIO should instead look at what buses are available right before and right after enabling and use the new one.