Skip to content

Commit 167108a

Browse files
committed
Fix builds with displayio but not terminalio
1 parent 5e01500 commit 167108a

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

supervisor/shared/display.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929

3030
#include <stdint.h>
3131

32+
#include "shared-bindings/displayio/TileGrid.h"
33+
3234
#if CIRCUITPY_TERMINALIO
3335

3436
#include "shared-bindings/displayio/Bitmap.h"
35-
#include "shared-bindings/displayio/TileGrid.h"
3637
#include "shared-bindings/fontio/BuiltinFont.h"
3738
#include "shared-bindings/terminalio/Terminal.h"
3839

@@ -42,14 +43,15 @@
4243
extern const fontio_builtinfont_t supervisor_terminal_font;
4344

4445
// These will change so they must live in RAM.
45-
extern displayio_tilegrid_t supervisor_blinka_sprite;
4646
extern displayio_bitmap_t supervisor_terminal_font_bitmap;
4747
extern displayio_tilegrid_t supervisor_terminal_scroll_area_text_grid;
4848
extern displayio_tilegrid_t supervisor_terminal_title_bar_text_grid;
4949
extern terminalio_terminal_obj_t supervisor_terminal;
50-
5150
#endif
5251

52+
// Always shown.
53+
extern displayio_tilegrid_t supervisor_blinka_sprite;
54+
5355
void supervisor_start_terminal(uint16_t width_px, uint16_t height_px);
5456
void supervisor_stop_terminal(void);
5557

supervisor/supervisor.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,8 @@ ifeq ($(CIRCUITPY_DISPLAYIO), 1)
184184
SRC_SUPERVISOR += \
185185
supervisor/shared/display.c
186186

187-
ifeq ($(CIRCUITPY_TERMINALIO), 1)
188-
SUPERVISOR_O += $(BUILD)/autogen_display_resources-$(TRANSLATION).o
189-
endif
187+
# Include the display resources because it includes the Blinka logo as well.
188+
SUPERVISOR_O += $(BUILD)/autogen_display_resources-$(TRANSLATION).o
190189
endif
191190

192191
# Preserve double quotes in these values by single-quoting them.

tools/gen_display_resources.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ def _load_row(self, y, row):
104104
c_file.write(
105105
"""\
106106
107+
#include "shared-bindings/displayio/Bitmap.h"
107108
#include "shared-bindings/displayio/Palette.h"
108109
#include "supervisor/shared/display.h"
109110
@@ -266,6 +267,7 @@ def _load_row(self, y, row):
266267

267268
c_file.write(
268269
"""\
270+
#if CIRCUITPY_TERMINALIO
269271
_displayio_color_t terminal_colors[2] = {
270272
{
271273
.rgb888 = 0x000000,
@@ -414,5 +416,7 @@ def _load_row(self, y, row):
414416
.scroll_area = NULL,
415417
.title_bar = NULL
416418
};
419+
420+
#endif
417421
"""
418422
)

0 commit comments

Comments
 (0)