Browse Source

Cleanup before MKS changes

vanilla_fb_2.0.x
Scott Lahteine 4 years ago
parent
commit
ee1232051c
  1. 39
      Marlin/src/HAL/DUE/usb/compiler.h
  2. 2
      Marlin/src/HAL/STM32/tft/tft_fsmc.cpp
  3. 12
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp
  4. 3
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp
  5. 4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h
  6. 5
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp
  7. 8
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp
  8. 6
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp
  9. 4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp
  10. 2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp
  11. 4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp
  12. 2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp
  13. 13
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp
  14. 4
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp
  15. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp
  16. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_about.h
  17. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h
  18. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h
  19. 24
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp
  20. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h
  21. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h
  22. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h
  23. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h
  24. 21
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp
  25. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h
  26. 27
      Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp
  27. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h
  28. 1
      Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp
  29. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_home.h
  30. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h
  31. 21
      Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp
  32. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_language.h
  33. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h
  34. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h
  35. 16
      Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp
  36. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h
  37. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h
  38. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h
  39. 20
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp
  40. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h
  41. 15
      Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp
  42. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h
  43. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h
  44. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h
  45. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h
  46. 13
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp
  47. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h
  48. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp
  49. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h
  50. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h
  51. 10
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp
  52. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h
  53. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_set.h
  54. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h
  55. 1
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp
  56. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h
  57. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h
  58. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp
  59. 4
      Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h
  60. 2
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h
  61. 4
      Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h
  62. 1
      Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp
  63. 4
      Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h
  64. 4
      Marlin/src/lcd/extui/lib/mks_ui/tft_fsmc.h
  65. 168
      Marlin/src/lcd/tft/st7796s.h
  66. 20
      Marlin/src/pins/pins.h

39
Marlin/src/HAL/DUE/usb/compiler.h

@ -173,11 +173,11 @@
# define __always_inline __forceinline
#elif (defined __GNUC__)
#ifdef __always_inline
# undef __always_inline
# undef __always_inline
#endif
# define __always_inline inline __attribute__((__always_inline__))
# define __always_inline inline __attribute__((__always_inline__))
#elif (defined __ICCARM__)
# define __always_inline _Pragma("inline=forced")
# define __always_inline _Pragma("inline=forced")
#endif
/**
@ -188,11 +188,11 @@
* heuristics and not inline the function.
*/
#ifdef __CC_ARM
# define __no_inline __attribute__((noinline))
# define __no_inline __attribute__((noinline))
#elif (defined __GNUC__)
# define __no_inline __attribute__((__noinline__))
# define __no_inline __attribute__((__noinline__))
#elif (defined __ICCARM__)
# define __no_inline _Pragma("inline=never")
# define __no_inline _Pragma("inline=never")
#endif
/*! \brief This macro is used to test fatal errors.
@ -211,9 +211,9 @@
# else
#undef TEST_SUITE_DEFINE_ASSERT_MACRO
# define Assert(expr) \
{\
if (!(expr)) while (true);\
}
{\
if (!(expr)) while (true);\
}
# endif
#else
# define Assert(expr) ((void) 0)
@ -1106,17 +1106,16 @@ static inline uint16_t convert_byte_array_to_16_bit(uint8_t *data)
/* Converts a 8 Byte array into a 32-Bit value */
static inline uint32_t convert_byte_array_to_32_bit(uint8_t *data)
{
union
{
uint32_t u32;
uint8_t u8[8];
}long_addr;
uint8_t index;
for (index = 0; index < 4; index++)
{
long_addr.u8[index] = *data++;
}
return long_addr.u32;
union
{
uint32_t u32;
uint8_t u8[8];
}long_addr;
uint8_t index;
for (index = 0; index < 4; index++) {
long_addr.u8[index] = *data++;
}
return long_addr.u32;
}
/**

2
Marlin/src/HAL/STM32/tft/tft_fsmc.cpp

@ -87,7 +87,7 @@ void TFT_FSMC::Init() {
__HAL_RCC_FSMC_CLK_ENABLE();
for(uint16_t i = 0; PinMap_FSMC[i].pin != NC; i++)
for (uint16_t i = 0; PinMap_FSMC[i].pin != NC; i++)
pinmap_pinout(PinMap_FSMC[i].pin, PinMap_FSMC);
pinmap_pinout(digitalPinToPinName(TFT_CS_PIN), PinMap_FSMC_CS);
pinmap_pinout(digitalPinToPinName(TFT_RS_PIN), PinMap_FSMC_RS);

12
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/flash_storage.cpp

@ -188,7 +188,7 @@ bool UIFlashStorage::is_present = false;
}
void UIFlashStorage::initialize() {
for(uint8_t i = 0; i < 10; i++) {
for (uint8_t i = 0; i < 10; i++) {
if (check_known_device()) {
is_present = true;
break;
@ -239,7 +239,7 @@ bool UIFlashStorage::is_present = false;
uint16_t stride = 4 + block_size;
int32_t read_offset = -1;
for(uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) {
for (uint32_t offset = 0; offset < (data_storage_area_size - stride); offset += stride) {
uint32_t delim;
spi_read_begin(offset);
spi_read_bulk (&delim, sizeof(delim));
@ -395,9 +395,8 @@ bool UIFlashStorage::is_present = false;
uint32_t UIFlashStorage::get_media_file_start(uint8_t slot) {
uint32_t addr = media_storage_addr + sizeof(uint32_t) * media_storage_slots;
spi_read_begin(media_storage_addr);
for(uint8_t i = 0; i < slot; i++) {
for (uint8_t i = 0; i < slot; i++)
addr += spi_read_32();
}
spi_read_end();
return addr;
}
@ -442,7 +441,7 @@ bool UIFlashStorage::is_present = false;
addr = get_media_file_start(slot);
// Write out the file itself
for(;;) {
for (;;) {
const int16_t nBytes = reader.read(buff, write_page_size);
if (nBytes == -1) {
SERIAL_ECHOLNPGM("Failed to read from file");
@ -450,8 +449,7 @@ bool UIFlashStorage::is_present = false;
}
addr = write(addr, buff, nBytes);
if (nBytes != write_page_size)
break;
if (nBytes != write_page_size) break;
TERN_(EXTENSIBLE_UI, ExtUI::yield());
}

3
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/dl_cache.cpp

@ -69,9 +69,8 @@ using namespace FTDI;
void DLCache::init() {
CLCD::mem_write_32(DL_FREE_ADDR, DL_FREE_ADDR + 4);
for(uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++) {
for (uint8_t slot = 0; slot < DL_CACHE_SLOTS; slot++)
save_slot(slot, 0, 0, 0);
}
}
bool DLCache::has_data() {

4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/grid_layout.h

@ -74,12 +74,12 @@
#define DRAW_LAYOUT_GRID \
{ \
cmd.cmd(LINE_WIDTH(4)); \
for(int i = 1; i <= GRID_COLS; i++) { \
for (int i = 1; i <= GRID_COLS; i++) { \
cmd.cmd(BEGIN(LINES)); \
cmd.cmd(VERTEX2F(GRID_X(i) *16, 0 *16)); \
cmd.cmd(VERTEX2F(GRID_X(i) *16, FTDI::display_height *16)); \
} \
for(int i = 1; i < GRID_ROWS; i++) { \
for (int i = 1; i < GRID_ROWS; i++) { \
cmd.cmd(BEGIN(LINES)); \
cmd.cmd(VERTEX2F(0 *16, GRID_Y(i) *16)); \
cmd.cmd(VERTEX2F(FTDI::display_width *16, GRID_Y(i) *16)); \

5
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/screen_types.cpp

@ -26,7 +26,7 @@
/********************** VIRTUAL DISPATCH DATA TYPE ******************************/
uint8_t ScreenRef::lookupScreen(onRedraw_func_t onRedraw_ptr) {
for(uint8_t type = 0; type < functionTableSize; type++) {
for (uint8_t type = 0; type < functionTableSize; type++) {
if (GET_METHOD(type, onRedraw) == onRedraw_ptr) {
return type;
}
@ -50,9 +50,8 @@ void ScreenRef::setScreen(onRedraw_func_t onRedraw_ptr) {
}
void ScreenRef::initializeAll() {
for(uint8_t type = 0; type < functionTableSize; type++) {
for (uint8_t type = 0; type < functionTableSize; type++)
GET_METHOD(type, onStartup)();
}
}
/********************** SCREEN STACK ******************************/

8
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_box.cpp

@ -34,7 +34,7 @@ namespace FTDI {
const char *p = str;
end = str;
uint16_t lw = 0, result = 0;
for(;;) {
for (;;) {
utf8_char_t c = get_utf8_char_and_inc(p);
if (c == ' ' || c == '\n' || c == '\0') {
if (lw < w || end == str) {
@ -60,7 +60,7 @@ namespace FTDI {
const char *line_end;
const uint16_t wrap_width = width;
width = height = 0;
for(;;) {
for (;;) {
uint16_t line_width = find_line_break(fm, wrap_width, line_start, line_end);
if (line_end == line_start) break;
width = max(width, line_width);
@ -78,7 +78,7 @@ namespace FTDI {
FontMetrics fm(font);
// Shrink the font until we find a font that fits
for(;;) {
for (;;) {
box_width = w;
measure_text_box(fm, str, box_width, box_height);
if (box_width <= (uint16_t)w && box_height <= (uint16_t)h) break;
@ -91,7 +91,7 @@ namespace FTDI {
const char *line_start = str;
const char *line_end;
for(;;) {
for (;;) {
find_line_break(fm, w, line_start, line_end);
if (line_end == line_start) break;

6
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp

@ -37,13 +37,13 @@ namespace FTDI {
// split and still allow the ellipsis to fit.
int16_t lineWidth = 0;
char *breakPoint = str;
for(char* c = str; *c; c++) {
for (char* c = str; *c; c++) {
lineWidth += fm.get_char_width(*c);
if(lineWidth + ellipsisWidth < w)
if (lineWidth + ellipsisWidth < w)
breakPoint = c;
}
if(lineWidth > w) {
if (lineWidth > w) {
*breakPoint = '\0';
strcpy_P(breakPoint,PSTR("..."));
}

4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bed_mesh_screen.cpp

@ -253,7 +253,7 @@ void BedMeshScreen::drawHighlightedPointValue() {
.tag(1).button( OKAY_POS, GET_TEXT_F(MSG_BUTTON_OKAY))
.tag(0);
switch(screen_data.BedMeshScreen.message) {
switch (screen_data.BedMeshScreen.message) {
case screen_data.BedMeshScreen.MSG_MESH_COMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_DONE)); break;
case screen_data.BedMeshScreen.MSG_MESH_INCOMPLETE: cmd.text(MESSAGE_POS, GET_TEXT_F(MSG_BED_MAPPING_INCOMPLETE)); break;
default: break;
@ -321,7 +321,7 @@ bool BedMeshScreen::isMeshComplete(ExtUI::bed_mesh_t data) {
}
void BedMeshScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI::probe_state_t state) {
switch(state) {
switch (state) {
case ExtUI::MESH_START:
screen_data.BedMeshScreen.count = 0;
screen_data.BedMeshScreen.message = screen_data.BedMeshScreen.MSG_NONE;

2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp

@ -115,7 +115,7 @@ void FilesScreen::drawFileList() {
#define MARGIN_T 0
#define MARGIN_B 0
uint16_t fileIndex = screen_data.FilesScreen.cur_page * files_per_page;
for(uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
for (uint8_t i = 0; i < files_per_page; i++, fileIndex++) {
if (files.seek(fileIndex)) {
drawFileButton(files.filename(), getTagForLine(i), files.isDir(), false);
}

4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_settings_screen.cpp

@ -222,7 +222,7 @@ void InterfaceSettingsScreen::saveSettings(char *buff) {
eeprom.touch_transform_f = CLCD::mem_read_32(CLCD::REG::TOUCH_TRANSFORM_F);
eeprom.display_h_offset_adj = CLCD::mem_read_16(CLCD::REG::HOFFSET) - FTDI::Hoffset;
eeprom.display_v_offset_adj = CLCD::mem_read_16(CLCD::REG::VOFFSET) - FTDI::Voffset;
for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
for (uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
eeprom.event_sounds[i] = InterfaceSoundsScreen::event_sounds[i];
memcpy(buff, &eeprom, sizeof(eeprom));
@ -251,7 +251,7 @@ void InterfaceSettingsScreen::loadSettings(const char *buff) {
CLCD::mem_write_32(CLCD::REG::TOUCH_TRANSFORM_F, eeprom.touch_transform_f);
CLCD::mem_write_16(CLCD::REG::HOFFSET, eeprom.display_h_offset_adj + FTDI::Hoffset);
CLCD::mem_write_16(CLCD::REG::VOFFSET, eeprom.display_v_offset_adj + FTDI::Voffset);
for(uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
for (uint8_t i = 0; i < InterfaceSoundsScreen::NUM_EVENTS; i++)
InterfaceSoundsScreen::event_sounds[i] = eeprom.event_sounds[i];
TERN_(TOUCH_UI_DEVELOPER_MENU, StressTestScreen::startupCheck());

2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/interface_sounds_screen.cpp

@ -43,7 +43,7 @@ void InterfaceSoundsScreen::toggleSoundSelection(event_t event) {
}
void InterfaceSoundsScreen::setSoundSelection(event_t event, const SoundPlayer::sound_t* sound) {
for(uint8_t i = 0; i < SoundList::n; i++)
for (uint8_t i = 0; i < SoundList::n; i++)
if (SoundList::data(i) == sound)
event_sounds[event] = i;
}

13
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp

@ -176,11 +176,7 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
char bed_str[20];
char fan_str[20];
sprintf_P(
fan_str,
PSTR("%-3d %%"),
int8_t(getActualFan_percent(FAN0))
);
sprintf_P(fan_str, PSTR("%-3d %%"), int8_t(getActualFan_percent(FAN0)));
if (isHeaterIdle(BED))
format_temp_and_idle(bed_str, getActualTemp_celsius(BED));
@ -193,16 +189,13 @@ void StatusScreen::draw_temperature(draw_mode_t what) {
format_temp_and_temp(e0_str, getActualTemp_celsius(H0), getTargetTemp_celsius(H0));
#if EXTRUDERS == 2
#if HAS_MULTI_EXTRUDER
if (isHeaterIdle(H1))
format_temp_and_idle(e1_str, getActualTemp_celsius(H1));
else
format_temp_and_temp(e1_str, getActualTemp_celsius(H1), getTargetTemp_celsius(H1));
#else
strcpy_P(
e1_str,
PSTR("-")
);
strcpy_P(e1_str, PSTR("-"));
#endif
cmd.tag(5)

4
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/stress_test_screen.cpp

@ -38,7 +38,7 @@ using namespace ExtUI;
void StressTestScreen::drawDots(uint16_t x, uint16_t y, uint16_t w, uint16_t h) {
CommandProcessor cmd;
for(uint8_t i = 0; i < 100; i++) {
for (uint8_t i = 0; i < 100; i++) {
cmd.cmd(BEGIN(POINTS))
.cmd(POINT_SIZE(20*16))
.cmd(COLOR_RGB(random(0xFFFFFF)))
@ -111,7 +111,7 @@ void StressTestScreen::recursiveLockup() {
void StressTestScreen::iterativeLockup() {
screen_data.StressTestScreen.message = PSTR("Test 3: Printer will restart.");
for(;;) current_screen.onRefresh();
for (;;) current_screen.onRefresh();
}
void StressTestScreen::onIdle() {

4
Marlin/src/lcd/extui/lib/mks_ui/draw_about.cpp

@ -75,7 +75,7 @@ void lv_draw_about(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonBack = lv_imgbtn_create(scr, NULL);
#if 1
@ -88,8 +88,8 @@ void lv_draw_about(void) {
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
/*Create a label on the Image button*/
// Create a label on the image button
label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {

4
Marlin/src/lcd/extui/lib/mks_ui/draw_about.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_about(void);
@ -30,5 +30,5 @@ extern void lv_clear_about();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_acceleration_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_acceleration_settings(void);
extern void lv_clear_acceleration_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_advance_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_advance_settings(void);
extern void lv_clear_advance_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

24
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp

@ -73,7 +73,7 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
#if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = planner.flow_percentage[0];
planner.refresh_e_factor(1);
}
#endif
}
disp_print_speed();
}
@ -98,10 +98,10 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
//planner.flow_percentage[1] = planner.flow_percentage[0];
//planner.e_factor[1]= planner.flow_percentage[1] * 0.01;
planner.refresh_e_factor(0);
if (EXTRUDERS == 2) {
#if HAS_MULTI_EXTRUDER
planner.flow_percentage[1] = planner.flow_percentage[0];
planner.refresh_e_factor(1);
}
#endif
}
disp_print_speed();
}
@ -177,7 +177,7 @@ void lv_draw_change_speed(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
buttonMov = lv_imgbtn_create(scr, NULL);
@ -228,7 +228,7 @@ void lv_draw_change_speed(void) {
lv_obj_set_pos(buttonStep, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonMov, LV_LAYOUT_OFF);
@ -236,12 +236,12 @@ void lv_draw_change_speed(void) {
lv_btn_set_layout(buttonStep, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
labelMov = lv_label_create(buttonMov, NULL);
labelExt = lv_label_create(buttonExt, NULL);
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelMov = lv_label_create(buttonMov, NULL);
labelExt = lv_label_create(buttonExt, NULL);
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, speed_menu.add);
@ -286,7 +286,7 @@ void disp_speed_step() {
}
void disp_print_speed() {
char buf[30] = {0};
char buf[30] = { 0 };
public_buf_l[0] = '\0';

4
Marlin/src/lcd/extui/lib/mks_ui/draw_change_speed.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define MIN_EXT_SPEED_PERCENT 10
@ -36,5 +36,5 @@ extern void disp_speed_type();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_dialog.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define DIALOG_TYPE_STOP 0
@ -79,5 +79,5 @@ extern void lv_clear_dialog();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_eeprom_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_eeprom_settings(void);
extern void lv_clear_eeprom_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#ifndef PGM_P
@ -34,5 +34,5 @@ extern void lv_clear_error_message();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

21
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp

@ -100,9 +100,9 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
queue.inject_P(PSTR("T0"));
}
}
else {
else
uiCfg.curSprayerChoose = 0;
}
extructAmount = 0;
disp_hotend_temp();
disp_ext_type();
@ -149,7 +149,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
}
}
void lv_draw_extrusion(void) {
lv_obj_t *buttonAdd, *buttonDec, *buttonBack;
@ -174,7 +173,7 @@ void lv_draw_extrusion(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create image buttons
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
buttoType = lv_imgbtn_create(scr, NULL);
@ -224,7 +223,7 @@ void lv_draw_extrusion(void) {
lv_obj_set_pos(buttonSpeed, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@ -232,12 +231,12 @@ void lv_draw_extrusion(void) {
lv_btn_set_layout(buttonSpeed, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL);
labelSpeed = lv_label_create(buttonSpeed, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL);
labelSpeed = lv_label_create(buttonSpeed, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, extrude_menu.in);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_extrusion.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_extrusion(void);
@ -35,5 +35,5 @@ extern void disp_extru_amount();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

27
Marlin/src/lcd/extui/lib/mks_ui/draw_fan.cpp

@ -140,12 +140,12 @@ void lv_draw_fan(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
// Create an Image button
buttonAdd = lv_imgbtn_create(scr, NULL);
buttonDec = lv_imgbtn_create(scr, NULL);
buttonHigh = lv_imgbtn_create(scr, NULL);
buttonMid = lv_imgbtn_create(scr, NULL);
buttonOff = lv_imgbtn_create(scr, NULL);
buttonMid = lv_imgbtn_create(scr, NULL);
buttonOff = lv_imgbtn_create(scr, NULL);
buttonBack = lv_imgbtn_create(scr, NULL);
lv_obj_set_event_cb_mks(buttonAdd, event_handler, ID_F_ADD, "bmp_Add.bin", 0);
@ -154,6 +154,7 @@ void lv_draw_fan(void) {
lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonAdd, LV_BTN_STATE_REL, &tft_style_label_rel);
lv_obj_clear_protect(buttonAdd, LV_PROTECT_FOLLOW);
#if 1
lv_obj_set_event_cb_mks(buttonDec, event_handler, ID_F_DEC, "bmp_Dec.bin", 0);
lv_imgbtn_set_src(buttonDec, LV_BTN_STATE_REL, &bmp_pic);
@ -184,6 +185,7 @@ void lv_draw_fan(void) {
lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
#endif
lv_obj_set_pos(buttonAdd, INTERVAL_V, titleHeight);
@ -193,7 +195,7 @@ void lv_draw_fan(void) {
lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonHigh, LV_LAYOUT_OFF);
@ -201,13 +203,12 @@ void lv_draw_fan(void) {
lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t * labelHigh = lv_label_create(buttonHigh, NULL);
lv_obj_t * labelMid = lv_label_create(buttonMid, NULL);
lv_obj_t * labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t *labelHigh = lv_label_create(buttonHigh, NULL);
lv_obj_t *labelMid = lv_label_create(buttonMid, NULL);
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, fan_menu.add);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_fan.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_fan(void);
@ -31,5 +31,5 @@ extern void disp_fan_value();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

1
Marlin/src/lcd/extui/lib/mks_ui/draw_home.cpp

@ -96,7 +96,6 @@ static void event_handler(lv_obj_t * obj, lv_event_t event) {
lv_draw_tool();
}
break;
}
}

4
Marlin/src/lcd/extui/lib/mks_ui/draw_home.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_home(void);
@ -30,5 +30,5 @@ extern void lv_clear_home();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_jerk_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_jerk_settings(void);
extern void lv_clear_jerk_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

21
Marlin/src/lcd/extui/lib/mks_ui/draw_language.cpp

@ -246,7 +246,7 @@ void lv_draw_language(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create image buttons
buttonCN = lv_imgbtn_create(scr, NULL);
buttonT_CN = lv_imgbtn_create(scr, NULL);
buttonEN = lv_imgbtn_create(scr, NULL);
@ -304,6 +304,7 @@ void lv_draw_language(void) {
lv_imgbtn_set_src(buttonBack, LV_BTN_STATE_PR, &bmp_pic);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_PR, &tft_style_label_pre);
lv_imgbtn_set_style(buttonBack, LV_BTN_STATE_REL, &tft_style_label_rel);
#endif // if 1
lv_obj_set_pos(buttonCN, INTERVAL_V, titleHeight);
@ -315,7 +316,7 @@ void lv_draw_language(void) {
lv_obj_set_pos(buttonIT, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonCN, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonT_CN, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonEN, LV_LAYOUT_OFF);
@ -325,14 +326,14 @@ void lv_draw_language(void) {
lv_btn_set_layout(buttonIT, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * label_CN = lv_label_create(buttonCN, NULL);
lv_obj_t * label_T_CN = lv_label_create(buttonT_CN, NULL);
lv_obj_t * label_EN = lv_label_create(buttonEN, NULL);
lv_obj_t * label_RU = lv_label_create(buttonRU, NULL);
lv_obj_t * label_ES = lv_label_create(buttonES, NULL);
lv_obj_t * label_FR = lv_label_create(buttonFR, NULL);
lv_obj_t * label_IT = lv_label_create(buttonIT, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *label_CN = lv_label_create(buttonCN, NULL);
lv_obj_t *label_T_CN = lv_label_create(buttonT_CN, NULL);
lv_obj_t *label_EN = lv_label_create(buttonEN, NULL);
lv_obj_t *label_RU = lv_label_create(buttonRU, NULL);
lv_obj_t *label_ES = lv_label_create(buttonES, NULL);
lv_obj_t *label_FR = lv_label_create(buttonFR, NULL);
lv_obj_t *label_IT = lv_label_create(buttonIT, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
disp_language(gCfgItems.language, SELECTED);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_language.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_language(void);
@ -30,5 +30,5 @@ extern void lv_clear_language();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_machine_para.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_machine_para(void);
extern void lv_clear_machine_para();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_machine_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_machine_settings(void);
extern void lv_clear_machine_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

16
Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.cpp

@ -187,7 +187,7 @@ void lv_draw_manualLevel(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonPoint1 = lv_imgbtn_create(scr, NULL);
buttonPoint2 = lv_imgbtn_create(scr, NULL);
buttonPoint3 = lv_imgbtn_create(scr, NULL);
@ -240,7 +240,7 @@ void lv_draw_manualLevel(void) {
lv_obj_set_pos(buttonPoint5, INTERVAL_V, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonPoint1, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPoint2, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPoint3, LV_LAYOUT_OFF);
@ -248,12 +248,12 @@ void lv_draw_manualLevel(void) {
lv_btn_set_layout(buttonPoint5, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * label_Point1 = lv_label_create(buttonPoint1, NULL);
lv_obj_t * label_Point2 = lv_label_create(buttonPoint2, NULL);
lv_obj_t * label_Point3 = lv_label_create(buttonPoint3, NULL);
lv_obj_t * label_Point4 = lv_label_create(buttonPoint4, NULL);
lv_obj_t * label_Point5 = lv_label_create(buttonPoint5, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *label_Point1 = lv_label_create(buttonPoint1, NULL);
lv_obj_t *label_Point2 = lv_label_create(buttonPoint2, NULL);
lv_obj_t *label_Point3 = lv_label_create(buttonPoint3, NULL);
lv_obj_t *label_Point4 = lv_label_create(buttonPoint4, NULL);
lv_obj_t *label_Point5 = lv_label_create(buttonPoint5, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(label_Point1, leveling_menu.position1);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_manuaLevel.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_manualLevel(void);
@ -30,5 +30,5 @@ extern void lv_clear_manualLevel();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_max_feedrate_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_max_feedrate_settings(void);
extern void lv_clear_max_feedrate_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_motor_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_motor_settings(void);
extern void lv_clear_motor_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

20
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.cpp

@ -34,7 +34,7 @@
static lv_obj_t * scr;
static lv_obj_t * labelV, *buttonV;
static lv_obj_t *labelV, *buttonV;
#define ID_M_X_P 1
#define ID_M_X_N 2
@ -181,7 +181,7 @@ void lv_draw_move_motor(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create an Image button
buttonXI = lv_imgbtn_create(scr, NULL);
buttonXD = lv_imgbtn_create(scr, NULL);
buttonYI = lv_imgbtn_create(scr, NULL);
@ -249,7 +249,7 @@ void lv_draw_move_motor(void) {
lv_obj_set_pos(buttonZD, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonXI, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonXD, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonYI, LV_LAYOUT_OFF);
@ -259,14 +259,14 @@ void lv_draw_move_motor(void) {
lv_btn_set_layout(buttonV, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelXI = lv_label_create(buttonXI, NULL);
lv_obj_t * labelXD = lv_label_create(buttonXD, NULL);
lv_obj_t * labelYI = lv_label_create(buttonYI, NULL);
lv_obj_t * labelYD = lv_label_create(buttonYD, NULL);
lv_obj_t * labelZI = lv_label_create(buttonZI, NULL);
lv_obj_t * labelZD = lv_label_create(buttonZD, NULL);
lv_obj_t *labelXI = lv_label_create(buttonXI, NULL);
lv_obj_t *labelXD = lv_label_create(buttonXD, NULL);
lv_obj_t *labelYI = lv_label_create(buttonYI, NULL);
lv_obj_t *labelYD = lv_label_create(buttonYD, NULL);
lv_obj_t *labelZI = lv_label_create(buttonZI, NULL);
lv_obj_t *labelZD = lv_label_create(buttonZD, NULL);
labelV = lv_label_create(buttonV, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelXI, move_menu.x_add);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_move_motor.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_move_motor(void);
@ -31,5 +31,5 @@ extern void disp_move_dist();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

15
Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.cpp

@ -34,8 +34,9 @@
#include "../../../../MarlinCore.h"
#include "../../../../module/temperature.h"
#include "../../../../gcode/queue.h"
#if ENABLED(POWER_LOSS_RECOVERY)
#include "../../../../../feature/powerloss.h"
#include "../../../../feature/powerloss.h"
#endif
#include "../../../../gcode/gcode.h"
@ -253,15 +254,12 @@ static void set_value_confirm() {
switch (value) {
case PrintAcceleration:
planner.settings.acceleration = atof(key_value);
break;
case RetractAcceleration:
planner.settings.retract_acceleration = atof(key_value);
break;
case TravelAcceleration:
planner.settings.travel_acceleration = atof(key_value);
break;
case XAcceleration:
planner.settings.max_acceleration_mm_per_s2[X_AXIS] = atof(key_value);
@ -293,7 +291,6 @@ static void set_value_confirm() {
case E1MaxFeedRate:
planner.settings.max_feedrate_mm_s[E_AXIS_N(1)] = atof(key_value);
break;
case XJerk:
#if HAS_CLASSIC_JERK
planner.max_jerk[X_AXIS] = atof(key_value);
@ -314,7 +311,6 @@ static void set_value_confirm() {
planner.max_jerk[E_AXIS] = atof(key_value);
#endif
break;
case Xstep:
planner.settings.axis_steps_per_mm[X_AXIS] = atof(key_value);
break;
@ -330,43 +326,36 @@ static void set_value_confirm() {
case E1step:
planner.settings.axis_steps_per_mm[E_AXIS_N(1)] = atof(key_value);
break;
case Xcurrent:
#if AXIS_IS_TMC(X)
current_mA = atoi(key_value);
stepperX.rms_current(current_mA);
#endif
break;
case Ycurrent:
#if AXIS_IS_TMC(Y)
current_mA = atoi(key_value);
stepperY.rms_current(current_mA);
#endif
break;
case Zcurrent:
#if AXIS_IS_TMC(Z)
current_mA = atoi(key_value);
stepperZ.rms_current(current_mA);
#endif
break;
case E0current:
#if AXIS_IS_TMC(E0)
current_mA = atoi(key_value);
stepperE0.rms_current(current_mA);
#endif
break;
case E1current:
#if AXIS_IS_TMC(E1)
current_mA = atoi(key_value);
stepperE1.rms_current(current_mA);
#endif
break;
break;
case pause_pos_x:
gCfgItems.pausePosX = atof(key_value);
update_spi_flash();

4
Marlin/src/lcd/extui/lib/mks_ui/draw_number_key.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_number_key(void);
extern void lv_clear_number_key();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_operation.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_operation(void);
@ -30,5 +30,5 @@ extern void lv_clear_operation();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_message.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_pause_message(const PauseMessage msg);
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_pause_position.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_pause_position(void);
extern void lv_clear_pause_position();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

13
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp

@ -267,7 +267,7 @@ void lv_draw_preHeat(void) {
lv_obj_set_pos(buttonOff, BTN_X_PIXEL * 2 + INTERVAL_V * 3, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonAdd, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonDec, LV_LAYOUT_OFF);
lv_btn_set_layout(buttoType, LV_LAYOUT_OFF);
@ -275,13 +275,12 @@ void lv_draw_preHeat(void) {
lv_btn_set_layout(buttonOff, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);
lv_obj_t * labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t * labelDec = lv_label_create(buttonDec, NULL);
lv_obj_t *labelAdd = lv_label_create(buttonAdd, NULL);
lv_obj_t *labelDec = lv_label_create(buttonDec, NULL);
labelType = lv_label_create(buttoType, NULL);
labelStep = lv_label_create(buttonStep, NULL);
lv_obj_t * labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t * label_Back = lv_label_create(buttonBack, NULL);
lv_obj_t *labelOff = lv_label_create(buttonOff, NULL);
lv_obj_t *label_Back = lv_label_create(buttonBack, NULL);
if (gCfgItems.multiple_language != 0) {
lv_label_set_text(labelAdd, preheat_menu.add);
@ -306,7 +305,6 @@ void lv_draw_preHeat(void) {
}
void disp_temp_type() {
if (uiCfg.curTempType == 0) {
if (uiCfg.curSprayerChoose == 1) {
lv_obj_set_event_cb_mks(buttoType, event_handler, ID_P_TYPE, "bmp_extru2.bin", 0);
@ -331,7 +329,6 @@ void disp_temp_type() {
lv_obj_align(labelType, buttoType, LV_ALIGN_IN_BOTTOM_MID, 0, BUTTON_TEXT_Y_OFFSET);
}
}
}
void disp_desire_temp() {

4
Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_preHeat(void);
@ -33,5 +33,5 @@ extern void disp_desire_temp();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.cpp

@ -305,6 +305,7 @@ void disp_gcode_icon(uint8_t file_num) {
lv_refr_now(lv_refr_get_disp_refreshing());
// Create image buttons
buttonPageUp = lv_imgbtn_create(scr, NULL);
buttonPageDown = lv_imgbtn_create(scr, NULL);
buttonBack = lv_imgbtn_create(scr, NULL);
@ -334,8 +335,7 @@ void disp_gcode_icon(uint8_t file_num) {
lv_obj_set_pos(buttonPageDown, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL + INTERVAL_H);
lv_obj_set_pos(buttonBack, OTHER_BTN_XPIEL * 3 + INTERVAL_V * 4, titleHeight + OTHER_BTN_YPIEL * 2 + INTERVAL_H * 2);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonPageUp, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonPageDown, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonBack, LV_LAYOUT_OFF);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_print_file.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
typedef struct {
@ -61,5 +61,5 @@ extern void lv_clear_print_file();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_printing.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define IDLE 0
@ -48,5 +48,5 @@ extern void setProBarRate();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

10
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp

@ -159,7 +159,7 @@ void lv_draw_ready_print(void) {
//lv_obj_set_pos(title,TITLE_XPOS,TITLE_YPOS);
//lv_label_set_text(title, creat_title_text());
/*Create an Image button*/
// Create image buttons
//buttonPrint = lv_imgbtn_create(scr, NULL);
buttonTool = lv_imgbtn_create(scr, NULL);
//buttonSet = lv_imgbtn_create(scr, NULL);
@ -196,14 +196,14 @@ void lv_draw_ready_print(void) {
//lv_obj_set_pos(buttonSet,BTN_X_PIXEL+SIMPLE_FIRST_PAGE_GRAP*2+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
//lv_obj_set_pos(buttonPrint,BTN_X_PIXEL*2+SIMPLE_FIRST_PAGE_GRAP*3+1,(TFT_HEIGHT-BTN_Y_PIXEL)/2+2);
/*Create a label on the Image button*/
// Create labels on the image buttons
//lv_btn_set_layout(buttonPrint, LV_LAYOUT_OFF);
//lv_btn_set_layout(buttonSet, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonTool, LV_LAYOUT_OFF);
//lv_obj_t * label_print = lv_label_create(buttonPrint, NULL);
//lv_obj_t * label_set = lv_label_create(buttonSet, NULL);
lv_obj_t * label_tool = lv_label_create(buttonTool, NULL);
//lv_obj_t *label_print = lv_label_create(buttonPrint, NULL);
//lv_obj_t *label_set = lv_label_create(buttonSet, NULL);
lv_obj_t *label_tool = lv_label_create(buttonTool, NULL);
if (gCfgItems.multiple_language != 0) {
//lv_label_set_text(label_print, main_menu.print);
//lv_obj_align(label_print, buttonPrint, LV_ALIGN_IN_BOTTOM_MID,0, BUTTON_TEXT_Y_OFFSET);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_ready_print(void);
@ -35,5 +35,5 @@ extern void lv_clear_ready_print();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_set.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_set(void);
@ -30,5 +30,5 @@ extern void lv_clear_set();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_step_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_step_settings(void);
extern void lv_clear_step_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

1
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.cpp

@ -25,6 +25,7 @@
#include "lv_conf.h"
#include "draw_ui.h"
#include "../../../../MarlinCore.h"
#include "../../../../module/planner.h"
#include "../../../../module/stepper/indirection.h"

4
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_current_settings.h

@ -22,13 +22,13 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_tmc_current_settings(void);
extern void lv_clear_tmc_current_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_tmc_step_mode_settings.h

@ -22,12 +22,12 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_tmc_step_mode_settings(void);
extern void lv_clear_tmc_step_mode_settings();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp

@ -140,7 +140,7 @@ void lv_draw_tool(void) {
LV_IMG_DECLARE(bmp_pic);
/*Create an Image button*/
// Create image buttons
buttonPreHeat = lv_imgbtn_create(scr, NULL);
buttonExtrusion = lv_imgbtn_create(scr, NULL);
buttonMove = lv_imgbtn_create(scr, NULL);
@ -210,7 +210,7 @@ void lv_draw_tool(void) {
//lv_obj_set_pos(buttonMore,BTN_X_PIXEL*2+INTERVAL_V*3, BTN_Y_PIXEL+INTERVAL_H+titleHeight);
lv_obj_set_pos(buttonBack, BTN_X_PIXEL * 3 + INTERVAL_V * 4, BTN_Y_PIXEL + INTERVAL_H + titleHeight);
/*Create a label on the Image button*/
// Create labels on the image buttons
lv_btn_set_layout(buttonPreHeat, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonExtrusion, LV_LAYOUT_OFF);
lv_btn_set_layout(buttonMove, LV_LAYOUT_OFF);

4
Marlin/src/lcd/extui/lib/mks_ui/draw_tool.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
extern void lv_draw_tool(void);
@ -30,5 +30,5 @@ extern void lv_clear_tool();
//extern void disp_temp_ready_print();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

2
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h

@ -328,5 +328,5 @@ extern void LV_TASK_HANDLER();
extern void lv_ex_line(lv_obj_t * line, lv_point_t *points);
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h

@ -124,7 +124,7 @@
#define VAR_INF_ADDR 0x000000
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
union union32 {
@ -157,5 +157,5 @@ extern void default_view_Read(uint8_t *default_view_Rbuff, uint32_t default_view
extern void flash_view_Read(uint8_t *flash_view_Rbuff, uint32_t flash_view_Readsize);
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

1
Marlin/src/lcd/extui/lib/mks_ui/printer_operation.cpp

@ -51,6 +51,7 @@ void printer_state_polling() {
if (uiCfg.waitEndMoves > 20) {
uiCfg.waitEndMoves = 0;
planner.synchronize();
gcode.process_subcommands_now_P(PSTR("M25"));
if (gCfgItems.pausePosZ != (float)-1) {
gcode.process_subcommands_now_P(PSTR("G91"));

4
Marlin/src/lcd/extui/lib/mks_ui/printer_operation.h

@ -22,7 +22,7 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#define MIN_FILE_PRINTED 100 //5000
@ -32,5 +32,5 @@ extern void filament_pin_setup();
extern void filament_check();
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

4
Marlin/src/lcd/extui/lib/mks_ui/tft_fsmc.h

@ -22,9 +22,9 @@
#pragma once
#ifdef __cplusplus
extern "C" { /* C-declarations for C++ */
extern "C" { /* C-declarations for C++ */
#endif
#ifdef __cplusplus
} /* C-declarations for C++ */
} /* C-declarations for C++ */
#endif

168
Marlin/src/lcd/tft/st7796s.h

@ -25,92 +25,92 @@
#include "../../inc/MarlinConfig.h"
#define ST7796S_MADCTL_MY 0x80 // Row Address Order
#define ST7796S_MADCTL_MX 0x40 // Column Address Order
#define ST7796S_MADCTL_MV 0x20 // Row/Column Exchange
#define ST7796S_MADCTL_ML 0x10 // Vertical Refresh Order
#define ST7796S_MADCTL_BGR 0x08 // RGB-BGR ORDER
#define ST7796S_MADCTL_RGB 0x00
#define ST7796S_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ST7796S_MADCTL_MY 0x80 // Row Address Order
#define ST7796S_MADCTL_MX 0x40 // Column Address Order
#define ST7796S_MADCTL_MV 0x20 // Row/Column Exchange
#define ST7796S_MADCTL_ML 0x10 // Vertical Refresh Order
#define ST7796S_MADCTL_BGR 0x08 // RGB-BGR ORDER
#define ST7796S_MADCTL_RGB 0x00
#define ST7796S_MADCTL_MH 0x04 // Horizontal Refresh Order
#define ST7796S_COLOR_BGR
#define ST7796S_ORIENTATION ST7796S_MADCTL_MV
#define ST7796S_MADCTL_DATA (ST7796S_ORIENTATION | TERN(ST7796S_COLOR_BGR, ST7796S_MADCTL_BGR, ST7796S_MADCTL_RGB))
#define ST7796S_NOP 0x00 // No Operation
#define ST7796S_SWRESET 0x01 // Software reset
#define ST7796S_RDDID 0x04 // Read Display ID
#define ST7796S_RDNUMED 0x05 // Read Number of the Errors on DSI
#define ST7796S_RDDST 0x09 // Read Display Status
#define ST7796S_RDDPM 0x0A // Read Display Power Mode
#define ST7796S_RDDMADCTL 0x0B // Read Display MADCTL
#define ST7796S_RDDCOLMOD 0x0C // Read Display Pixel Format
#define ST7796S_RDDIM 0x0D // Read Display Image Mode
#define ST7796S_RDDSM 0x0E // Read Display Signal Status
#define ST7796S_RDDSDR 0x0F // Read Display Self-Diagnostic Result
#define ST7796S_SLPIN 0x10 // Sleep In
#define ST7796S_SLPOUT 0x11 // Sleep Out
#define ST7796S_PTLON 0x12 // Partial Display Mode On
#define ST7796S_NORON 0x13 // Normal Display Mode On
#define ST7796S_INVOFF 0x20 // Display Inversion Off
#define ST7796S_INVON 0x21 // Display Inversion On
#define ST7796S_DISPOFF 0x28 // Display Off
#define ST7796S_DISPON 0x29 // Display On
#define ST7796S_CASET 0x2A // Column Address Set
#define ST7796S_RASET 0x2B // Row Address Set
#define ST7796S_RAMWR 0x2C // Memory Write
#define ST7796S_RAMRD 0x2E // Memory Read
#define ST7796S_PTLAR 0x30 // Partial Area
#define ST7796S_VSCRDEF 0x33 // Vertical Scrolling Definition
#define ST7796S_TEOFF 0x34 // Tearing Effect Line OFF
#define ST7796S_TEON 0x35 // Tearing Effect Line On
#define ST7796S_MADCTL 0x36 // Memory Data Access Control
#define ST7796S_VSCSAD 0x37 // Vertical Scroll Start Address of RAM
#define ST7796S_IDMOFF 0x38 // Idle Mode Off
#define ST7796S_IDMON 0x39 // Idle Mode On
#define ST7796S_COLMOD 0x3A // Interface Pixel Format
#define ST7796S_WRMEMC 0x3C // Write Memory Continue
#define ST7796S_RDMEMC 0x3E // Read Memory Continue
#define ST7796S_STE 0x44 // Set Tear ScanLine
#define ST7796S_GSCAN 0x45 // Get ScanLine
#define ST7796S_WRDISBV 0x51 // Write Display Brightness
#define ST7796S_RDDISBV 0x52 // Read Display Brightness Value
#define ST7796S_WRCTRLD 0x53 // Write CTRL Display
#define ST7796S_RDCTRLD 0x54 // Read CTRL value Display
#define ST7796S_WRCABC 0x55 // Write Adaptive Brightness Control
#define ST7796S_RDCABC 0x56 // Read Content Adaptive Brightness Control
#define ST7796S_WRCABCMB 0x5E // Write CABC Minimum Brightness
#define ST7796S_RDCABCMB 0x5F // Read CABC Minimum Brightness
#define ST7796S_RDFCS 0xAA // Read First Checksum
#define ST7796S_RDCFCS 0xAF // Read Continue Checksum
#define ST7796S_RDID1 0xDA // Read ID1
#define ST7796S_RDID2 0xDB // Read ID2
#define ST7796S_RDID3 0xDC // Read ID3
#define ST7796S_IFMODE 0xB0 // Interface Mode Control
#define ST7796S_FRMCTR1 0xB1 // Frame Rate Control (In Normal Mode/Full Colors)
#define ST7796S_FRMCTR2 0xB2 // Frame Rate Control 2 (In Idle Mode/8 colors)
#define ST7796S_FRMCTR3 0xB3 // Frame Rate Control 3(In Partial Mode/Full Colors)
#define ST7796S_DIC 0xB4 // Display Inversion Control
#define ST7796S_BPC 0xB5 // Blanking Porch Control
#define ST7796S_DFC 0xB6 // Display Function Control
#define ST7796S_EM 0xB7 // Entry Mode Set
#define ST7796S_PWR1 0xC0 // Power Control 1
#define ST7796S_PWR2 0xC1 // Power Control 2
#define ST7796S_PWR3 0xC2 // Power Control 3
#define ST7796S_VCMPCTL 0xC5 // VCOM Control
#define ST7796S_VCMOST 0xC6 // VCOM Offset Register
#define ST7796S_NVMADW 0xD0 // NVM Address/Data Write
#define ST7796S_NVMBPROG 0xD1 // NVM Byte Program
#define ST7796S_NVMSTRD 0xD2 // NVM Status Read
#define ST7796S_RDID4 0xD3 // Read ID4
#define ST7796S_PGC 0xE0 // Positive Gamma Control
#define ST7796S_NGC 0xE1 // Negative Gamma Control
#define ST7796S_DGC1 0xE2 // Digital Gamma Control 1
#define ST7796S_DGC2 0xE3 // Digital Gamma Control 2
#define ST7796S_DOCA 0xE8 // Display Output Ctrl Adjust
#define ST7796S_CSCON 0xF0 // Command Set Control
#define ST7796S_SPIRC 0xFB // SPI Read Control
#define ST7796S_ORIENTATION ST7796S_MADCTL_MV
#define ST7796S_MADCTL_DATA (ST7796S_ORIENTATION | TERN(ST7796S_COLOR_BGR, ST7796S_MADCTL_BGR, ST7796S_MADCTL_RGB))
#define ST7796S_NOP 0x00 // No Operation
#define ST7796S_SWRESET 0x01 // Software reset
#define ST7796S_RDDID 0x04 // Read Display ID
#define ST7796S_RDNUMED 0x05 // Read Number of the Errors on DSI
#define ST7796S_RDDST 0x09 // Read Display Status
#define ST7796S_RDDPM 0x0A // Read Display Power Mode
#define ST7796S_RDDMADCTL 0x0B // Read Display MADCTL
#define ST7796S_RDDCOLMOD 0x0C // Read Display Pixel Format
#define ST7796S_RDDIM 0x0D // Read Display Image Mode
#define ST7796S_RDDSM 0x0E // Read Display Signal Status
#define ST7796S_RDDSDR 0x0F // Read Display Self-Diagnostic Result
#define ST7796S_SLPIN 0x10 // Sleep In
#define ST7796S_SLPOUT 0x11 // Sleep Out
#define ST7796S_PTLON 0x12 // Partial Display Mode On
#define ST7796S_NORON 0x13 // Normal Display Mode On
#define ST7796S_INVOFF 0x20 // Display Inversion Off
#define ST7796S_INVON 0x21 // Display Inversion On
#define ST7796S_DISPOFF 0x28 // Display Off
#define ST7796S_DISPON 0x29 // Display On
#define ST7796S_CASET 0x2A // Column Address Set
#define ST7796S_RASET 0x2B // Row Address Set
#define ST7796S_RAMWR 0x2C // Memory Write
#define ST7796S_RAMRD 0x2E // Memory Read
#define ST7796S_PTLAR 0x30 // Partial Area
#define ST7796S_VSCRDEF 0x33 // Vertical Scrolling Definition
#define ST7796S_TEOFF 0x34 // Tearing Effect Line OFF
#define ST7796S_TEON 0x35 // Tearing Effect Line On
#define ST7796S_MADCTL 0x36 // Memory Data Access Control
#define ST7796S_VSCSAD 0x37 // Vertical Scroll Start Address of RAM
#define ST7796S_IDMOFF 0x38 // Idle Mode Off
#define ST7796S_IDMON 0x39 // Idle Mode On
#define ST7796S_COLMOD 0x3A // Interface Pixel Format
#define ST7796S_WRMEMC 0x3C // Write Memory Continue
#define ST7796S_RDMEMC 0x3E // Read Memory Continue
#define ST7796S_STE 0x44 // Set Tear ScanLine
#define ST7796S_GSCAN 0x45 // Get ScanLine
#define ST7796S_WRDISBV 0x51 // Write Display Brightness
#define ST7796S_RDDISBV 0x52 // Read Display Brightness Value
#define ST7796S_WRCTRLD 0x53 // Write CTRL Display
#define ST7796S_RDCTRLD 0x54 // Read CTRL value Display
#define ST7796S_WRCABC 0x55 // Write Adaptive Brightness Control
#define ST7796S_RDCABC 0x56 // Read Content Adaptive Brightness Control
#define ST7796S_WRCABCMB 0x5E // Write CABC Minimum Brightness
#define ST7796S_RDCABCMB 0x5F // Read CABC Minimum Brightness
#define ST7796S_RDFCS 0xAA // Read First Checksum
#define ST7796S_RDCFCS 0xAF // Read Continue Checksum
#define ST7796S_RDID1 0xDA // Read ID1
#define ST7796S_RDID2 0xDB // Read ID2
#define ST7796S_RDID3 0xDC // Read ID3
#define ST7796S_IFMODE 0xB0 // Interface Mode Control
#define ST7796S_FRMCTR1 0xB1 // Frame Rate Control (In Normal Mode/Full Colors)
#define ST7796S_FRMCTR2 0xB2 // Frame Rate Control 2 (In Idle Mode/8 colors)
#define ST7796S_FRMCTR3 0xB3 // Frame Rate Control 3(In Partial Mode/Full Colors)
#define ST7796S_DIC 0xB4 // Display Inversion Control
#define ST7796S_BPC 0xB5 // Blanking Porch Control
#define ST7796S_DFC 0xB6 // Display Function Control
#define ST7796S_EM 0xB7 // Entry Mode Set
#define ST7796S_PWR1 0xC0 // Power Control 1
#define ST7796S_PWR2 0xC1 // Power Control 2
#define ST7796S_PWR3 0xC2 // Power Control 3
#define ST7796S_VCMPCTL 0xC5 // VCOM Control
#define ST7796S_VCMOST 0xC6 // VCOM Offset Register
#define ST7796S_NVMADW 0xD0 // NVM Address/Data Write
#define ST7796S_NVMBPROG 0xD1 // NVM Byte Program
#define ST7796S_NVMSTRD 0xD2 // NVM Status Read
#define ST7796S_RDID4 0xD3 // Read ID4
#define ST7796S_PGC 0xE0 // Positive Gamma Control
#define ST7796S_NGC 0xE1 // Negative Gamma Control
#define ST7796S_DGC1 0xE2 // Digital Gamma Control 1
#define ST7796S_DGC2 0xE3 // Digital Gamma Control 2
#define ST7796S_DOCA 0xE8 // Display Output Ctrl Adjust
#define ST7796S_CSCON 0xF0 // Command Set Control
#define ST7796S_SPIRC 0xFB // SPI Read Control
static const uint16_t st7796s_init[] = {
DATASIZE_8BIT,

20
Marlin/src/pins/pins.h

@ -498,10 +498,10 @@
#include "stm32f1/pins_STM3R_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_PRO_VB)
#include "stm32f1/pins_GTM32_PRO_VB.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI_A30)
#include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI)
#include "stm32f1/pins_GTM32_MINI.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_MINI_A30)
#include "stm32f1/pins_GTM32_MINI_A30.h" // STM32F1 env:STM32F103RE
#elif MB(GTM32_REV_B)
#include "stm32f1/pins_GTM32_REV_B.h" // STM32F1 env:STM32F103RE
#elif MB(MORPHEUS)
@ -518,6 +518,14 @@
#include "stm32f1/pins_MKS_ROBIN_NANO_V2.h" // STM32F1 env:mks_robin_nano35
#elif MB(MKS_ROBIN_LITE)
#include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
#elif MB(MKS_ROBIN_LITE3)
#include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
#elif MB(MKS_ROBIN_PRO)
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
#elif MB(MKS_ROBIN_E3)
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
#elif MB(MKS_ROBIN_E3D)
#include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
#elif MB(BTT_SKR_MINI_V1_1)
#include "stm32f1/pins_BTT_SKR_MINI_V1_1.h" // STM32F1 env:STM32F103RC_btt env:STM32F103RC_btt_512K env:STM32F103RC_btt_USB env:STM32F103RC_btt_512K_USB
#elif MB(BTT_SKR_MINI_E3_V1_0)
@ -538,14 +546,6 @@
#include "stm32f1/pins_FYSETC_CHEETAH_V12.h" // STM32F1 env:STM32F103RC_fysetc
#elif MB(LONGER3D_LK)
#include "stm32f1/pins_LONGER3D_LK.h" // STM32F1 env:STM32F103VE_longer
#elif MB(MKS_ROBIN_LITE3)
#include "stm32f1/pins_MKS_ROBIN_LITE3.h" // STM32F1 env:mks_robin_lite3
#elif MB(MKS_ROBIN_PRO)
#include "stm32f1/pins_MKS_ROBIN_PRO.h" // STM32F1 env:mks_robin_pro
#elif MB(MKS_ROBIN_E3D)
#include "stm32f1/pins_MKS_ROBIN_E3D.h" // STM32F1 env:mks_robin_e3
#elif MB(MKS_ROBIN_E3)
#include "stm32f1/pins_MKS_ROBIN_E3.h" // STM32F1 env:mks_robin_e3
#elif MB(CCROBOT_MEEB_3DP)
#include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb
#elif MB(CHITU3D_V5)

Loading…
Cancel
Save