Skip to content

Commit f87f48a

Browse files
author
brentru
committed
adding pyportal titano board definition
1 parent 1d4700c commit f87f48a

File tree

1 file changed

+35
-19
lines changed
  • ports/atmel-samd/boards/pyportal_titano

1 file changed

+35
-19
lines changed

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

+35-19
Original file line numberDiff line numberDiff line change
@@ -39,28 +39,44 @@
3939
#define DELAY 0x80
4040

4141
uint8_t display_init_sequence[] = {
42-
0x01, 2, 0x80, 0x64, // swreset
43-
0xB9, 5, 0x83, 0xFF, 0x83, 0x57, 0xFF,
44-
0xB3, 5, 0x04, 0x80, 0x00, 0x06, 0x06,
45-
0xB6, 2, 0x01, 0x25,
46-
0xCC, 2, 0x01, 0x05,
47-
0xB1, 7,
48-
0x06, 0x00, 0x15, 0x1C, 0x1C, 0x83, 0xAA,
49-
0xC0, 7,
50-
0x06, 0x50, 0x50, 0x01, 0x3C, 0x1E, 0x08,
51-
0xB4, 8,
52-
0x07, 0x02, 0x40, 0x00, 0x2A, 0x2A, 0x0D, 0x78,
42+
0x01, DELAY, 100/5, // Soft reset, then delay 10 ms
43+
0xB9, 3, 0xFF, 0x83, 0x57, // Extension command set
44+
0xFF, DELAY, 500/5,
45+
0xB3, 4, 0x80, 0x00, 0x06, 0x06, // 0x80 enables SDO pin (0x00 disables)
46+
0xB6, 2, 0x01, 0x25, // -1.52V
47+
0xB0, 1, 0x68, // Normal mode 70Hz, Idle mode 55 Hz
48+
0xCC, 1, 0x05,
49+
0xB1, 6,
50+
0x00, // Not deep standby
51+
0x15, // BT
52+
0x1C, // VSPR
53+
0x1C, // VSNR
54+
0x83, // AP
55+
0xAA, // FS
56+
0xC0, 6,
57+
0x50, // OPON normal
58+
0x50, // OPON idle
59+
0x01, // STBA
60+
0x3C, // STBA
61+
0x1E, // STBA
62+
0x08, // GEN
63+
0xB4, 7,
64+
0x02, // NW 0x02
65+
0x40, // RTN
66+
0x00, // DIV
67+
0x2A, // DUM
68+
0x2A, // DUM
69+
0x0D, // GDON
70+
0x78, // GDOFF
5371
0xE0, 34,
5472
0x02, 0x0A, 0x11, 0x1d, 0x23, 0x35, 0x41, 0x4b, 0x4b,
5573
0x42, 0x3A, 0x27, 0x1B, 0x08, 0x09, 0x03, 0x02, 0x0A,
5674
0x11, 0x1d, 0x23, 0x35, 0x41, 0x4b, 0x4b, 0x42, 0x3A,
5775
0x27, 0x1B, 0x08, 0x09, 0x03, 0x00, 0x01,
5876
0x3a, 1, 0x55,
59-
0x36, 1, 0xC0,
60-
0x35, 1, 0x00,
61-
0x44, 2, 0x00, 0x02,
62-
0x11, 0x80 + 150/5, // Exit Sleep, then delay 150 ms
63-
0x29, 0x80 + 50/5
77+
0x36, 1, 0x00,
78+
0x11, DELAY, 150/5, // Exit Sleep, then delay 150 ms
79+
0x29, DELAY, 50/5
6480
};
6581

6682
void board_init(void) {
@@ -81,11 +97,11 @@ void board_init(void) {
8197
display->base.type = &displayio_display_type;
8298
common_hal_displayio_display_construct(display,
8399
bus,
84-
320, // Width
85-
480, // Height
100+
480, // Width
101+
320, // Height
86102
0, // column start
87103
0, // row start
88-
0, // rotation
104+
270, // rotation
89105
16, // Color depth
90106
false, // grayscale
91107
false, // pixels_in_byte_share_row (unused for depths > 8)

0 commit comments

Comments
 (0)