summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2019-01-17 18:19:07 -0800
committerScott Shawcroft <scott@tannewt.org>2019-01-17 18:19:07 -0800
commit6404aaf411d7fe5fd96f3a8cbf7a1cb7580a09e7 (patch)
treec4862f29c962e724a0df35c01ed04256df03b22a /main.c
parent760bd8d8a4f0aa0ed8651e89596fb2e6effbc14f (diff)
Fix up nrf and using board.SPI in FourWire
Diffstat (limited to 'main.c')
-rwxr-xr-xmain.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.c b/main.c
index 02c832e67..e137f7d47 100755
--- a/main.c
+++ b/main.c
@@ -27,7 +27,6 @@
#include <stdint.h>
#include <string.h>
-#include "shared-module/displayio/__init__.h"
#include "extmod/vfs.h"
#include "extmod/vfs_fat.h"
@@ -62,6 +61,10 @@
#include "shared-module/network/__init__.h"
#endif
+#ifdef CIRCUITPY_DISPLAYIO
+#include "shared-module/displayio/__init__.h"
+#endif
+
void do_str(const char *src, mp_parse_input_kind_t input_kind) {
mp_lexer_t *lex = mp_lexer_new_from_str_len(MP_QSTR__lt_stdin_gt_, src, strlen(src), 0);
if (lex == NULL) {
@@ -200,8 +203,10 @@ bool run_code_py(safe_mode_t safe_mode) {
serial_write_compressed(translate("WARNING: Your code filename has two extensions\n"));
}
}
+ #ifdef CIRCUITPY_DISPLAYIO
// Turn off the display before the heap disappears.
reset_displays();
+ #endif
stop_mp();
free_memory(heap);