joukos / PaperTTY

PaperTTY - Python module to render a TTY or VNC on e-ink
957 stars 105 forks source link

SPI speed arg in Mhz for IT8951 panel #118

Closed mcarr823 closed 11 months ago

mcarr823 commented 11 months ago

This PR adds an optional --mhz argument for terminal mode. It has only been implemented in terminal mode and for the IT8951 panel.

The implementation follows the same process as the optional VCOM argument.

If undefined, it will default to 2Mhz, which was already the hard-coded speed.

Adjusting the SPI speed may result in faster data transmission, depending on the driver board and rpi. The waveshare docs suggest either 12.5MHz or 25MHz depending on which rpi it is. This PR doesn't go as far as actually using those values or suggesting them. But it does give users the option to set it themselves via a CLI argument. (Going through the issues here, some people have already been manually editing the value to try and get faster speeds)