You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The :code:`lcddrvce` library is used for interacting with the Sitronix ST7789 LCD controller.
11
+
12
+
.. contents:: :local:
13
+
:depth: 3
14
+
15
+
Overview
16
+
--------
17
+
18
+
This library exposes interfaces to send any supported command to the LCD (this excludes read commands, which don't work reliably on CE hardware).
19
+
20
+
Communication with the LCD controller is done over an SPI connection; however, the SPI hardware is also used to communicate with the ARM coprocessor on Python models.
21
+
As such, the SPI hardware is not always set up properly to communicate with the LCD controller, and this library exists to provide a reliable and performant interface to the LCD across calculator models.
22
+
23
+
Library Initialization
24
+
----------------------
25
+
26
+
The :code:`lcd_Init` and :code:`lcd_Cleanup` functions provide reference-counted initialization and cleanup of the SPI configuration.
27
+
That means multiple calls to :code:`lcd_Init()` are allowed, and the SPI hardware is restored to its original settings only after the same number of calls to :code:`lcd_Cleanup()`.
28
+
Since the configuration is set differently than the OS's default settings for performance reasons, it's not allowed to power off the calculator without cleaning up the library first.
29
+
This means if calling certain functions like :code:`os_GetKey` which can auto-power-down the calculator, either the LCD library should be cleaned up or auto-power-down should be disabled with :code:`os_DisableAPD()`.
30
+
When using this library as part of another library's implementation and performance is not critical, it's safest to call both :code:`lcd_Init()` and :code:`lcd_Cleanup()` each time commands need to be sent.
31
+
That way, users of the library will be able to cleanup the SPI configuration whenever they need to.
0 commit comments