45
45
#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h"
46
46
#endif
47
47
48
+ #if CIRCUITPY_REPL_LOGO
48
49
extern uint32_t blinka_bitmap_data [];
49
50
extern displayio_bitmap_t blinka_bitmap ;
51
+ #endif
50
52
extern displayio_group_t circuitpython_splash ;
51
53
52
54
#if CIRCUITPY_TERMINALIO
@@ -62,8 +64,13 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) {
62
64
displayio_tilegrid_t * grid = & supervisor_terminal_text_grid ;
63
65
bool tall = height_px > width_px ;
64
66
bool reset_tiles = false;
67
+ #if CIRCUITPY_REPL_LOGO
65
68
uint16_t terminal_width_px = tall ? width_px : width_px - blinka_bitmap .width ;
66
69
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
67
74
uint16_t width_in_tiles = terminal_width_px / grid -> tile_width ;
68
75
// determine scale based on h
69
76
if (width_in_tiles < 80 ) {
@@ -106,8 +113,13 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) {
106
113
if (reset_tiles ) {
107
114
uint8_t * tiles = (uint8_t * )tilegrid_tiles -> ptr ;
108
115
116
+ #if CIRCUITPY_REPL_LOGO
109
117
grid -> y = tall ? blinka_bitmap .height : 0 ;
110
118
grid -> x = tall ? 0 : blinka_bitmap .width ;
119
+ #else
120
+ grid -> y = 0 ;
121
+ grid -> x = 0 ;
122
+ #endif
111
123
grid -> top_left_y = 0 ;
112
124
if (remaining_pixels > 0 ) {
113
125
grid -> y -= (grid -> tile_height - remaining_pixels );
@@ -167,6 +179,7 @@ void supervisor_display_move_memory(void) {
167
179
#endif
168
180
}
169
181
182
+ #if CIRCUITPY_REPL_LOGO
170
183
uint32_t blinka_bitmap_data [32 ] = {
171
184
0x00000011 , 0x11000000 ,
172
185
0x00000111 , 0x53100000 ,
@@ -281,8 +294,10 @@ displayio_tilegrid_t blinka_sprite = {
281
294
.inline_tiles = true,
282
295
.in_group = true
283
296
};
297
+ #endif
284
298
285
299
#if CIRCUITPY_TERMINALIO
300
+ #if CIRCUITPY_REPL_LOGO
286
301
mp_obj_t members [] = { & blinka_sprite , & supervisor_terminal_text_grid , };
287
302
mp_obj_list_t splash_children = {
288
303
.base = {.type = & mp_type_list },
@@ -291,13 +306,32 @@ mp_obj_list_t splash_children = {
291
306
.items = members ,
292
307
};
293
308
#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
294
319
mp_obj_t members [] = { & blinka_sprite };
295
320
mp_obj_list_t splash_children = {
296
321
.base = {.type = & mp_type_list },
297
322
.alloc = 1 ,
298
323
.len = 1 ,
299
324
.items = members ,
300
325
};
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
301
335
#endif
302
336
303
337
displayio_group_t circuitpython_splash = {
0 commit comments