Paged i2c accessor - #64
Conversation
|
Are there other chips that need this? Could it live with the CS42L42 for now until it is needed elsewhere? |
|
There are other chips that use the same paging mechanism. So it is used more broadly, but I wouldn't say it's strictly needed anywhere else at this time. Can move it into the CS42L42 driver for now. |
|
How do those other drivers do it? Should we refactor them all? |
|
@tannewt I think the only with an Adafruit driver is the BNO055. It doesn't use adafruit_register. It has it's on The TLV320AIC3204 has a community bundle driver. That one uses |
|
Ok, I've reopened this so drivers can be migrated to it. |
tannewt
left a comment
There was a problem hiding this comment.
One suggestion to make a new file for it. Otherwise it'll be good. I like packing the page number into the register address.
| i2c.write(self._full_buffer, end=self.address_width + len(buffer)) | ||
|
|
||
|
|
||
| class PagedI2CRegisterAccessor(I2CRegisterAccessor): |
There was a problem hiding this comment.
Put this in a new file so it is imported separately.
Paged I2C accessor that supports chips like CS42L42 which use a page register to be able to re-use the same smaller address space across different pages.