aboutsummaryrefslogtreecommitdiffstats
path: root/src/lcd_st7920.c
Commit message (Collapse)AuthorAgeFilesLines
* lcd_st7920: Check CONFIG_MACH_AVR for slow mcusKevin O'Connor2021-07-041-2/+2
| | | | | | | Use CONFIG_MACH_AVR instead of CONFIG_CLOCK_FREQ to check for slow mcus. Some fast MCUs do not export a high clock frequency. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* command: Add command_decode_ptr() helperKevin O'Connor2020-10-301-2/+2
| | | | | | | | Add a helper function to convert from a string buffer passed in the args[] parameter to an actual pointer. This avoids all the callers needing to perfrom pointer manipulation. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Only calibrate wait ticks on mcus with strict timingKevin O'Connor2020-05-311-0/+6
| | | | | | | The calibration isn't valid on the linux mcu, so make it dependent on CONFIG_HAVE_STRICT_TIMING. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Add brief delay around gpio toggle calls on fast MCUsKevin O'Connor2019-08-101-0/+20
| | | | | | | | | On fast MCUs (like the SAMD51) it is possible for the gpio to toggle faster than the st7920 can accept. Add a small delay around the clock rise signal. Signed-off-by: Lars R. Hansen <popshansen@hotmail.com> Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Use a longer delay at the start of each command/dataKevin O'Connor2018-06-221-9/+27
| | | | | | | | | | | It appears the st7920 requires a longer delay when switching from command to data mode (and vice-versa). Slower MCUs don't show a problem because the klipper command processing time results in a sufficient delay. However, some of the faster MCUs can process klipper commands fast enough that the next st7920 transfer is sent too fast. Add an additional delay to account for this. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* lcd_st7920: Add micro-controller code for the ST7920 LCD chipKevin O'Connor2018-03-061-0/+121
Add support for passing messages to an ST7920 chip via a SPI bit-banging interface. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>