kplindegaard / smbus2

A drop-in replacement for smbus-cffi/smbus-python in pure Python
MIT License
243 stars 68 forks source link

Expose enumeration of I2c funcs #30

Closed paulo-raca closed 5 years ago

paulo-raca commented 5 years ago

Previously, smbus.funcs was defined, but it's flags were not exported.

To avoid clutter, I've moved all the values into the I2cFunc class, and exported it.

On newer python releases, I2cFunc acts as an IntFlags, which is easier to read than a plain int. On older releases, it falls back to a pure int.

paulo-raca commented 5 years ago

Again, thank you for the quick review :)

kplindegaard commented 5 years ago

Hi @paulo-raca. Just wanted to say I haven't forgotten this PR. Will include this soon and release a version 0.3.0 together with PR #39 once that is settled and done.

paulo-raca commented 5 years ago

Haha, well, I had forgotten it :P

Thanks!