Skip to content

Commit

Permalink
Fix orientation and color on ET5
Browse files Browse the repository at this point in the history
- Pending to know why needs to be initialized on BGR mode
  • Loading branch information
davidtgbe committed Oct 9, 2020
1 parent f705bf2 commit af79624
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Target/ARMCM4_STM32F4_ET4/Boot/lib/tft/st7796s.h
Expand Up @@ -36,13 +36,13 @@
#define ST7796S_MADCTL_RGB 0x00
#define ST7796S_MADCTL_MH 0x04 // Horizontal Refresh Order

#define ST7796S_ORIENTATION_UP ST7796S_MADCTL_MX | ST7796S_MADCTL_MY // 230x480 ; Cable on the upper side
#define ST7796S_ORIENTATION_RIGHT ST7796S_MADCTL_MX | ST7796S_MADCTL_MV // 480x230 ; Cable on the right side
#define ST7796S_ORIENTATION_LEFT ST7796S_MADCTL_MY | ST7796S_MADCTL_MV // 480x230 ; Cable on the left side
#define ST7796S_ORIENTATION_DOWN 0 // 230x480 ; Cable on the lower side
#define ST7796S_ORIENTATION_UP ST7796S_MADCTL_MX | ST7796S_MADCTL_MY // 320x480 ; Cable on the upper side
#define ST7796S_ORIENTATION_RIGHT ST7796S_MADCTL_MX | ST7796S_MADCTL_MV // 480x320 ; Cable on the right side
#define ST7796S_ORIENTATION_LEFT ST7796S_MADCTL_MY | ST7796S_MADCTL_MV // 480x320 ; Cable on the left side
#define ST7796S_ORIENTATION_DOWN 0 // 320x480 ; Cable on the lower side

#define ST7796S_ORIENTATION ST7789V_ORIENTATION_LEFT
#define ST7796S_MADCTL_DATA (ST7796S_ORIENTATION | ST7796S_MADCTL_RGB)
#define ST7796S_ORIENTATION ST7796S_MADCTL_MV
#define ST7796S_MADCTL_DATA (ST7796S_ORIENTATION | ST7796S_MADCTL_BGR)

#define ST7796S_NOP 0x00 // No Operation
#define ST7796S_SWRESET 0x01 // Software reset
Expand Down

0 comments on commit af79624

Please sign in to comment.