4545#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h"
4646#endif
4747
48+ #if CIRCUITPY_REPL_LOGO
4849extern uint32_t blinka_bitmap_data [];
4950extern displayio_bitmap_t blinka_bitmap ;
51+ #endif
5052extern displayio_group_t circuitpython_splash ;
5153
5254#if CIRCUITPY_TERMINALIO
@@ -62,8 +64,13 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) {
6264 displayio_tilegrid_t * grid = & supervisor_terminal_text_grid ;
6365 bool tall = height_px > width_px ;
6466 bool reset_tiles = false;
67+ #if CIRCUITPY_REPL_LOGO
6568 uint16_t terminal_width_px = tall ? width_px : width_px - blinka_bitmap .width ;
6669 uint16_t terminal_height_px = tall ? height_px - blinka_bitmap .height : height_px ;
70+ #else
71+ uint16_t terminal_width_px = width_px ;
72+ uint16_t terminal_height_px = height_px ;
73+ #endif
6774 uint16_t width_in_tiles = terminal_width_px / grid -> tile_width ;
6875 // determine scale based on h
6976 if (width_in_tiles < 80 ) {
@@ -106,8 +113,13 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) {
106113 if (reset_tiles ) {
107114 uint8_t * tiles = (uint8_t * )tilegrid_tiles -> ptr ;
108115
116+ #if CIRCUITPY_REPL_LOGO
109117 grid -> y = tall ? blinka_bitmap .height : 0 ;
110118 grid -> x = tall ? 0 : blinka_bitmap .width ;
119+ #else
120+ grid -> y = 0 ;
121+ grid -> x = 0 ;
122+ #endif
111123 grid -> top_left_y = 0 ;
112124 if (remaining_pixels > 0 ) {
113125 grid -> y -= (grid -> tile_height - remaining_pixels );
@@ -167,6 +179,7 @@ void supervisor_display_move_memory(void) {
167179 #endif
168180}
169181
182+ #if CIRCUITPY_REPL_LOGO
170183uint32_t blinka_bitmap_data [32 ] = {
171184 0x00000011 , 0x11000000 ,
172185 0x00000111 , 0x53100000 ,
@@ -281,8 +294,10 @@ displayio_tilegrid_t blinka_sprite = {
281294 .inline_tiles = true,
282295 .in_group = true
283296};
297+ #endif
284298
285299#if CIRCUITPY_TERMINALIO
300+ #if CIRCUITPY_REPL_LOGO
286301mp_obj_t members [] = { & blinka_sprite , & supervisor_terminal_text_grid , };
287302mp_obj_list_t splash_children = {
288303 .base = {.type = & mp_type_list },
@@ -291,13 +306,32 @@ mp_obj_list_t splash_children = {
291306 .items = members ,
292307};
293308#else
309+ mp_obj_t members [] = { & supervisor_terminal_text_grid , };
310+ mp_obj_list_t splash_children = {
311+ .base = {.type = & mp_type_list },
312+ .alloc = 1 ,
313+ .len = 1 ,
314+ .items = members ,
315+ };
316+ #endif
317+ #else
318+ #if CIRCUITPY_REPL_LOGO
294319mp_obj_t members [] = { & blinka_sprite };
295320mp_obj_list_t splash_children = {
296321 .base = {.type = & mp_type_list },
297322 .alloc = 1 ,
298323 .len = 1 ,
299324 .items = members ,
300325};
326+ #else
327+ mp_obj_t members [] = {};
328+ mp_obj_list_t splash_children = {
329+ .base = {.type = & mp_type_list },
330+ .alloc = 0 ,
331+ .len = 0 ,
332+ .items = members ,
333+ };
334+ #endif
301335#endif
302336
303337displayio_group_t circuitpython_splash = {
0 commit comments