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

Access to set_line_offset in graphics mode. #21

Closed
agrif opened this issue May 19, 2024 · 4 comments
Closed

Access to set_line_offset in graphics mode. #21

agrif opened this issue May 19, 2024 · 4 comments

Comments

@agrif
Copy link
Contributor

agrif commented May 19, 2024

My ST7565 controller does not appear to set the line offset to 0 after a reset. I'm not sure yet whether this is a weird cloned ST7565 or if something else is going on. Right now I'm setting a 0 line offset manually.

However, set_line_offset is only available in raw mode, and there doesn't appear to be any way to move from raw mode to graphics mode or vice versa. At the moment, I'm detaching the display from the SPI interface and sending the raw command myself.

I can think of a few ways to make this less awkward. Any one of these would be enough, but they're not exclusive.

  • Set the line offset to 0 inside either reset or flush. There's some indication in the datasheet that this is normal. This is what the original firmware driving my display does during reset.

  • Move set_line_offset (and maybe a few other settings commands) into the common interface accessible from all modes. It would be neat, for example, to invert the entire screen or turn on all pixels cheaply even in graphics mode.

  • Add a way to move from graphics mode to raw mode and back. I haven't thought too hard about whether this would cause problems.

@Finomnis
Copy link
Owner

Finomnis commented May 20, 2024

Set the line offset to 0 inside either reset or flush. - If a chip reset doesn't initialize this properly, we should add this regardless of whether or not we implement your other proposed changes.

@agrif
Copy link
Contributor Author

agrif commented May 20, 2024

I can make a PR for that, at least. I don't have strong opinions on the other two changes, though I'd be happy to add those also.

Of the two, I think exposing set_line_offset, set_inverted, and display_all_points in all modes has the smallest impact.

@Finomnis
Copy link
Owner

Sure, whatever you deem useful :)

@agrif agrif mentioned this issue May 21, 2024
@Finomnis
Copy link
Owner

Fixed by #23

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

No branches or pull requests

2 participants