8000 Fix built-in inits and terminal allocate · ihassin/circuitpython@03068a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 03068a9

Browse files
committed
Fix built-in inits and terminal allocate
1 parent 9a9d85f commit 03068a9

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

ports/atmel-samd/boards/hallowing_m0_express/board.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,12 @@ void board_init(void) {
8585
128, // Height
8686
2, // column start
8787
1, // row start
88+
0, // rotation
8889
16, // Color depth
8990
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
9091
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
9192
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
93+
0x37, // set vertical scroll command
9294
display_init_sequence,
9395
sizeof(display_init_sequence),
9496
&pin_PA00);

ports/atmel-samd/boards/pyportal/board.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ uint8_t display_init_sequence[] = {
4848
0xc1, 1, 0x10, // Power control SAP[2:0];BT[3:0]
4949
0xc5, 2, 0x3e, 0x28, // VCM control
5050
0xc7, 1, 0x86, // VCM control2
51-
0x36, 1, 0x38, // Memory Access Control
51+
0x36, 1, 0x08, // Memory Access Control
5252
0x37, 1, 0x00, // Vertical scroll zero
5353
0x3a, 1, 0x55, // COLMOD: Pixel Format Set
5454
0xb1, 2, 0x00, 0x18, // Frame Rate Control (In Normal Mode/Full Colors)
55-
0xb6, 3, 0x08, 0x82, 0x27, // Display Function Control
55+
0xb6, 3, 0x08, 0xa2, 0x27, // Display Function Control
5656
0xF2, 1, 0x00, // 3Gamma Function Disable
5757
0x26, 1, 0x01, // Gamma curve selected
5858
0xe0, 15, 0x0F, 0x31, 0x2B, 0x0C, 0x0E, 0x08, // Set Gamma
@@ -82,10 +82,12 @@ void board_init(void) {
8282
240, // Height
8383
0, // column start
8484
0, // row start
85+
90, // rotation
8586
16, // Color depth
8687
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
8788
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
8889
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
90+
0x37, // Set vertical scroll command
8991
display_init_sequence,
9092
sizeof(display_init_sequence),
9193
&pin_PB31);

supervisor/shared/display.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) {
5555
uint16_t total_tiles = width_in_tiles * height_in_tiles;
5656

5757
// First try to allocate outside the heap. This will fail when the VM is running.
58-
tilegrid_tiles = allocate_memory(total_tiles, false);
58+
tilegrid_tiles = allocate_memory(align32_size(total_tiles), false);
5959
uint8_t* tiles;
6060
if (tilegrid_tiles == NULL) {
6161
tiles = m_malloc(total_tiles, true);

0 commit comments

Comments
 (0)
0