G2 v1.3.94
This commit is contained in:
parent
b77a204566
commit
77fa3cecf9
23 changed files with 63 additions and 138 deletions
|
@ -1,5 +1,5 @@
|
|||
|
||||
#define CONFIGURATION_H_VERSION 020006 //Last changed working on 1.3.91
|
||||
#define CONFIGURATION_H_VERSION 020006 //Last changed working on 1.3.94
|
||||
|
||||
//===========================================================================
|
||||
//============================= Artillery Options ===========================
|
||||
|
@ -14,6 +14,7 @@
|
|||
#ifdef BLTOUCH
|
||||
#define NOZZLE_TO_PROBE_OFFSET { 31, -31, 0 }
|
||||
#define WAGGSTER_MOD_WIRING //BLTOUCH to Z+ Z_MAX_PIN (D19) Waggster Mod style wiring, comment out to use Z_MIN_PIN (D18)
|
||||
//#define DISABLE_LED // Print Engineering added 8/2-2020 some users report compatibilty issues with BL Touch and LED enabled
|
||||
#endif
|
||||
|
||||
/* 3DPRINTBEGINNER Z MIN SENSOR AS ABL BED MESH PROBE MOD */
|
||||
|
@ -59,7 +60,6 @@
|
|||
//#define GraphicalLCD // Will work next to MKS TFT
|
||||
//#define TMC_2209 // Defaults to TMC2100
|
||||
//#define TMC_2208 // Defaults to TMC2100, Print Engineering added 7/26-2020
|
||||
//#define DISABLE_LED // Print Engineering added 8/2-2020 some users report compatibilty issues with BL Touch and LED enabled
|
||||
//#define SKR13
|
||||
//#define SKR14 //Print Engineering added 7/26-2020
|
||||
//===========================================================================
|
||||
|
|
|
@ -2531,7 +2531,7 @@
|
|||
* M912 - Clear stepper driver overtemperature pre-warn condition flag.
|
||||
* M122 - Report driver parameters (Requires TMC_DEBUG)
|
||||
*/
|
||||
#if ENABLED(TMC_2209) || ENABLED(TMC_2208)
|
||||
#if (ENABLED(TMC_2209) || ENABLED(TMC_2208)) && (ENABLED(SKR13) || ENABLED(SKR14))
|
||||
#define MONITOR_DRIVER_STATUS
|
||||
#endif
|
||||
#if ENABLED(MONITOR_DRIVER_STATUS)
|
||||
|
|
|
@ -26,12 +26,12 @@
|
|||
#undef SD_CHECK_AND_RETRY
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_TFT
|
||||
#error "Sorry! SPI TFT displays are not available for HAL/STM32F1 (yet)."
|
||||
#if HAS_GRAPHICAL_TFT
|
||||
#error "Sorry! TFT displays are not available for HAL/STM32F1."
|
||||
#endif
|
||||
|
||||
// This platform has 'touch/xpt2046', not 'tft/xpt2046'
|
||||
#if ENABLED(TOUCH_SCREEN) && !HAS_FSMC_TFT
|
||||
#if ENABLED(TOUCH_SCREEN)
|
||||
#undef TOUCH_SCREEN
|
||||
#undef TOUCH_SCREEN_CALIBRATION
|
||||
#define HAS_TOUCH_XPT2046 1
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* feature/powerloss.cpp - Resume an SD print after power-loss
|
||||
* power_loss_recovery.cpp - Resume an SD print after power-loss
|
||||
*/
|
||||
|
||||
#include "../inc/MarlinConfigPre.h"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#pragma once
|
||||
|
||||
/**
|
||||
* feature/powerloss.h - Resume an SD print after power-loss
|
||||
* power_loss_recovery.h - Resume an SD print after power-loss
|
||||
*/
|
||||
|
||||
#include "../sd/cardreader.h"
|
||||
|
|
|
@ -28,9 +28,7 @@
|
|||
* M997: Perform in-application firmware update
|
||||
*/
|
||||
void GcodeSuite::M997() {
|
||||
|
||||
flashFirmware(parser.intval('S'));
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -997,17 +997,15 @@ void MarlinUI::draw_status_screen() {
|
|||
#endif // ADVANCED_PAUSE_FEATURE
|
||||
|
||||
// Draw a static item with no left-right margin required. Centered by default.
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
int8_t n = LCD_WIDTH;
|
||||
lcd_moveto(0, row);
|
||||
const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0,
|
||||
vlen = vstr ? utf8_strlen(vstr) : 0;
|
||||
if (style & SS_CENTER) {
|
||||
int8_t pad = (LCD_WIDTH - plen - vlen) / 2;
|
||||
if ((style & SS_CENTER) && !valstr) {
|
||||
int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2;
|
||||
while (--pad >= 0) { lcd_put_wchar(' '); n--; }
|
||||
}
|
||||
if (plen) n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n);
|
||||
if (vlen) n -= lcd_put_u8str_max(vstr, n);
|
||||
n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n);
|
||||
if (valstr) n -= lcd_put_u8str_max(valstr, n);
|
||||
for (; n > 0; --n) lcd_put_wchar(' ');
|
||||
}
|
||||
|
||||
|
|
|
@ -347,21 +347,20 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
|
|||
}
|
||||
|
||||
// Draw a static line of text in the same idiom as a menu item
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
|
||||
if (mark_as_selected(row, style & SS_INVERT)) {
|
||||
|
||||
pixel_len_t n = LCD_PIXEL_WIDTH; // pixel width of string allowed
|
||||
|
||||
const int8_t plen = pstr ? utf8_strlen_P(pstr) : 0,
|
||||
vlen = vstr ? utf8_strlen(vstr) : 0;
|
||||
if (style & SS_CENTER) {
|
||||
int8_t pad = (LCD_WIDTH - plen - vlen) / 2;
|
||||
while (--pad >= 0) n -= lcd_put_wchar(' ');
|
||||
}
|
||||
if ((style & SS_CENTER) && !valstr)
|
||||
for (int8_t pad = (LCD_WIDTH - utf8_strlen_P(pstr)) / 2; pad > 0; --pad) {
|
||||
lcd_put_wchar(' ');
|
||||
n -= MENU_FONT_WIDTH;
|
||||
}
|
||||
|
||||
if (plen) n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH);
|
||||
if (vlen) n -= lcd_put_u8str_max(vstr, n);
|
||||
n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, n / (MENU_FONT_WIDTH)) * (MENU_FONT_WIDTH);
|
||||
if (valstr) n -= lcd_put_u8str_max(valstr, n);
|
||||
while (n > MENU_FONT_WIDTH) n -= lcd_put_wchar(' ');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,7 +99,6 @@
|
|||
|
||||
#endif
|
||||
|
||||
#define SETCURSOR_X(col) SETCURSOR(col, _lcdLineNr)
|
||||
#define START_OF_UTF8_CHAR(C) (((C) & 0xC0u) != 0x80u)
|
||||
|
||||
int lcd_glyph_height();
|
||||
|
|
|
@ -83,7 +83,7 @@ class MenuItemBase {
|
|||
|
||||
class MenuItem_static : public MenuItemBase {
|
||||
public:
|
||||
static void draw(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const vstr=nullptr);
|
||||
static void draw(const uint8_t row, PGM_P const pstr, const uint8_t style=SS_DEFAULT, const char * const valstr=nullptr);
|
||||
};
|
||||
|
||||
// CONFIRM_ITEM(LABEL,Y,N,FY,FN,V...),
|
||||
|
@ -418,17 +418,16 @@ class MenuItem_bool : public MenuEditItemBase {
|
|||
}while(0)
|
||||
|
||||
#define _MENU_ITEM_P(TYPE, V...) do { \
|
||||
if (_menuLineNr == _thisItemNr) { \
|
||||
_skipStatic = false; \
|
||||
_skipStatic = false; \
|
||||
if (_menuLineNr == _thisItemNr) \
|
||||
_MENU_INNER_P(TYPE, ##V); \
|
||||
} \
|
||||
NEXT_ITEM(); \
|
||||
}while(0)
|
||||
|
||||
// Indexed items set a global index value and optional data
|
||||
#define _MENU_ITEM_N_S_P(TYPE, N, S, V...) do{ \
|
||||
_skipStatic = false; \
|
||||
if (_menuLineNr == _thisItemNr) { \
|
||||
_skipStatic = false; \
|
||||
MenuItemBase::init(N, S); \
|
||||
_MENU_INNER_P(TYPE, ##V); \
|
||||
} \
|
||||
|
@ -437,8 +436,8 @@ class MenuItem_bool : public MenuEditItemBase {
|
|||
|
||||
// Indexed items set a global index value
|
||||
#define _MENU_ITEM_N_P(TYPE, N, V...) do{ \
|
||||
_skipStatic = false; \
|
||||
if (_menuLineNr == _thisItemNr) { \
|
||||
_skipStatic = false; \
|
||||
MenuItemBase::itemIndex = N; \
|
||||
_MENU_INNER_P(TYPE, ##V); \
|
||||
} \
|
||||
|
@ -447,8 +446,8 @@ class MenuItem_bool : public MenuEditItemBase {
|
|||
|
||||
// Items with a unique string
|
||||
#define _MENU_ITEM_S_P(TYPE, S, V...) do{ \
|
||||
_skipStatic = false; \
|
||||
if (_menuLineNr == _thisItemNr) { \
|
||||
_skipStatic = false; \
|
||||
MenuItemBase::itemString = S; \
|
||||
_MENU_INNER_P(TYPE, ##V); \
|
||||
} \
|
||||
|
@ -551,17 +550,16 @@ class MenuItem_bool : public MenuEditItemBase {
|
|||
|
||||
// Indexed items set a global index value and optional data
|
||||
#define _CONFIRM_ITEM_P(PLABEL, V...) do { \
|
||||
if (_menuLineNr == _thisItemNr) { \
|
||||
_skipStatic = false; \
|
||||
_skipStatic = false; \
|
||||
if (_menuLineNr == _thisItemNr) \
|
||||
_CONFIRM_ITEM_INNER_P(PLABEL, ##V); \
|
||||
} \
|
||||
NEXT_ITEM(); \
|
||||
}while(0)
|
||||
|
||||
// Indexed items set a global index value
|
||||
#define _CONFIRM_ITEM_N_S_P(N, S, V...) do{ \
|
||||
_skipStatic = false; \
|
||||
if (_menuLineNr == _thisItemNr) { \
|
||||
_skipStatic = false; \
|
||||
MenuItemBase::init(N, S); \
|
||||
_CONFIRM_ITEM_INNER_P(TYPE, ##V); \
|
||||
} \
|
||||
|
|
|
@ -25,6 +25,6 @@
|
|||
|
||||
#define MENU_ITEM_ADDON_START(X) do{ \
|
||||
if (ui.should_draw() && _menuLineNr == _thisItemNr - 1) { \
|
||||
SETCURSOR_X(X)
|
||||
SETCURSOR(X, _lcdLineNr)
|
||||
|
||||
#define MENU_ITEM_ADDON_END() } }while(0)
|
||||
|
|
|
@ -66,7 +66,7 @@ void menu_advanced_settings();
|
|||
bar_percent += (int8_t)ui.encoderPosition;
|
||||
LIMIT(bar_percent, 0, 100);
|
||||
ui.encoderPosition = 0;
|
||||
MenuItem_static::draw(0, GET_TEXT(MSG_PROGRESS_BAR_TEST), SS_DEFAULT|SS_INVERT);
|
||||
MenuItem_static::draw(0, GET_TEXT(MSG_PROGRESS_BAR_TEST), SS_CENTER|SS_INVERT);
|
||||
lcd_put_int((LCD_WIDTH) / 2 - 2, LCD_HEIGHT - 2, bar_percent); lcd_put_wchar('%');
|
||||
lcd_moveto(0, LCD_HEIGHT - 1); ui.draw_progress_bar(bar_percent);
|
||||
}
|
||||
|
@ -307,7 +307,7 @@ void menu_advanced_settings();
|
|||
#define MAXTEMP_ALL _MAX(REPEAT(HOTENDS, _MAXTEMP_ITEM) 0)
|
||||
const uint8_t m = MenuItemBase::itemIndex;
|
||||
START_MENU();
|
||||
STATIC_ITEM_P(ui.get_preheat_label(m), SS_DEFAULT|SS_INVERT);
|
||||
STATIC_ITEM_P(ui.get_preheat_label(m), SS_CENTER|SS_INVERT);
|
||||
BACK_ITEM(MSG_CONFIGURATION);
|
||||
#if HAS_FAN
|
||||
editable.uint8 = uint8_t(ui.material_preset[m].fan_speed);
|
||||
|
|
|
@ -87,7 +87,7 @@ void _menu_temp_filament_op(const PauseMode mode, const int8_t extruder) {
|
|||
_change_filament_mode = mode;
|
||||
_change_filament_extruder = extruder;
|
||||
START_MENU();
|
||||
if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_DEFAULT|SS_INVERT);
|
||||
if (LCD_HEIGHT >= 4) STATIC_ITEM_P(change_filament_header(mode), SS_CENTER|SS_INVERT);
|
||||
BACK_ITEM(MSG_BACK);
|
||||
#if PREHEAT_COUNT
|
||||
LOOP_L_N(m, PREHEAT_COUNT)
|
||||
|
@ -266,7 +266,7 @@ void _lcd_pause_message(PGM_P const msg) {
|
|||
skip1 = !has2 && (LCD_HEIGHT) >= 5;
|
||||
|
||||
START_SCREEN();
|
||||
STATIC_ITEM_P(pause_header(), SS_DEFAULT|SS_INVERT); // 1: Header
|
||||
STATIC_ITEM_P(pause_header(), SS_CENTER|SS_INVERT); // 1: Header
|
||||
if (skip1) SKIP_ITEM(); // Move a single-line message down
|
||||
STATIC_ITEM_P(msg1); // 2: Message Line 1
|
||||
if (has2) STATIC_ITEM_P(msg2); // 3: Message Line 2
|
||||
|
|
|
@ -205,7 +205,7 @@ void menu_info_board() {
|
|||
if (ui.use_click()) return ui.go_back();
|
||||
|
||||
START_SCREEN();
|
||||
STATIC_ITEM_P(PSTR(BOARD_INFO_NAME), SS_DEFAULT|SS_INVERT); // MyPrinterController
|
||||
STATIC_ITEM_P(PSTR(BOARD_INFO_NAME), SS_CENTER|SS_INVERT); // MyPrinterController
|
||||
#ifdef BOARD_WEBSITE_URL
|
||||
STATIC_ITEM_P(PSTR(BOARD_WEBSITE_URL), SS_LEFT); // www.my3dprinter.com
|
||||
#endif
|
||||
|
@ -237,7 +237,7 @@ void menu_info_board() {
|
|||
void menu_info_printer() {
|
||||
if (ui.use_click()) return ui.go_back();
|
||||
START_SCREEN();
|
||||
STATIC_ITEM(MSG_MARLIN, SS_DEFAULT|SS_INVERT); // Marlin
|
||||
STATIC_ITEM(MSG_MARLIN, SS_CENTER|SS_INVERT); // Marlin
|
||||
STATIC_ITEM_P(PSTR(SHORT_BUILD_VERSION)); // x.x.x-Branch
|
||||
STATIC_ITEM_P(PSTR(STRING_DISTRIBUTION_DATE)); // YYYY-MM-DD HH:MM
|
||||
STATIC_ITEM_P(PSTR(MACHINE_NAME)); // My3DPrinter
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
void menu_led_presets() {
|
||||
START_MENU();
|
||||
#if LCD_HEIGHT > 2
|
||||
STATIC_ITEM(MSG_LED_PRESETS, SS_DEFAULT|SS_INVERT);
|
||||
STATIC_ITEM(MSG_LED_PRESETS, SS_CENTER|SS_INVERT);
|
||||
#endif
|
||||
BACK_ITEM(MSG_LED_CONTROL);
|
||||
ACTION_ITEM(MSG_SET_LEDS_WHITE, leds.set_white);
|
||||
|
|
|
@ -131,7 +131,7 @@ inline void action_mmu2_choose(const uint8_t tool) {
|
|||
void menu_mmu2_choose_filament() {
|
||||
START_MENU();
|
||||
#if LCD_HEIGHT > 2
|
||||
STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_DEFAULT|SS_INVERT);
|
||||
STATIC_ITEM(MSG_MMU2_CHOOSE_FILAMENT_HEADER, SS_CENTER|SS_INVERT);
|
||||
#endif
|
||||
LOOP_L_N(i, 5) ACTION_ITEM_N(i, MSG_MMU2_FILAMENT_N, []{ action_mmu2_choose(MenuItemBase::itemIndex); });
|
||||
END_MENU();
|
||||
|
@ -145,7 +145,7 @@ void menu_mmu2_pause() {
|
|||
currentTool = mmu2.get_current_tool();
|
||||
START_MENU();
|
||||
#if LCD_HEIGHT > 2
|
||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, SS_DEFAULT|SS_INVERT);
|
||||
STATIC_ITEM(MSG_FILAMENT_CHANGE_HEADER, SS_CENTER|SS_INVERT);
|
||||
#endif
|
||||
ACTION_ITEM(MSG_MMU2_RESUME, []{ mmuMenuWait = false; });
|
||||
ACTION_ITEM(MSG_MMU2_UNLOAD_FILAMENT, []{ mmu2.unload(); });
|
||||
|
|
|
@ -178,12 +178,12 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
|
|||
START_MENU();
|
||||
if (LCD_HEIGHT >= 4) {
|
||||
switch (axis) {
|
||||
case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_DEFAULT|SS_INVERT); break;
|
||||
case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_DEFAULT|SS_INVERT); break;
|
||||
case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_DEFAULT|SS_INVERT); break;
|
||||
case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_CENTER|SS_INVERT); break;
|
||||
case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_CENTER|SS_INVERT); break;
|
||||
case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_CENTER|SS_INVERT); break;
|
||||
default:
|
||||
TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);
|
||||
STATIC_ITEM(MSG_MOVE_E, SS_DEFAULT|SS_INVERT);
|
||||
STATIC_ITEM(MSG_MOVE_E, SS_CENTER|SS_INVERT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#if ENABLED(TOUCH_SCREEN)
|
||||
|
||||
#include "touch.h"
|
||||
#include "pinconfig.h"
|
||||
|
||||
#include "../ultralcd.h"
|
||||
#include "../menu/menu.h"
|
||||
|
|
|
@ -341,11 +341,11 @@ void MarlinUI::draw_status_screen() {
|
|||
}
|
||||
|
||||
// Draw a static item with no left-right margin required. Centered by default.
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
menu_item(row);
|
||||
tft_string.set(pstr, itemIndex, itemString);
|
||||
if (vstr)
|
||||
tft_string.add(vstr);
|
||||
if (valstr)
|
||||
tft_string.add(valstr);
|
||||
tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string);
|
||||
}
|
||||
|
||||
|
|
|
@ -345,11 +345,11 @@ void MarlinUI::draw_status_screen() {
|
|||
}
|
||||
|
||||
// Draw a static item with no left-right margin required. Centered by default.
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const vstr/*=nullptr*/) {
|
||||
void MenuItem_static::draw(const uint8_t row, PGM_P const pstr, const uint8_t style/*=SS_DEFAULT*/, const char * const valstr/*=nullptr*/) {
|
||||
menu_item(row);
|
||||
tft_string.set(pstr, itemIndex, itemString);
|
||||
if (vstr)
|
||||
tft_string.add(vstr);
|
||||
if (valstr)
|
||||
tft_string.add(valstr);
|
||||
tft.add_text(tft_string.center(TFT_WIDTH), MENU_TEXT_Y_OFFSET, COLOR_YELLOW, tft_string);
|
||||
}
|
||||
|
||||
|
|
|
@ -148,8 +148,8 @@
|
|||
#endif
|
||||
|
||||
// SPI Flash
|
||||
#define SPI_FLASH_SIZE 0x200000 // 2MB
|
||||
#define HAS_SPI_FLASH 1
|
||||
#define SPI_FLASH_SIZE 0x200000 // 2MB
|
||||
#define HAS_SPI_FLASH 1
|
||||
|
||||
// SPI 2
|
||||
#define W25QXX_CS_PIN PB12
|
||||
|
@ -197,47 +197,24 @@
|
|||
#define LCD_PIXEL_OFFSET_X 48
|
||||
#define LCD_PIXEL_OFFSET_Y 48
|
||||
|
||||
#define XPT2046_X_CALIBRATION -12316
|
||||
#define XPT2046_Y_CALIBRATION 8981
|
||||
#define XPT2046_X_OFFSET 340
|
||||
#define XPT2046_Y_OFFSET -20
|
||||
#define XPT2046_X_CALIBRATION -12316
|
||||
#define XPT2046_Y_CALIBRATION 8981
|
||||
#define XPT2046_X_OFFSET 340
|
||||
#define XPT2046_Y_OFFSET -20
|
||||
|
||||
#define USE_XPT2046 1
|
||||
#define XPT2046_XY_SWAP 0
|
||||
#define XPT2046_X_INV 1
|
||||
#define XPT2046_Y_INV 0
|
||||
|
||||
#define XPT2046_HOR_RES 480
|
||||
#define XPT2046_VER_RES 320
|
||||
#define XPT2046_X_MIN 140
|
||||
#define XPT2046_Y_MIN 200
|
||||
#define XPT2046_HOR_RES 480
|
||||
#define XPT2046_VER_RES 320
|
||||
#define XPT2046_X_MIN 140
|
||||
#define XPT2046_Y_MIN 200
|
||||
#define XPT2046_X_MAX 1900
|
||||
#define XPT2046_Y_MAX 1900
|
||||
#define XPT2046_AVG 4
|
||||
#define XPT2046_INV 0
|
||||
|
||||
#elif ENABLED(TFT_480x320)
|
||||
#define TFT_RESET_PIN PF11
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define XPT2046_X_CALIBRATION -17181
|
||||
#define XPT2046_Y_CALIBRATION 11434
|
||||
#define XPT2046_X_OFFSET 501
|
||||
#define XPT2046_Y_OFFSET -9
|
||||
|
||||
#define TOUCH_CS_PIN PB7 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define TFT_DRIVER ILI9488
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#define XPT2046_AVG 4
|
||||
#define XPT2046_INV 0
|
||||
#endif
|
||||
|
||||
// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available
|
||||
|
|
|
@ -156,29 +156,6 @@
|
|||
#define XPT2046_Y_OFFSET -20
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#elif ENABLED(TFT_480x320)
|
||||
#define TFT_RESET_PIN PF11
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define XPT2046_X_CALIBRATION -17181
|
||||
#define XPT2046_Y_CALIBRATION 11434
|
||||
#define XPT2046_X_OFFSET 501
|
||||
#define XPT2046_Y_OFFSET -9
|
||||
|
||||
#define TOUCH_CS_PIN PB7 // SPI1_NSS
|
||||
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
|
||||
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
|
||||
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
|
||||
|
||||
#define TFT_DRIVER ILI9488
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#endif
|
||||
|
||||
// SPI Flash
|
||||
|
|
|
@ -215,28 +215,6 @@
|
|||
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
|
||||
#endif
|
||||
|
||||
#elif ENABLED(TFT_480x320)
|
||||
#define TFT_RESET_PIN PC6
|
||||
#define TFT_BACKLIGHT_PIN PD13
|
||||
|
||||
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
|
||||
#define FSMC_CS_PIN PD7
|
||||
#define FSMC_RS_PIN PD11
|
||||
#define FSMC_DMA_DEV DMA2
|
||||
#define FSMC_DMA_CHANNEL DMA_CH5
|
||||
|
||||
#define XPT2046_X_CALIBRATION -17181
|
||||
#define XPT2046_Y_CALIBRATION 11434
|
||||
#define XPT2046_X_OFFSET 501
|
||||
#define XPT2046_Y_OFFSET -9
|
||||
|
||||
#define TOUCH_CS_PIN PA7 // SPI2_NSS
|
||||
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
|
||||
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
|
||||
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
|
||||
|
||||
#define TFT_DRIVER ILI9488
|
||||
#define TFT_BUFFER_SIZE 14400
|
||||
#endif
|
||||
|
||||
#define SPI_FLASH
|
||||
|
|
Reference in a new issue