Skip to content

Commit

Permalink
move macros to compile COLOR_UI with and without TOUCH_SCREEN_CALIBRA…
Browse files Browse the repository at this point in the history
…TION
  • Loading branch information
rhapsodyv committed Nov 25, 2020
1 parent e38abef commit 95d56ea
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
8 changes: 8 additions & 0 deletions Marlin/src/lcd/tft_io/tft_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@
#error "TFT IO only supports SPI or FSMC interface"
#endif

#define TOUCH_ORIENTATION_NONE 0
#define TOUCH_LANDSCAPE 1
#define TOUCH_PORTRAIT 2

#ifndef TOUCH_ORIENTATION
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
#endif

#define TFT_EXCHANGE_XY (1UL << 1)
#define TFT_INVERT_X (1UL << 2)
#define TFT_INVERT_Y (1UL << 3)
Expand Down
9 changes: 1 addition & 8 deletions Marlin/src/lcd/tft_io/touch_calibration.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#pragma once

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

#ifndef TOUCH_SCREEN_CALIBRATION_PRECISION
#define TOUCH_SCREEN_CALIBRATION_PRECISION 80
Expand All @@ -28,14 +29,6 @@
#define TOUCH_SCREEN_HOLD_TO_CALIBRATE_MS 2500
#endif

#define TOUCH_ORIENTATION_NONE 0
#define TOUCH_LANDSCAPE 1
#define TOUCH_PORTRAIT 2

#ifndef TOUCH_ORIENTATION
#define TOUCH_ORIENTATION TOUCH_LANDSCAPE
#endif

typedef struct __attribute__((__packed__)) {
int32_t x, y;
int16_t offset_x, offset_y;
Expand Down

0 comments on commit 95d56ea

Please sign in to comment.