-
Notifications
You must be signed in to change notification settings - Fork 196
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
uc8151: add FillRectangle() and SetScroll() functions to satisfy tinyterm.Displayer interface #711
Conversation
…term.Displayer interface Signed-off-by: deadprogram <[email protected]>
Once this can get merged, I have some related changes to tinyterm that allows it to work on the badger2040 display. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want to add an assertion that it satisfies the interface?
@ydnar what would be the best way to do that? The interface is defined in package that consumes this package here: https://github.com/tinygo-org/tinyterm/blob/release/tinyterm.go#L27 |
Can you define it elsewhere and have tinyterm import that and alias it? |
Seems like a big lift for little value... |
I'll think about a way to do it in a future PR. Thanks for review @ydnar now merging. |
// SetScroll sets the vertical scrolling for the display, which is a NOP for this display. | ||
func (d *Device) SetScroll(line int16) { | ||
return | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have a program that calls SetScroll
without first calling SetScrollArea
? I think that won't work on other displays like ST7789.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for interface compatibility with tinyterm which does not call SetScrollArea()
. See https://github.com/tinygo-org/tinyterm/blob/release/tinyterm.go#L27-L31
Actually, in the case of the uc8151
tinyterm only uses the software scroll, which is why the implementation here just returns without doing anything.
This PR adds to the
uc8151
display by implementing theFillRectangle()
andSetScroll()
functions in order to satisfy thetinyterm.Displayer
interface.