module documentation

MIT License Copyright (c) 2020-2023 Russ Hughes Copyright (c) 2019 Ivan Belokobylskiy Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The driver is based on devbis' st7789py_mpy module from https://github.com/devbis/st7789py_mpy. This driver supports: - 320x240, 240x240, 135x240 and 128x128 pixel displays - Display rotation - RGB and BGR color orders - Hardware based scrolling - Drawing text using 8 and 16 bit wide bitmap fonts with heights that are multiples of 8. Included are 12 bitmap fonts derived from classic pc BIOS text mode fonts. - Drawing text using converted TrueType fonts. - Drawing converted bitmaps - Named color constants - BLACK - BLUE - RED - GREEN - CYAN - MAGENTA - YELLOW - WHITE

Class micropython Undocumented
Class ST7789 ST7789 driver class
Function color565 Convert red, green and blue values (0-255) into a 16-bit 565 encoding.
Function color888 Undocumented
Function color_reverse Undocumented
Function luminance Undocumented
Constant BGR Undocumented
Constant BLACK Undocumented
Constant BLUE Undocumented
Constant CYAN Undocumented
Constant GREEN Undocumented
Constant MAGENTA Undocumented
Constant RED Undocumented
Constant RGB Undocumented
Constant WHITE Undocumented
Constant YELLOW Undocumented
Variable const Undocumented
Constant _BIT0 Undocumented
Constant _BIT1 Undocumented
Constant _BIT2 Undocumented
Constant _BIT3 Undocumented
Constant _BIT4 Undocumented
Constant _BIT5 Undocumented
Constant _BIT6 Undocumented
Constant _BIT7 Undocumented
Constant _BUFFER_SIZE Undocumented
Constant _COLOR_MODE_12BIT Undocumented
Constant _COLOR_MODE_16BIT Undocumented
Constant _COLOR_MODE_16M Undocumented
Constant _COLOR_MODE_18BIT Undocumented
Constant _COLOR_MODE_262K Undocumented
Constant _COLOR_MODE_65K Undocumented
Constant _ENCODE_PIXEL Undocumented
Constant _ENCODE_PIXEL_SWAPPED Undocumented
Constant _ENCODE_POS Undocumented
Constant _ENCODE_POS_16 Undocumented
Constant _HEIGHT Undocumented
Constant _NEEDS_SWAP Undocumented
Constant _ST7789_CASET Undocumented
Constant _ST7789_COLMOD Undocumented
Constant _ST7789_DISPOFF Undocumented
Constant _ST7789_DISPON Undocumented
Constant _ST7789_INIT_CMDS Undocumented
Constant _ST7789_INVOFF Undocumented
Constant _ST7789_INVON Undocumented
Constant _ST7789_MADCTL Undocumented
Constant _ST7789_MADCTL_BGR Undocumented
Constant _ST7789_MADCTL_MH Undocumented
Constant _ST7789_MADCTL_ML Undocumented
Constant _ST7789_MADCTL_MV Undocumented
Constant _ST7789_MADCTL_MX Undocumented
Constant _ST7789_MADCTL_MY Undocumented
Constant _ST7789_MADCTL_RGB Undocumented
Constant _ST7789_NORON Undocumented
Constant _ST7789_RAMCTL Undocumented
Constant _ST7789_RAMWR Undocumented
Constant _ST7789_RASET Undocumented
Constant _ST7789_SLPIN Undocumented
Constant _ST7789_SLPOUT Undocumented
Constant _ST7789_SWRESET Undocumented
Constant _ST7789_VSCRDEF Undocumented
Constant _ST7789_VSCSAD Undocumented
Constant _SUPPORTED_DISPLAYS Undocumented
Constant _WIDTH Undocumented
Constant _XSTART Undocumented
Constant _YSTART Undocumented
Variable _DISPLAY_128x128 Undocumented
Variable _DISPLAY_135x240 Undocumented
Variable _DISPLAY_240x240 Undocumented
Variable _DISPLAY_240x320 Undocumented
def color565(red, green=0, blue=0):

Convert red, green and blue values (0-255) into a 16-bit 565 encoding.

def color888(color=0):

Undocumented

def color_reverse(bg_color):

Undocumented

def luminance(r, g, b):

Undocumented

BGR: int =

Undocumented

Value
8
BLACK =

Undocumented

Value
const(0)
BLUE =

Undocumented

Value
const(31)
CYAN =

Undocumented

Value
const(2047)
GREEN =

Undocumented

Value
const(2016)
MAGENTA =

Undocumented

Value
const(63519)
RED =

