adafruit / Adafruit_CircuitPython_BusDevice

Two helper classes that handle transaction related state for I2C and SPI including locks.
MIT License
105 stars 76 forks source link

Fix usage example for SPIDevice #5

Closed deshipu closed 7 years ago

deshipu commented 7 years ago

The original usage example doesn't work.

tannewt commented 7 years ago

I totally blanked on this! I wish I had seen it sooner. The two transactions with statement need to be within the spi_bus because exiting it will call deinit and shutdown the bus. @robomike ran into this issue today.

tannewt commented 7 years ago

And I blanked again on this... I've updated it now in 6d69283. Thank you for this pull!