STM32F1xx support for TFTGLCD (#20515)

2.0.x
Serhiy-K 4 years ago committed by GitHub
parent a0c8d348a0
commit 0b3b4da7d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -972,6 +972,12 @@
MeshFlags done_flags{0};
const xy_int8_t &lpos = location.pos;
#if IS_TFTGLCD_PANEL
lcd_mesh_edit_setup(0); // Change current screen before calling ui.ubl_plot
safe_delay(50);
#endif
do {
location = find_closest_mesh_point_of_type(SET_IN_BITMAP, pos, false, &done_flags);

@ -32,7 +32,7 @@
* and supports color output.
*/
#if NONE(__AVR__, TARGET_LPC1768, __STM32F1__, STM32F4xx)
#if NONE(__AVR__, TARGET_LPC1768, STM32F1, STM32F4xx)
#warning "Selected platform not yet tested. Please contribute your good pin mappings."
#endif
@ -129,7 +129,7 @@ static uint8_t PanelDetected = 0;
#if ANY(__AVR__, TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
#define SPI_SEND_ONE(V) SPI.transfer(V);
#define SPI_SEND_TWO(V) SPI.transfer16(V);
#elif defined(STM32F4xx)
#elif EITHER(STM32F4xx, STM32F1xx)
#define SPI_SEND_ONE(V) SPI.transfer(V, SPI_CONTINUE);
#define SPI_SEND_TWO(V) SPI.transfer16(V, SPI_CONTINUE);
#elif defined(ARDUINO_ARCH_ESP32)
@ -139,7 +139,7 @@ static uint8_t PanelDetected = 0;
#if ANY(__AVR__, ARDUINO_ARCH_SAM, __SAMD51__, __MK20DX256__, __MK64FX512__)
#define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L);
#elif defined(STM32F4xx)
#elif EITHER(STM32F4xx, STM32F1xx)
#define SPI_SEND_SOME(V,L,Z) SPI.transfer(&V[Z], L, SPI_CONTINUE);
#elif ANY(TARGET_LPC1768, __STM32F1__, ARDUINO_ARCH_ESP32)
#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,7 +276,7 @@ uint8_t MarlinUI::read_slow_buttons(void) {
Wire.endTransmission();
#ifdef __AVR__
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 2, 0, 0, 1);
#elif defined(__STM32F1__)
#elif defined(STM32F1)
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, (uint8_t)2);
#elif EITHER(STM32F4xx, TARGET_LPC1768)
Wire.requestFrom(LCD_I2C_ADDRESS, 2);
@ -330,7 +330,7 @@ void MarlinUI::init_lcd() {
Wire.endTransmission(); // send buffer
#ifdef __AVR__
Wire.requestFrom((uint8_t)LCD_I2C_ADDRESS, 1, 0, 0, 1);
#elif ANY(__STM32F1__, STM32F4xx, TARGET_LPC1768)
#elif ANY(STM32F1, STM32F4xx, TARGET_LPC1768)
Wire.requestFrom(LCD_I2C_ADDRESS, 1);
#endif
t = (uint8_t)Wire.read();
@ -626,7 +626,7 @@ Equal to 20x10 text LCD
| ttc ttc % | ttc - current temperature
| tts tts %%% | tts - setted temperature, %%% - percent for FAN
| ICO ICO ICO ICO | ICO - icon 48x48, placed in 2 text lines
| ICO ICO ICO ICO | ICO /
| ICO ICO ICO ICO | ICO
or

@ -30,7 +30,7 @@
* MORPHEUS Board pin assignments
*/
#if NOT_TARGET(__STM32F1__)
#if NOT_TARGET(__STM32F1__, STM32F1xx)
#error "Oops! Select an STM32F1 board in 'Tools > Board.'"
#endif
@ -90,3 +90,4 @@
#define LED_PIN PC13
#define SDSS PA3
#define TFTGLCD_CS PA4
#define SD_DETECT_PIN PC14

Loading…
Cancel
Save