From 6667f9691176629c1bc73968c725636bd98d36cf Mon Sep 17 00:00:00 2001 From: tychovrahe Date: Wed, 3 Jul 2024 21:14:47 +0200 Subject: [PATCH] fix(core): fix T2B1 display orientation south --- core/.changelog.d/3990.fixed | 1 + core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 core/.changelog.d/3990.fixed diff --git a/core/.changelog.d/3990.fixed b/core/.changelog.d/3990.fixed new file mode 100644 index 000000000..72e6165c3 --- /dev/null +++ b/core/.changelog.d/3990.fixed @@ -0,0 +1 @@ +[T2B1] Fix display orientation "south" diff --git a/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c b/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c index ad3ea481b..e841854e7 100644 --- a/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c +++ b/core/embed/trezorhal/stm32f4/displays/vg-2864ksweg01.c @@ -255,8 +255,8 @@ static inline uint8_t reverse_byte(uint8_t b) { static void rotate_oled_buffer(void) { for (int i = 0; i < OLED_BUFSIZE / 2; i++) { uint8_t b = OLED_BUFFER[i]; - OLED_BUFFER[i] = reverse_byte(OLED_BUFFER[OLED_BUFSIZE - i]); - OLED_BUFFER[OLED_BUFSIZE - i] = reverse_byte(b); + OLED_BUFFER[i] = reverse_byte(OLED_BUFFER[OLED_BUFSIZE - i - 1]); + OLED_BUFFER[OLED_BUFSIZE - i - 1] = reverse_byte(b); } }