summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-02-12 10:10:02 -0800
committerScott Shawcroft <scott@tannewt.org>2019-02-12 10:10:02 -0800
commitb4306314aab7434807ba43eee803fd04ef89b509 (patch)
tree4f0d08ca9143202e0514f2739d4edddfbffae827
parent5258bc4318bb46d75a8591d75034fd1b5bb0b574 (diff)
Move terminal font to terminalio from board.
-rw-r--r--ports/atmel-samd/boards/grandcentral_m4_express/pins.c3
-rw-r--r--shared-bindings/terminalio/__init__.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c
index 167d3ee58..26d0e71a0 100644
--- a/ports/atmel-samd/boards/grandcentral_m4_express/pins.c
+++ b/ports/atmel-samd/boards/grandcentral_m4_express/pins.c
@@ -1,7 +1,6 @@
#include "shared-bindings/board/__init__.h"
#include "supervisor/shared/board_busses.h"
-#include "supervisor/shared/display.h"
// This mapping only includes functional names because pins broken
// out on connectors are labeled with their MCU name available from
@@ -132,7 +131,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
-
- { MP_ROM_QSTR(MP_QSTR_TERMINAL_FONT), MP_ROM_PTR(&supervisor_terminal_font) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/shared-bindings/terminalio/__init__.c b/shared-bindings/terminalio/__init__.c
index 482cb78e6..a9fe20f30 100644
--- a/shared-bindings/terminalio/__init__.c
+++ b/shared-bindings/terminalio/__init__.c
@@ -31,6 +31,7 @@
#include "shared-bindings/terminalio/__init__.h"
#include "shared-bindings/terminalio/Terminal.h"
+#include "supervisor/shared/display.h"
#include "py/runtime.h"
@@ -40,7 +41,8 @@
//| .. module:: terminalio
//| :synopsis: Displays text in a TileGrid
//|
-//| The `terminalio` module contains classes to display a character stream on a display
+//| The `terminalio` module contains classes to display a character stream on a display. The built
+//| in font is available as ``terminalio.FONT``.
//|
//| Libraries
//|
@@ -53,6 +55,7 @@
STATIC const mp_rom_map_elem_t terminalio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_terminalio) },
{ MP_ROM_QSTR(MP_QSTR_Terminal), MP_OBJ_FROM_PTR(&terminalio_terminal_type) },
+ { MP_ROM_QSTR(MP_QSTR_FONT), MP_ROM_PTR(&supervisor_terminal_font) },
};