瀏覽代碼

STM32F1xx support for TFTGLCD (#20515)

Serhiy-K 4 年之前
父節點
當前提交
0b3b4da7d0
沒有連結到貢獻者的電子郵件帳戶。

+ 6
- 0
Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp 查看文件

972
 
972
 
973
       MeshFlags done_flags{0};
973
       MeshFlags done_flags{0};
974
       const xy_int8_t &lpos = location.pos;
974
       const xy_int8_t &lpos = location.pos;
975
+
976
+      #if IS_TFTGLCD_PANEL
977
+        lcd_mesh_edit_setup(0);                             // Change current screen before calling ui.ubl_plot
978
+        safe_delay(50);
979
+      #endif
980
+
975
       do {
981
       do {
976
         location = find_closest_mesh_point_of_type(SET_IN_BITMAP, pos, false, &done_flags);
982
         location = find_closest_mesh_point_of_type(SET_IN_BITMAP, pos, false, &done_flags);
977
 
983
 

+ 6
- 6
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp 查看文件

32
  * and supports color output.
32
  * and supports color output.
33
  */
33
  */
34
 
34
 
35
-#if NONE(__AVR__, TARGET_LPC1768, __STM32F1__, STM32F4xx)
35
+#if NONE(__AVR__, TARGET_LPC1768, STM32F1, STM32F4xx)
36
   #warning "Selected platform not yet tested. Please contribute your good pin mappings."
36
   #warning "Selected platform not yet tested. Please contribute your good pin mappings."
37
 #endif
37
 #endif
38
 
38
 
129
 #if ANY(__AVR__, TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
129
 #if ANY(__AVR__, TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
130
   #define SPI_SEND_ONE(V) SPI.transfer(V);
130
   #define SPI_SEND_ONE(V) SPI.transfer(V);
131
   #define SPI_SEND_TWO(V) SPI.transfer16(V);
131
   #define SPI_SEND_TWO(V) SPI.transfer16(V);
132
-#elif defined(STM32F4xx)
132
+#elif EITHER(STM32F4xx, STM32F1xx)
133
   #define SPI_SEND_ONE(V) SPI.transfer(V, SPI_CONTINUE);
133
   #define SPI_SEND_ONE(V) SPI.transfer(V, SPI_CONTINUE);
134
   #define SPI_SEND_TWO(V) SPI.transfer16(V, SPI_CONTINUE);
134
   #define SPI_SEND_TWO(V) SPI.transfer16(V, SPI_CONTINUE);
135
 #elif defined(ARDUINO_ARCH_ESP32)
135
 #elif defined(ARDUINO_ARCH_ESP32)
139
 
139
 
140
 #if ANY(__AVR__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
140
 #if ANY(__AVR__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
141
   #define SPI_SEND_SOME(V,L,Z)  SPI.transfer(&V[Z], L);
141
   #define SPI_SEND_SOME(V,L,Z)  SPI.transfer(&V[Z], L);
142
-#elif defined(STM32F4xx)
142
+#elif EITHER(STM32F4xx, STM32F1xx)
143
   #define SPI_SEND_SOME(V,L,Z)  SPI.transfer(&V[Z], L, SPI_CONTINUE);
143
   #define SPI_SEND_SOME(V,L,Z)  SPI.transfer(&V[Z], L, SPI_CONTINUE);
144
 #elif ANY(TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_ESP32)
144
 #elif ANY(TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_ESP32)
145
   #define SPI_SEND_SOME(V,L,Z)  do{ for (uint16_t i = 0; i < L; i++) SPI_SEND_ONE(V[(Z)+i]); }while(0)
145
   #define SPI_SEND_SOME(V,L,Z)  do{ for (uint16_t i = 0; i < L; i++) SPI_SEND_ONE(V[(Z)+i]); }while(0)
276
     Wire.endTransmission();
276
     Wire.endTransmission();
277
     #ifdef __AVR__
277
     #ifdef __AVR__
278
       Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 2, 0, 0, 1);
278
       Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 2, 0, 0, 1);
279
-    #elif defined(__STM32F1__)
279
+    #elif defined(STM32F1)
280
       Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, (uint8_t)2);
280
       Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, (uint8_t)2);
281
     #elif EITHER(STM32F4xx, TARGET_LPC1768)
281
     #elif EITHER(STM32F4xx, TARGET_LPC1768)
282
       Wire.requestFrom(LCD_I2C_ADDRESS, 2);
282
       Wire.requestFrom(LCD_I2C_ADDRESS, 2);
330
     Wire.endTransmission(); // send buffer
330
     Wire.endTransmission(); // send buffer
331
     #ifdef __AVR__
331
     #ifdef __AVR__
332
       Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 1, 0, 0, 1);
332
       Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 1, 0, 0, 1);
333
-    #elif ANY(__STM32F1__, STM32F4xx, TARGET_LPC1768)
333
+    #elif ANY(STM32F1, STM32F4xx, TARGET_LPC1768)
334
       Wire.requestFrom(LCD_I2C_ADDRESS, 1);
334
       Wire.requestFrom(LCD_I2C_ADDRESS, 1);
335
     #endif
335
     #endif
336
     t = (uint8_t)Wire.read();
336
     t = (uint8_t)Wire.read();
626
 | ttc  ttc   %       | ttc - current temperature
626
 | ttc  ttc   %       | ttc - current temperature
627
 | tts  tts  %%%      | tts - setted temperature, %%% - percent for FAN
627
 | tts  tts  %%%      | tts - setted temperature, %%% - percent for FAN
628
 | ICO  ICO  ICO  ICO | ICO - icon 48x48, placed in 2 text lines
628
 | ICO  ICO  ICO  ICO | ICO - icon 48x48, placed in 2 text lines
629
-| ICO  ICO  ICO  ICO | ICO /
629
+| ICO  ICO  ICO  ICO | ICO
630
 
630
 
631
 or
631
 or
632
 
632
 

+ 2
- 1
Marlin/src/pins/stm32f1/pins_MORPHEUS.h 查看文件

30
  * MORPHEUS Board pin assignments
30
  * MORPHEUS Board pin assignments
31
  */
31
  */
32
 
32
 
33
-#if NOT_TARGET(__STM32F1__)
33
+#if NOT_TARGET(__STM32F1__, STM32F1xx)
34
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
34
   #error "Oops! Select an STM32F1 board in 'Tools > Board.'"
35
 #endif
35
 #endif
36
 
36
 
90
 #define LED_PIN                             PC13
90
 #define LED_PIN                             PC13
91
 #define SDSS                                PA3
91
 #define SDSS                                PA3
92
 #define TFTGLCD_CS                          PA4
92
 #define TFTGLCD_CS                          PA4
93
+#define SD_DETECT_PIN                       PC14

Loading…
取消
儲存