russhughes/st7789_mpy

st7789.ST7789.color_order not present in precompiled RP2 build

QuantumFluxCapacitor opened this issue · 3 comments

Assuming it should be present in st7789.ST7789, color_order is not recognized by the interpreter, nor is it listed in a dir command. I am trying to get the color order right for a 128x128 ST7735 display and thus stumbled upon this.

I’ll take a look at it.

color_order is an optional named parameter to the st7789.ST7789 method. I have verified that is working with the current RP2 firmware.uf2 file.

"""Waveshare Pico LCD 2 inch display"""

from machine import Pin, SPI
import st7789

TFA = 0	 # top free area when scrolling
BFA = 0	 # bottom free area when scrolling

def config(rotation=0, buffer_size=0, options=0):
    return st7789.ST7789(
        SPI(1, baudrate=62500000, sck=Pin(10), mosi=Pin(11)),
        240,
        320,
        reset=Pin(12, Pin.OUT),
        cs=Pin(9, Pin.OUT),
        dc=Pin(8, Pin.OUT),
        backlight=Pin(13, Pin.OUT),
        rotation=rotation,
        options=options,
        color_order=st7789.RGB,
        buffer_size=buffer_size)

Thank you for the clarification. Just tested and it works. My apologies for the inconvenience.