Skip to content

Push the writeThenRead method down to I2C implementations - #746

Merged
eitch merged 2 commits into
Pi4J:mainfrom
stefanhaustein:main
Aug 20, 2026
Merged

Push the writeThenRead method down to I2C implementations #746
eitch merged 2 commits into
Pi4J:mainfrom
stefanhaustein:main

Conversation

@stefanhaustein

Copy link
Copy Markdown
Contributor

Remove it from I2C, so implementations are forced to provide an implementation

For now, I am just pushing the existing code to all I2C implementations

This allows cleaning up implementations individually in clean isolated changes.

@sonarqubecloud

Copy link
Copy Markdown

@IAmNickNack

Copy link
Copy Markdown
Contributor

What's the benefit of this?

@stefanhaustein

Copy link
Copy Markdown
Contributor Author

What's the benefit of this?

Followup to #744 partially addressing Tom's request: Make clear what should be implemented by making it abstract. writeThenRead is supposed to have different bus behaviour than a sequence of a write and a read and this should be implemented in i2c providers properly. The only device I am aware of where this matters is BMP 280 in SPI mode but there it was hard to find and debug so we'd like to adjust this long term for i2c, too

@taartspi

taartspi commented Aug 19, 2026 via email

Copy link
Copy Markdown
Contributor

@eitch
eitch merged commit 4c542a4 into Pi4J:main Aug 20, 2026
5 checks passed
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

Successfully merging this pull request may close these issues.

4 participants