Skip to content

mch2022: More i2c fixes / workaround for readfrom_mem#28

Merged
smunaut merged 1 commit intomasterfrom
tnt/fix-i2c
Jul 24, 2022
Merged

mch2022: More i2c fixes / workaround for readfrom_mem#28
smunaut merged 1 commit intomasterfrom
tnt/fix-i2c

Conversation

@smunaut
Copy link
Contributor

@smunaut smunaut commented Jul 24, 2022

In the previous version we just refused all transfers that don't
properly generate a STOP at the end. But the way the micropython
code is written the readfrom_mem command will generate a write without
stop then a read.

We can't support that as two different commands, we we detect that
access pattern, store the small write temporarely (it's the register
address), then merge it with the following read command when it
comes.

Signed-off-by: Sylvain Munaut tnt@246tNt.com

In the previous version we just refused all transfers that don't
properly generate a STOP at the end. But the way the micropython
code is written the readfrom_mem command will generate a write without
stop then a read.

We can't support that as two different commands, we we detect that
access pattern, store the small write temporarely (it's the register
address), then merge it with the following read command when it
comes.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
@smunaut smunaut merged commit a9f3efb into master Jul 24, 2022
@smunaut smunaut deleted the tnt/fix-i2c branch July 24, 2022 09:46
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.

1 participant