Undocumented

Value
const(63488)
RGB: int =

Undocumented

Value
0
WHITE =

Undocumented

Value
const(65535)
YELLOW =

Undocumented

Value
const(65504)
const =

Undocumented

_BIT0 =

Undocumented

Value
const(1)
_BIT1 =

Undocumented

Value
const(2)
_BIT2 =

Undocumented

Value
const(4)
_BIT3 =

Undocumented

Value
const(8)
_BIT4 =

Undocumented

Value
const(16)
_BIT5 =

Undocumented

Value
const(32)
_BIT6 =

Undocumented

Value
const(64)
_BIT7 =

Undocumented

Value
const(128)
_BUFFER_SIZE =

Undocumented

Value
const(256)
_COLOR_MODE_12BIT =

Undocumented

Value
const(3)
_COLOR_MODE_16BIT =

Undocumented

Value
const(5)
_COLOR_MODE_16M =

Undocumented

Value
const(7)
_COLOR_MODE_18BIT =

Undocumented

Value
const(6)
_COLOR_MODE_262K =

Undocumented

Value
const(96)
_COLOR_MODE_65K =

Undocumented

Value
const(80)
_ENCODE_PIXEL =

Undocumented

Value
const('>H')
_ENCODE_PIXEL_SWAPPED =

Undocumented

Value
const('<H')
_ENCODE_POS =

Undocumented

Value
const('>HH')
_ENCODE_POS_16 =

Undocumented

Value
const('<HH')
_HEIGHT =

Undocumented

Value
const(1)
_NEEDS_SWAP =

Undocumented

Value
const(4)
_ST7789_CASET: bytes =

Undocumented

Value
b'*'
_ST7789_COLMOD: bytes =

Undocumented

Value
b':'
_ST7789_DISPOFF: bytes =

Undocumented

Value
b'('
_ST7789_DISPON: bytes =

Undocumented

Value
b')'
_ST7789_INIT_CMDS: tuple[tuple, ...] =

Undocumented

Value
((b'\x11', b'\x00', 120),
 (b'\x13', b'\x00', 0),
 (b'\xb6', b'\n\x82', 0),
 (b':', b'U', 10),
 (b'\xb2', b'\x0c\x0c\x0033', 0),
 (b'\xb7', b'5', 0),
 (b'\xbb', b'(', 0),
...
_ST7789_INVOFF: bytes =

Undocumented

Value
b' '
_ST7789_INVON: bytes =

Undocumented

Value
b'!'
_ST7789_MADCTL: bytes =

Undocumented

Value
b'6'
_ST7789_MADCTL_BGR =

Undocumented

Value
const(8)
_ST7789_MADCTL_MH =

Undocumented

Value
const(4)
_ST7789_MADCTL_ML =

Undocumented

Value
const(16)
_ST7789_MADCTL_MV =

Undocumented

Value
const(32)
_ST7789_MADCTL_MX =

Undocumented

Value
const(64)
_ST7789_MADCTL_MY =

Undocumented

Value
const(128)
_ST7789_MADCTL_RGB =

Undocumented

Value
const(0)
_ST7789_NORON: bytes =

Undocumented

Value
b'\x13'
_ST7789_RAMCTL: bytes =

Undocumented

Value
b'\xb0'
_ST7789_RAMWR: bytes =

Undocumented

Value
b','
_ST7789_RASET: bytes =

Undocumented

Value
b'+'
_ST7789_SLPIN: bytes =

Undocumented

Value
b'\x10'
_ST7789_SLPOUT: bytes =

Undocumented

Value
b'\x11'
_ST7789_SWRESET: bytes =

Undocumented

Value
b'\x01'
_ST7789_VSCRDEF: bytes =

Undocumented

Value
b'3'
_ST7789_VSCSAD: bytes =

Undocumented

Value
b'7'
_SUPPORTED_DISPLAYS =

Undocumented

Value
((240, 320, _DISPLAY_240x320),
 (240, 240, _DISPLAY_240x240),
 (135, 240, _DISPLAY_135x240),
 (128, 128, _DISPLAY_128x128))
_WIDTH =

Undocumented

Value
const(0)
_XSTART =

Undocumented

Value
const(2)
_YSTART =

Undocumented

Value
const(3)
_DISPLAY_128x128: tuple[tuple, ...] =

Undocumented

_DISPLAY_135x240: tuple[tuple, ...] =

Undocumented

_DISPLAY_240x240: tuple[tuple, ...] =

Undocumented

_DISPLAY_240x320: tuple[tuple, ...] =

Undocumented