diff options
| author | brentru <robots199@me.com> | 2019-08-08 14:56:28 -0400 |
|---|---|---|
| committer | brentru <robots199@me.com> | 2019-08-08 14:56:28 -0400 |
| commit | f87f48ab889e4a434822a1a80a00da1a02719174 (patch) | |
| tree | 64980ad6ec6efea1fe33f31b4141484ac90cc241 | |
| parent | 1d4700cb6c4f3a4e06dce3b4c3d174f7485bf107 (diff) | |
adding pyportal titano board definition
| -rw-r--r-- | ports/atmel-samd/boards/pyportal_titano/board.c | 54 |
1 files changed, 35 insertions, 19 deletions
diff --git a/ports/atmel-samd/boards/pyportal_titano/board.c b/ports/atmel-samd/boards/pyportal_titano/board.c index 07f8d8624..0ed1010a1 100644 --- a/ports/atmel-samd/boards/pyportal_titano/board.c +++ b/ports/atmel-samd/boards/pyportal_titano/board.c @@ -39,28 +39,44 @@ #define DELAY 0x80 uint8_t display_init_sequence[] = { - 0x01, 2, 0x80, 0x64, // swreset - 0xB9, 5, 0x83, 0xFF, 0x83, 0x57, 0xFF, - 0xB3, 5, 0x04, 0x80, 0x00, 0x06, 0x06, - 0xB6, 2, 0x01, 0x25, - 0xCC, 2, 0x01, 0x05, - 0xB1, 7, - 0x06, 0x00, 0x15, 0x1C, 0x1C, 0x83, 0xAA, - 0xC0, 7, - 0x06, 0x50, 0x50, 0x01, 0x3C, 0x1E, 0x08, - 0xB4, 8, - 0x07, 0x02, 0x40, 0x00, 0x2A, 0x2A, 0x0D, 0x78, + 0x01, DELAY, 100/5, // Soft reset, then delay 10 ms + 0xB9, 3, 0xFF, 0x83, 0x57, // Extension command set + 0xFF, DELAY, 500/5, + 0xB3, 4, 0x80, 0x00, 0x06, 0x06, // 0x80 enables SDO pin (0x00 disables) + 0xB6, 2, 0x01, 0x25, // -1.52V + 0xB0, 1, 0x68, // Normal mode 70Hz, Idle mode 55 Hz + 0xCC, 1, 0x05, + 0xB1, 6, + 0x00, // Not deep standby + 0x15, // BT + 0x1C, // VSPR + 0x1C, // VSNR + 0x83, // AP + 0xAA, // FS + 0xC0, 6, + 0x50, // OPON normal + 0x50, // OPON idle + 0x01, // STBA + 0x3C, // STBA + 0x1E, // STBA + 0x08, // GEN + 0xB4, 7, + 0x02, // NW 0x02 + 0x40, // RTN + 0x00, // DIV + 0x2A, // DUM + 0x2A, // DUM + 0x0D, // GDON + 0x78, // GDOFF 0xE0, 34, 0x02, 0x0A, 0x11, 0x1d, 0x23, 0x35, 0x41, 0x4b, 0x4b, 0x42, 0x3A, 0x27, 0x1B, 0x08, 0x09, 0x03, 0x02, 0x0A, 0x11, 0x1d, 0x23, 0x35, 0x41, 0x4b, 0x4b, 0x42, 0x3A, 0x27, 0x1B, 0x08, 0x09, 0x03, 0x00, 0x01, 0x3a, 1, 0x55, - 0x36, 1, 0xC0, - 0x35, 1, 0x00, - 0x44, 2, 0x00, 0x02, - 0x11, 0x80 + 150/5, // Exit Sleep, then delay 150 ms - 0x29, 0x80 + 50/5 + 0x36, 1, 0x00, + 0x11, DELAY, 150/5, // Exit Sleep, then delay 150 ms + 0x29, DELAY, 50/5 }; void board_init(void) { @@ -81,11 +97,11 @@ void board_init(void) { display->base.type = &displayio_display_type; common_hal_displayio_display_construct(display, bus, - 320, // Width - 480, // Height + 480, // Width + 320, // Height 0, // column start 0, // row start - 0, // rotation + 270, // rotation 16, // Color depth false, // grayscale false, // pixels_in_byte_share_row (unused for depths > 8) |
