File tree Expand file tree Collapse file tree 3 files changed +27
-22
lines changed
PiCowbell_HSTX_DVI_Examples Expand file tree Collapse file tree 3 files changed +27
-22
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2025 Tim Cocks for Adafruit Industries
1
2
# SPDX-FileCopyrightText: 2023 Liz Clark for Adafruit Industries
2
3
# SPDX-FileCopyrightText: Adapted from Phil B.'s 16bit_hello Arduino Code
3
4
#
12
13
import terminalio
13
14
import supervisor
14
15
import simpleio
16
+ from setup_display import setup_display
15
17
from adafruit_bitmap_font import bitmap_font
16
18
from adafruit_display_text import label , wrap_text_to_lines
17
19
from adafruit_display_shapes .rect import Rect
20
22
from adafruit_display_shapes .triangle import Triangle
21
23
from adafruit_display_shapes .line import Line
22
24
23
- # see boot.py for display initialization
25
+ setup_display ()
24
26
display = supervisor .runtime .display
25
27
26
28
bitmap = displayio .Bitmap (display .width , display .height , 3 )
Original file line number Diff line number Diff line change
1
+ # SPDX-FileCopyrightText: 2025 Tim Cocks for Adafruit Industries
2
+ #
3
+ # SPDX-License-Identifier: MIT
4
+ import supervisor
5
+ import displayio
6
+ import picodvi
7
+ import framebufferio
8
+ import board
9
+
10
+ def setup_display ():
11
+ # Skip if the display is already initialized
12
+ if supervisor .runtime .display is None :
13
+ displayio .release_displays ()
14
+ fb = picodvi .Framebuffer (320 , 240 ,
15
+ clk_dp = board .GP14 , clk_dn = board .GP15 ,
16
+ red_dp = board .GP12 , red_dn = board .GP13 ,
17
+ green_dp = board .GP18 , green_dn = board .GP19 ,
18
+ blue_dp = board .GP16 , blue_dn = board .GP17 ,
19
+ color_depth = 8 )
20
+ display = framebufferio .FramebufferDisplay (fb )
21
+
22
+ # set the display onto supervisor.runtime,
23
+ # so it will be available to code.py
24
+ supervisor .runtime .display = display
You can’t perform that action at this time.
0 commit comments