Skip to content

Feature request: be able to indicate a register needs to be set/read byte-by-byte. #43

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
rpavlik opened this issue Mar 16, 2021 · 0 comments

Comments

@rpavlik
Copy link

rpavlik commented Mar 16, 2021

Ran across this in the context of the emc2101 library. https://github.com/adafruit/Adafruit_CircuitPython_EMC2101 The EMC2101 supports only a small portion of SMBus (i2c) and specifically, can only read or write a single "data" byte per transaction. This means there's a bunch of registers in the code that are, e.g. ..._h and ..._l for two-byte integers, and a place where I'm now trying a StructArray of 16 bytes instead of a StructArray of 8 structs each with 2 bytes. It would simplify the code a lot, and decrease memory usage, if there was a way to indicate byte-at-a-time, perhaps even just a separate few classes for this purpose to avoid increasing memory usage elsewhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant