Skip to content

Commit

Permalink
More updates to the CI
Browse files Browse the repository at this point in the history
  • Loading branch information
kdschlosser committed Jan 14, 2025
1 parent 5a10488 commit 1448858
Show file tree
Hide file tree
Showing 38 changed files with 91 additions and 107 deletions.
1 change: 0 additions & 1 deletion api_drivers/common_api_drivers/display/gc9a01/gc9a01.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser

import time
from micropython import const # NOQA

import lvgl as lv # NOQA
Expand Down
2 changes: 0 additions & 2 deletions api_drivers/common_api_drivers/display/hx8357d/hx8357d.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@

class HX8357D(display_driver_framework.DisplayDriver):
pass


1 change: 0 additions & 1 deletion api_drivers/common_api_drivers/display/hx8369/hx8369.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import display_driver_framework
from micropython import const # NOQA

import lvgl as lv
import time

TYPE_A = 1
Expand Down
2 changes: 1 addition & 1 deletion api_drivers/common_api_drivers/display/ili9225/ili9225.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _on_size_change(self, _):

if self._initilized:
if rotation <= 1:
value = int(not rotation)
rotation = int(not rotation)

self._param_buf[0] = rotation
self._param_buf[1] = 0x1C
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def init(self):
param_buf[0] = pixel_format
self.set_params(_COLMOD, param_mv[:1])

param_buf[:2] = bytearray([0x00, 0x13]) # 0x18 ??
param_buf[:2] = bytearray([0x00, 0x13]) # 0x18 ??
self.set_params(_FRMCTR1, param_mv[:2])

param_buf[:3] = bytearray([0x08, 0x82, 0x27])
Expand Down
4 changes: 0 additions & 4 deletions api_drivers/common_api_drivers/display/ili9341/ili9341.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser

import sys
import display_driver_framework


Expand All @@ -14,6 +13,3 @@

class ILI9341(display_driver_framework.DisplayDriver):
pass



Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,3 @@ def init(self):
time.sleep_ms(120) # NOQA
self.set_params(_DISPON)
time.sleep_ms(25) # NOQA

display_driver_framework.DisplayDriver.init(self)
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
_SWRESET = const(0x01)


def init(self1):
def init(self):
param_buf = bytearray(12)
param_mv = memoryview(param_buf)

Expand Down Expand Up @@ -60,7 +60,6 @@ def init(self1):
param_buf[0] = 0x03
self.set_params(_VCOMCTL1, param_mv[:1])


param_buf[0] = 0x00
param_buf[1] = 0x14
param_buf[2] = 0x33
Expand All @@ -75,7 +74,6 @@ def init(self1):
param_buf[11] = 0x00
self.set_params(_GAMMASET, param_mv[:12])


param_buf[0] = 0x00
self.set_params(_IFMODE, param_mv[:1])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ def init(self):
param_buf[11] = 0x0C
self.set_params(_GAMMASET, param_mv[:12])


param_buf[0] = 0x00
self.set_params(_IFMODE, param_mv[:1])

param_buf[0] = 0xA0
self.set_params(0xE4, param_mv[:1])


param_buf[0] = 0x01
self.set_params(0xF0, param_mv[:1])

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ def init(self):
param_buf[11] = 0x00
self.set_params(_GAMMASET, param_mv[:12])


param_buf[0] = 0x00
self.set_params(_IFMODE, param_mv[:1])

Expand Down Expand Up @@ -146,5 +145,3 @@ def init(self):
time.sleep_ms(120) # NOQA
self.set_params(_DISPON)
time.sleep_ms(25) # NOQA

display_driver_framework.DisplayDriver.init(self)
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,3 @@ def init(self):
time.sleep_ms(120) # NOQA
self.set_params(_DISPON)
time.sleep_ms(25) # NOQA

display_driver_framework.DisplayDriver.init(self)
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def init(self):
param_buf[1] = 0x11
self.set_params(_RDNVSTAT, param_mv[:2])


param_buf[0] = 0x00
param_buf[1] = 0x3B
param_buf[2] = 0x00
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser
# Copyright (c) 2024 - 2025 Kevin G. Schlosser
2 changes: 1 addition & 1 deletion api_drivers/common_api_drivers/display/lt768x/lt768x.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser

import ra8876 as _ra8876
import ra8876 as _ra8876 # NOQA


