Generic Register Access Abstraction? #474
stefanhaustein
started this conversation in
Ideas
Replies: 2 comments
-
|
If the underlying driver supported it, this could be also used for SPI. I had a similar thought when working with MCP23008 and MCP23S08. Register-like functionality isn't specific to i2c outside of Pi4j. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Working with registers doesn't really appear to be an i2c thing. I only have limited experience, but I think it's more of a device protocol thing. On an Arduino or ESP32 you can achieve the same functionality just by constructing the right byte array to write to the i2c or SPI device. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Could it make sense to add "generic" super-interfaces for I2CRegisterDataReader/Writer?
Many devices seem to be register based, providing the same functionality via SPI and I2C.
Of course, one could (ab)use the I2C interfaces for SPI support in a driver implementation, but this just seems a bit odd...
Beta Was this translation helpful? Give feedback.
All reactions