Skip to content
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

fix: bitmasking in smartConfigure to prevent overwrite of cfg0 #1489

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

fabianhugo
Copy link

As mentioned in this issue microsoft/pxt-arcade#6438 changing the CFG0 bytes does not lead to the desired change in e.g. the offset values for the display when the display type is set to 4242 (Smart Display). I could trace this down to the smartConfigure function, in which in line 173 or 175 the content of the cfg0 variable is currently rewritten to either 0x80 or 0x40. Since the smartConfigure function is called before the offset values are read out (line 82), the rewriting leads to an erasure of the offset values. My proposed fix is to bitmask writing the cfg0 variable to keep all bytes despite the LSB.

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