Initialise SPI, GPIO and the GC9A01 controller. This is called every display loop iteration for e-Paper partial-update compatibility. We only run the full hardware setup + reset sequence once to avoid the blank flash that a reset causes on every frame.
(self, *args)
| 52 | # ------------------------------------------------------------------ |
| 53 | |
| 54 | def init(self, *args): |
| 55 | """Initialise SPI, GPIO and the GC9A01 controller. |
| 56 | |
| 57 | This is called every display loop iteration for e-Paper partial-update |
| 58 | compatibility. We only run the full hardware setup + reset sequence |
| 59 | once to avoid the blank flash that a reset causes on every frame. |
| 60 | """ |
| 61 | if self._initialized: |
| 62 | return # Already running — skip reset/reinit entirely |
| 63 | self._setup_hardware() |
| 64 | self._reset() |
| 65 | self._send_init_sequence() |
| 66 | self._initialized = True |
| 67 | logger.info("GC9A01 initialised (%dx%d)", self.width, self.height) |
| 68 | |
| 69 | def Clear(self, color=0xFFFF): |
| 70 | """Fill the entire display with a solid RGB565 colour (default white).""" |
no test coverage detected