pimoroni / i2cdevice-python

Domain-specific language for describing smbus/i2c register maps
MIT License
26 stars 14 forks source link

Read registers only once per get() #5

Closed dkao closed 4 years ago

dkao commented 4 years ago

get() was triggering one read transaction per get_field()

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 31


Totals Coverage Status
Change from base Build 29: 0.01%
Covered Lines: 211
Relevant Lines: 214

💛 - Coveralls
Gadgetoid commented 4 years ago

Ooooof, good catch. This can have some brutal side-effects on devices which require multiple things to be read in a single transaction (that do shadow copies and reset the interrupt for example). Will test and merge as soon as I can, thank you.