aboutsummaryrefslogtreecommitdiffstats
path: root/klippy/extras/display/st7920.py
Commit message (Collapse)AuthorAgeFilesLines
* display: Convert to Python3 string encodingKevin O'Connor2021-10-011-6/+6
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* st7920: Better support for emulated ST7920 displays (#3979)teeminus2021-03-011-42/+123
| | | | | Added new ST7920E display driver which is better suited for displays with emulated ST7920 Signed-off-by: Christian Kehe <teeminus@posteo.net>
* extras: Use "from . import module" for relative importsKevin O'Connor2020-06-151-1/+1
| | | | | | Use alternate import syntax to improve Python3 compatibility. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Rework write_graphics() to take one character cell at a timeKevin O'Connor2020-06-111-22/+22
| | | | | | | Change write_graphics() from taking one pixel row of n characters to taking all the rows and columns for one character cell. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Make hd44780 glyphs configurableKevin O'Connor2020-06-091-1/+3
| | | | | | | Allow the 20x4 hd44780 screen glyphs to be customizable from the config file. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move glyph definition to printer configFlorian Heilmann2020-06-081-7/+13
| | | | | | | | This commit allows to modify the icons (or glyphs) in the displays that support it. Existing icons can be modified and new icons can be added via a [display_glyph] section in the config. Signed-off-by: Florian Heilmann <Florian.Heilmann@gmx.net>
* st7920: Wrap code to 80 columnsKevin O'Connor2019-02-271-2/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* font8x14: Store font as strings instead of as bytearrayKevin O'Connor2019-02-271-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Add a get_dimensions() method to lcd chip classesKevin O'Connor2018-11-211-0/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* st7920: Use display xor capability when animating glyphsKevin O'Connor2018-10-041-9/+9
| | | | | | | | | | Use the xor capability of the display to animate the glyphs, which reduces the number of glyphs needed from 4 to 2. This should make it easier to add future animations if desired. Suggested by @marcio-ao. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* st7920: No need to clear glyph framebuffer before programming glyphsKevin O'Connor2018-09-211-3/+4
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* st7920: Simplify framebuffer accessKevin O'Connor2018-09-211-13/+18
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* st7920: Support writing degrees symbolKevin O'Connor2018-09-211-1/+8
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Use write_glyph() when writing special charactersKevin O'Connor2018-09-211-1/+0
| | | | | | | Always use the write_glyph() method when writing special characters during status screen updates. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Support writing single character glyphs using write_glyph()Kevin O'Connor2018-09-211-1/+10
| | | | | | | | Add write_glyph() support to hd44780.py. Update uc1701.py and st7920.py to support writing single character glyphs via write_glyph(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move icon drawing from display.py to lcd_chip codeKevin O'Connor2018-09-211-5/+25
| | | | | | | Move the st7920 icon rendering optimizations from display.py to st7920.py. This simplifies the code for other displays. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* mcu: Rename add_config_object() to register_config_callback()Kevin O'Connor2018-09-031-1/+1
| | | | | | | | | Change the name of the config registration method and pass an explicit reference to the callback to the new method. This makes the relationship between mcu registration and build_config() more clear in the calling code. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* pins: Explicitly pass can_invert and can_pullup to lookup_pin()Kevin O'Connor2018-07-261-3/+1
| | | | | | | | | | | | Don't pass pin_type to lookup_pin() - instead, if a pin can be inverted or can have a pullup, then the caller must explicitly specify that when calling lookup_pin(). This simplifies the code for the cases where it is not valid to invert or pullup. Explicitly pass the pin_type to setup_pin() and have ppins.setup_pin() apply default pullup and invert flags. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* display: Move st7920 code to its own moduleKevin O'Connor2018-06-271-0/+127
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>