summaryrefslogtreecommitdiff
path: root/supervisor
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-01-24 17:25:08 -0800
committerScott Shawcroft <scott@tannewt.org>2019-01-31 11:42:13 -0800
commit590e0291989c8df150b9b8aff960049903b56ac2 (patch)
tree65622a83faa0e1519a1ec75dbce5a20b846d3c69 /supervisor
parentfb0970ec6e2fee42d748718557c35fe84a4d0ce5 (diff)
Begin font parsing and packing for terminal
Diffstat (limited to 'supervisor')
-rw-r--r--supervisor/shared/display.h35
-rw-r--r--supervisor/supervisor.mk11
2 files changed, 45 insertions, 1 deletions
diff --git a/supervisor/shared/display.h b/supervisor/shared/display.h
new file mode 100644
index 000000000..5c420e590
--- /dev/null
+++ b/supervisor/shared/display.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_SUPERVISOR_SHARED_DISPLAY_H
+#define MICROPY_INCLUDED_SUPERVISOR_SHARED_DISPLAY_H
+
+#include "shared-bindings/displayio/Bitmap.h"
+// These are autogenerated resources.
+
+const displayio_bitmap_t terminal_font;
+
+#endif // MICROPY_INCLUDED_SUPERVISOR_SHARED_DISPLAY_H
diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk
index 0bbfd9141..174abd9d9 100644
--- a/supervisor/supervisor.mk
+++ b/supervisor/supervisor.mk
@@ -71,7 +71,7 @@ else
CFLAGS += -DUSB_AVAILABLE
endif
-SUPERVISOR_O = $(addprefix $(BUILD)/, $(SRC_SUPERVISOR:.c=.o))
+SUPERVISOR_O = $(addprefix $(BUILD)/, $(SRC_SUPERVISOR:.c=.o)) $(BUILD)/autogen_display_resources.o
$(BUILD)/supervisor/shared/translate.o: $(HEADER_BUILD)/qstrdefs.generated.h
@@ -90,3 +90,12 @@ autogen_usb_descriptor.intermediate: ../../tools/gen_usb_descriptor.py Makefile
--serial_number_length $(USB_SERIAL_NUMBER_LENGTH)\
--output_c_file $(BUILD)/autogen_usb_descriptor.c\
--output_h_file $(BUILD)/genhdr/autogen_usb_descriptor.h
+
+CIRCUITPY_DISPLAY_FONT = "fonts/test.bdf"
+
+$(BUILD)/autogen_display_resources.c: ../../tools/gen_display_resources.py $(HEADER_BUILD)/qstrdefs.generated.h Makefile | $(HEADER_BUILD)
+ $(STEPECHO) "GEN $@"
+ $(Q)install -d $(BUILD)/genhdr
+ $(Q)$(PYTHON3) ../../tools/gen_display_resources.py \
+ --font $(CIRCUITPY_DISPLAY_FONT) \
+ --output_c_file $(BUILD)/autogen_display_resources.c