Skip to content

Commit 4e4461e

Browse files
committed
Fixing Copilot findings (4)
1 parent d20581b commit 4e4461e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

  • ports/espressif/boards/waveshare_esp32_s3_amoled_241

ports/espressif/boards/waveshare_esp32_s3_amoled_241/board.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
// RM690B0 AMOLED initialization sequence.
1515
// Format: command byte, length | 0x80 (if delay), data bytes..., [delay ms]
1616
// Based on vendor recommendations, tested with Waveshare 2.41" AMOLED panel.
17-
static const uint8_t display_init_sequence[] = {
17+
// Non-const to match upstream common_hal_busdisplay_busdisplay_construct signature.
18+
static uint8_t display_init_sequence[] = {
1819
// Page select and configuration
1920
0xFE, 0x01, 0x20, // Enter user command mode
2021
0x26, 0x01, 0x0A, // Bias setting
@@ -78,7 +79,7 @@ void board_init(void) {
7879
MIPI_COMMAND_SET_COLUMN_ADDRESS, // set_column_command
7980
MIPI_COMMAND_SET_PAGE_ADDRESS, // set_row_command
8081
MIPI_COMMAND_WRITE_MEMORY_START, // write_ram_command
81-
(uint8_t *)display_init_sequence,
82+
display_init_sequence,
8283
sizeof(display_init_sequence),
8384
NULL, // backlight_pin (AMOLED — no backlight GPIO)
8485
0x51, // brightness_command

0 commit comments

Comments
 (0)