STATE_HIGH = _ra8876.STATE_HIGH
Expand Down
2 changes: 1 addition & 1 deletion api_drivers/common_api_drivers/display/nv3041a/nv3041a.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def __init__(

break
except MemoryError:
frame_buffer1 = data_bus.free_framebuffer(frame_buffer1)
frame_buffer1 = data_bus.free_framebuffer(frame_buffer1) # NOQA

if frame_buffer1 is None:
raise MemoryError(
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser
# Copyright (c) 2024 - 2025 Kevin G. Schlosser
26 changes: 12 additions & 14 deletions api_drivers/common_api_drivers/display/ra8876/ra8876.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,15 +207,13 @@ def __init__(
offset_x=offset_x,
offset_y=offset_y,
color_byte_order=color_byte_order,
color_space=lv.COLOR_FORMAT.RGB565,
color_space=lv.COLOR_FORMAT.RGB565, # NOQA
rgb565_byte_swap=rgb565_byte_swap
)

def invert_colors(self, value):
def set_invert_colors(self, value):
raise NotImplementedError

invert_colors = property(None, invert_colors)

@property
def orientation(self):
raise NotImplementedError
Expand All @@ -226,21 +224,21 @@ def orientation(self, value):

def _wait(self):
if self._wait_pin is not None:
start_time = time.ticks_ms()
start_time = time.ticks_ms() # NOQA

while (
self._wait_pin.value() != self._wait_state and
time.ticks_diff(time.ticks_ms(), start_time) < self.WAIT_TIMEOUT
time.ticks_diff(time.ticks_ms(), start_time) < self.WAIT_TIMEOUT # NOQA
):
time.sleep_ms(1)
time.sleep_ms(1) # NOQA

def reset(self):
if self._reset_pin is None:
self.set_params(_SRR)
time.sleep_ms(20)
time.sleep_ms(20) # NOQA
else:
display_driver_framework.DisplayDriver.reset(self)
time.sleep_ms(50)
time.sleep_ms(50) # NOQA

def init( # NOQA
self,
Expand All @@ -256,9 +254,9 @@ def init( # NOQA
vstr=12, # vertical start position
vpwr=10, # VSYNC pulse width
):
time.sleep_ms(100)
time.sleep_ms(100) # NOQA
self.reset()
time.sleep_ms(100)
time.sleep_ms(100) # NOQA
self._wait()

buf = self._param_buf
Expand Down Expand Up @@ -350,10 +348,10 @@ def init( # NOQA
# reconfigure PLL generator
buf[0] = 0x00
self.set_params(_CCR, mv)
time.sleep_us(10)
time.sleep_us(10) # NOQA
buf[0] = 0x80
self.set_params(_CCR, mv)
time.sleep_us(10)
time.sleep_us(10) # NOQA

# configure SDRAM
if dram_ic == IS42SM16160D:
Expand Down Expand Up @@ -402,7 +400,7 @@ def init( # NOQA
self.set_params(_SDRCR, mv)

self._wait()
time.sleep_ms(10)
time.sleep_ms(10) # NOQA

# set chip config register
lane_count = self._data_bus.get_lane_count()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser

import rgb_display_framework
import rgb_display_framework # NOQA
import lvgl as lv


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (c) 2024 - 2025 Kevin G. Schlosser

from micropython import const
from micropython import const # NOQA

_SET_CONTRAST = const(0x81)
_SET_ENTIRE_ON = const(0xA4)
Expand Down
4 changes: 2 additions & 2 deletions api_drivers/common_api_drivers/display/ssd1306/ssd1306.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def __init__(

break
except MemoryError:
frame_buffer1 = data_bus.free_framebuffer(frame_buffer1)
frame_buffer1 = data_bus.free_framebuffer(frame_buffer1) # NOQA

if frame_buffer1 is None:
raise MemoryError(
Expand Down Expand Up @@ -119,7 +119,7 @@ def get_power(self):
return self._power

def set_power(self, value):
self._power = bool(value)
self._power = bool(value) # NOQA

if self._power:
self.set_params(_DISP_ON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def init(self):
param_buf[0] = 0x01
self.set_params(0xE0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
param_buf[0] = 0x03
self.set_params(0xE0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
self.set_params(0x01)

time.sleep_ms(100)
time.sleep_ms(100) # NOQA
param_buf[0] = 0x01
param_buf[1] = 0x1F
param_buf[2] = 0xFF
Expand Down Expand Up @@ -64,13 +64,13 @@ def init(self):
param_buf[1] = 0x01
self.set_params(0xB8, param_mv[:2])

param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER
param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER
self.set_params(0x36, param_mv[:1])

param_buf[0] = 0x00
self.set_params(0xF0, param_mv[:1])

time.sleep_ms(1)
time.sleep_ms(1) # NOQA
param_buf[0] = 0x0f
param_buf[1] = 0x01
self.set_params(0xB8, param_mv[:2])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def init(self):
param_buf[0] = 0x01
self.set_params(0xE0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
param_buf[0] = 0x03
self.set_params(0xE0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
self.set_params(0x01)

time.sleep_ms(100)
time.sleep_ms(100) # NOQA
param_buf[0] = 0x03
param_buf[1] = 0xFF
param_buf[2] = 0xFF
Expand Down Expand Up @@ -64,13 +64,13 @@ def init(self):
param_buf[1] = 0x01
self.set_params(0xB8, param_mv[:2])

param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER
param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER
self.set_params(0x36, param_mv[:1])

param_buf[0] = 0x00
self.set_params(0xF0, param_mv[:1])

time.sleep_ms(1)
time.sleep_ms(1) # NOQA
param_buf[0] = 0x0f
param_buf[1] = 0x01
self.set_params(0xB8, param_mv[:2])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ def init(self):
param_buf[0] = 0x01
self.set_params(0xE0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
param_buf[0] = 0x03
self.set_params(0xE0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
self.set_params(0x01)

time.sleep_ms(100)
time.sleep_ms(100) # NOQA
param_buf[0] = 0x04
param_buf[1] = 0x93
param_buf[2] = 0xE0
Expand Down Expand Up @@ -64,13 +64,13 @@ def init(self):
param_buf[1] = 0x01
self.set_params(0xB8, param_mv[:2])

param_buf[0] = 0x21 | TFT_MAD_COLOR_ORDER
param_buf[0] = 0x21 # | TFT_MAD_COLOR_ORDER
self.set_params(0x36, param_mv[:1])

param_buf[0] = 0x00
self.set_params(0xF0, param_mv[:1])

time.sleep_ms(10)
time.sleep_ms(10) # NOQA
param_buf[0] = 0
param_buf[1] = 0
param_buf[2] = (479 & 0xFF00) >> 8
Expand Down
Loading

0 comments on commit 1448858

Please sign in to comment.