Fix builds with displayio but not terminalio
This commit is contained in:
parent
5e015001c0
commit
167108a91f
|
@ -29,10 +29,11 @@
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#include "shared-bindings/displayio/TileGrid.h"
|
||||||
|
|
||||||
#if CIRCUITPY_TERMINALIO
|
#if CIRCUITPY_TERMINALIO
|
||||||
|
|
||||||
#include "shared-bindings/displayio/Bitmap.h"
|
#include "shared-bindings/displayio/Bitmap.h"
|
||||||
#include "shared-bindings/displayio/TileGrid.h"
|
|
||||||
#include "shared-bindings/fontio/BuiltinFont.h"
|
#include "shared-bindings/fontio/BuiltinFont.h"
|
||||||
#include "shared-bindings/terminalio/Terminal.h"
|
#include "shared-bindings/terminalio/Terminal.h"
|
||||||
|
|
||||||
|
@ -42,14 +43,15 @@
|
||||||
extern const fontio_builtinfont_t supervisor_terminal_font;
|
extern const fontio_builtinfont_t supervisor_terminal_font;
|
||||||
|
|
||||||
// These will change so they must live in RAM.
|
// These will change so they must live in RAM.
|
||||||
extern displayio_tilegrid_t supervisor_blinka_sprite;
|
|
||||||
extern displayio_bitmap_t supervisor_terminal_font_bitmap;
|
extern displayio_bitmap_t supervisor_terminal_font_bitmap;
|
||||||
extern displayio_tilegrid_t supervisor_terminal_scroll_area_text_grid;
|
extern displayio_tilegrid_t supervisor_terminal_scroll_area_text_grid;
|
||||||
extern displayio_tilegrid_t supervisor_terminal_title_bar_text_grid;
|
extern displayio_tilegrid_t supervisor_terminal_title_bar_text_grid;
|
||||||
extern terminalio_terminal_obj_t supervisor_terminal;
|
extern terminalio_terminal_obj_t supervisor_terminal;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Always shown.
|
||||||
|
extern displayio_tilegrid_t supervisor_blinka_sprite;
|
||||||
|
|
||||||
void supervisor_start_terminal(uint16_t width_px, uint16_t height_px);
|
void supervisor_start_terminal(uint16_t width_px, uint16_t height_px);
|
||||||
void supervisor_stop_terminal(void);
|
void supervisor_stop_terminal(void);
|
||||||
|
|
||||||
|
|
|
@ -184,9 +184,8 @@ ifeq ($(CIRCUITPY_DISPLAYIO), 1)
|
||||||
SRC_SUPERVISOR += \
|
SRC_SUPERVISOR += \
|
||||||
supervisor/shared/display.c
|
supervisor/shared/display.c
|
||||||
|
|
||||||
ifeq ($(CIRCUITPY_TERMINALIO), 1)
|
# Include the display resources because it includes the Blinka logo as well.
|
||||||
SUPERVISOR_O += $(BUILD)/autogen_display_resources-$(TRANSLATION).o
|
SUPERVISOR_O += $(BUILD)/autogen_display_resources-$(TRANSLATION).o
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Preserve double quotes in these values by single-quoting them.
|
# Preserve double quotes in these values by single-quoting them.
|
||||||
|
|
|
@ -104,6 +104,7 @@ c_file = args.output_c_file
|
||||||
c_file.write(
|
c_file.write(
|
||||||
"""\
|
"""\
|
||||||
|
|
||||||
|
#include "shared-bindings/displayio/Bitmap.h"
|
||||||
#include "shared-bindings/displayio/Palette.h"
|
#include "shared-bindings/displayio/Palette.h"
|
||||||
#include "supervisor/shared/display.h"
|
#include "supervisor/shared/display.h"
|
||||||
|
|
||||||
|
@ -266,6 +267,7 @@ displayio_tilegrid_t supervisor_blinka_sprite = {{
|
||||||
|
|
||||||
c_file.write(
|
c_file.write(
|
||||||
"""\
|
"""\
|
||||||
|
#if CIRCUITPY_TERMINALIO
|
||||||
_displayio_color_t terminal_colors[2] = {
|
_displayio_color_t terminal_colors[2] = {
|
||||||
{
|
{
|
||||||
.rgb888 = 0x000000,
|
.rgb888 = 0x000000,
|
||||||
|
@ -414,5 +416,7 @@ terminalio_terminal_obj_t supervisor_terminal = {
|
||||||
.scroll_area = NULL,
|
.scroll_area = NULL,
|
||||||
.title_bar = NULL
|
.title_bar = NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue