Skip to content

Commit

Permalink
more tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Jun 6, 2021
1 parent 5e3b23b commit c1ab587
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 14 deletions.
33 changes: 25 additions & 8 deletions Marlin/src/lcd/tft_io/tft_io.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,31 @@

#include "tft_io.h"
#include "tft_ids.h"
#include "st7735.h"
#include "st7789v.h"
#include "st7796s.h"
#include "r65105.h"
#include "ili9328.h"
#include "ili9341.h"
#include "ili9488.h"
#include "ssd1963.h"

#if TFT_DRIVER == ST7735 || TFT_DRIVER == AUTO
#include "st7735.h"
#endif
#if TFT_DRIVER == ST7789 || TFT_DRIVER == AUTO
#include "st7789v.h"
#endif
#if TFT_DRIVER == ST7796 || TFT_DRIVER == AUTO
#include "st7796s.h"
#endif
#if TFT_DRIVER == R61505 || TFT_DRIVER == AUTO
#include "r65105.h"
#endif
#if TFT_DRIVER == ILI9328 || TFT_DRIVER == AUTO
#include "ili9328.h"
#endif
#if TFT_DRIVER == ILI9341 || TFT_DRIVER == AUTO
#include "ili9341.h"
#endif
#if TFT_DRIVER == ILI9488 || TFT_DRIVER == ILI9488_ID1 || TFT_DRIVER == AUTO
#include "ili9488.h"
#endif
#if TFT_DRIVER == SSD1963 || TFT_DRIVER == AUTO
#include "ssd1963.h"
#endif

#define DEBUG_OUT ENABLED(DEBUG_GRAPHICAL_TFT)
#include "../../core/debug_out.h"
Expand Down
12 changes: 6 additions & 6 deletions Marlin/src/lcd/tft_io/tft_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
*/
#pragma once

#include "../../inc/MarlinConfigPre.h"
#include "../../inc/MarlinConfig.h"

#if HAS_SPI_TFT
#include HAL_PATH(../../HAL, tft/tft_spi.h)
Expand All @@ -33,9 +33,9 @@
#error "TFT IO only supports SPI, FSMC or LTDC interface"
#endif

#define TFT_EXCHANGE_XY (1UL << 1)
#define TFT_INVERT_X (1UL << 2)
#define TFT_INVERT_Y (1UL << 3)
#define TFT_EXCHANGE_XY _BV32(1)
#define TFT_INVERT_X _BV32(2)
#define TFT_INVERT_Y _BV32(3)

#define TFT_NO_ROTATION (0x00)
#define TFT_ROTATE_90 (TFT_EXCHANGE_XY | TFT_INVERT_X)
Expand Down Expand Up @@ -63,8 +63,8 @@
// TFT_ORIENTATION is the "sum" of TFT_DEFAULT_ORIENTATION plus user TFT_ROTATION
#define TFT_ORIENTATION ((TFT_DEFAULT_ORIENTATION) ^ (TFT_ROTATION))

#define TFT_COLOR_RGB (1UL << 3)
#define TFT_COLOR_BGR (1UL << 4)
#define TFT_COLOR_RGB _BV32(3)
#define TFT_COLOR_BGR _BV32(4)

// Each TFT Driver is responsible for its default color mode.
// #ifndef TFT_COLOR
Expand Down

0 comments on commit c1ab587

Please sign in to comment.