@@ -199,8 +199,7 @@ make USER_C_MODULES=../../../../st7789_mpy/st7789/micropython.cmake PORT=/dev/tt
make USER_C_MODULES=../../../../st7789_mpy/st7789/micropython.cmake PORT=/dev/ttyUSB0 deploy
```
The firmware.bin file will be in the build-GENERIC directory. To flash using the python esptool.py utility.
Use pip3 to install the esptool if it's not already installed.
The firmware.bin file will be in the build-GENERIC directory. To flash using the python esptool.py utility. Use pip3 to install the esptool if it's not already installed.
```bash
pip3 install esptool
...
...
@@ -233,8 +232,7 @@ And then compile the module with specified USER_C_MODULES dir
## Working examples
This module was tested on ESP32, STM32 based pyboard v1.1 and the Raspberry Pi
Pico. You have to provide a `SPI` object and the pin to use for the `dc' input of the
screen.
Pico. You have to provide a `SPI` object and the pin to use for the `dc' input of the screen.
# ESP32
...
...
@@ -273,6 +271,22 @@ I was not able to run the display with a baud rate over 40MHZ.
- `buffer_size` If a buffer_size is not specified a dynamically allocated buffer is created and freed as needed. If a buffer_size is specified it must be large enough to contain the largest bitmap, font character and/or decoded JPG image used (Rows * Columns * 2 bytes, 16bit colors in RGB565 notation). Dynamic allocation is slower and can cause heap fragmentation so garbage collection (GC) should be enabled.
- `inversion_mode(bool)` Sets the display color inversion mode if True,
clears the display color inversion mode if false.
- `madctl(value)` Returns the current value of the MADCTL register.
Optionally sets the MADCTL register if a value is passed to the method.
Constant Name | Value | Description
---------------- | ----- | ----------------------
st7789.MADCTL_MY | 0x80 | Page Address Order
st7789_MADCTL_MX | 0x40 | Column Address Order
st7789_MADCTL_MV | 0x20 | Page/Column Order
st7789_MADCTL_ML | 0x10 | Line Address Order
st7789_MADCTL_MH | 0x04 | Display Data Latch Order
st7789_RGB | 0x00 | RGB color order
st7789_BGR | 0x08 | BGR color order
- `on()`
Turn on the backlight pin if one was defined during init.