Przeglądaj źródła

🏗️ Define HAL_STM32 for HAL/STM32 (#22537)

Scott Lahteine 3 lat temu
rodzic
commit
76c10b3e02
No account linked to committer's email address

+ 4
- 2
Marlin/src/HAL/STM32/HAL.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "HAL.h"
27
 #include "HAL.h"
26
 #include "usb_serial.h"
28
 #include "usb_serial.h"
165
   if (systick_user_callback) systick_user_callback();
167
   if (systick_user_callback) systick_user_callback();
166
 }
168
 }
167
 
169
 
168
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
170
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/HAL_MinSerial.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfigPre.h"
27
 #include "../../inc/MarlinConfigPre.h"
26
 
28
 
149
 #endif
151
 #endif
150
 
152
 
151
 #endif // POSTMORTEM_DEBUGGING
153
 #endif // POSTMORTEM_DEBUGGING
152
-#endif // ARDUINO_ARCH_STM32
154
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/HAL_SPI.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfig.h"
27
 #include "../../inc/MarlinConfig.h"
26
 
28
 
224
 
226
 
225
 #endif // SOFTWARE_SPI
227
 #endif // SOFTWARE_SPI
226
 
228
 
227
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
229
+#endif // HAL_STM32

+ 2
- 2
Marlin/src/HAL/STM32/MarlinSPI.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1) && !defined(STM32H7xx)
22
+#if defined(HAL_STM32) && !defined(STM32H7xx)
23
 
23
 
24
 #include "MarlinSPI.h"
24
 #include "MarlinSPI.h"
25
 
25
 
165
   return 1;
165
   return 1;
166
 }
166
 }
167
 
167
 
168
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1 && !STM32H7xx
168
+#endif // HAL_STM32 && !STM32H7xx

+ 4
- 2
Marlin/src/HAL/STM32/MarlinSerial.cpp Wyświetl plik

16
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17
  *
17
  *
18
  */
18
  */
19
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
19
+#include "../platforms.h"
20
+
21
+#ifdef HAL_STM32
20
 
22
 
21
 #include "../../inc/MarlinConfig.h"
23
 #include "../../inc/MarlinConfig.h"
22
 #include "MarlinSerial.h"
24
 #include "MarlinSerial.h"
101
   }
103
   }
102
 }
104
 }
103
 
105
 
104
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
106
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/Sd2Card_sdio_stm32duino.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
25
 
27
 
320
 extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); }
322
 extern "C" void DMA_IRQ_HANDLER(void) { HAL_DMA_IRQHandler(&hdma_sdio); }
321
 
323
 
322
 #endif // SDIO_SUPPORT
324
 #endif // SDIO_SUPPORT
323
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
325
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/Servo.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfig.h"
27
 #include "../../inc/MarlinConfig.h"
26
 
28
 
107
 }
109
 }
108
 
110
 
109
 #endif // HAS_SERVOS
111
 #endif // HAS_SERVOS
110
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
112
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/eeprom_flash.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfig.h"
27
 #include "../../inc/MarlinConfig.h"
26
 
28
 
272
 }
274
 }
273
 
275
 
274
 #endif // FLASH_EEPROM_EMULATION
276
 #endif // FLASH_EEPROM_EMULATION
275
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
277
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/eeprom_sdcard.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 /**
26
 /**
25
  * Implementation of EEPROM settings in SD Card
27
  * Implementation of EEPROM settings in SD Card
88
 }
90
 }
89
 
91
 
90
 #endif // SDCARD_EEPROM_EMULATION
92
 #endif // SDCARD_EEPROM_EMULATION
91
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
93
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/eeprom_sram.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfig.h"
27
 #include "../../inc/MarlinConfig.h"
26
 
28
 
65
 }
67
 }
66
 
68
 
67
 #endif // SRAM_EEPROM_EMULATION
69
 #endif // SRAM_EEPROM_EMULATION
68
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
70
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/eeprom_wired.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfig.h"
27
 #include "../../inc/MarlinConfig.h"
26
 
28
 
75
 }
77
 }
76
 
78
 
77
 #endif // USE_WIRED_EEPROM
79
 #endif // USE_WIRED_EEPROM
78
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
80
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/fast_pwm.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../inc/MarlinConfigPre.h"
26
 #include "../../inc/MarlinConfigPre.h"
25
 
27
 
56
 }
58
 }
57
 
59
 
58
 #endif // NEEDS_HARDWARE_PWM
60
 #endif // NEEDS_HARDWARE_PWM
59
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
61
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/fastio.cpp Wyświetl plik

20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
21
  *
21
  *
22
  */
22
  */
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
23
+#include "../platforms.h"
24
+
25
+#ifdef HAL_STM32
24
 
26
 
25
 #include "../../inc/MarlinConfig.h"
27
 #include "../../inc/MarlinConfig.h"
26
 
28
 
31
     FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i]));
33
     FastIOPortMap[STM_PORT(digitalPin[i])] = get_GPIO_Port(STM_PORT(digitalPin[i]));
32
 }
34
 }
33
 
35
 
34
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
36
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/msc_sd.cpp Wyświetl plik

13
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
13
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
14
  *
14
  *
15
  */
15
  */
16
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
16
+#include "../platforms.h"
17
+
18
+#ifdef HAL_STM32
17
 
19
 
18
 #include "../../inc/MarlinConfigPre.h"
20
 #include "../../inc/MarlinConfigPre.h"
19
 
21
 
125
 }
127
 }
126
 
128
 
127
 #endif // HAS_SD_HOST_DRIVE
129
 #endif // HAS_SD_HOST_DRIVE
128
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
130
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/tft/gt911.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../../inc/MarlinConfig.h"
26
 #include "../../../inc/MarlinConfig.h"
25
 
27
 
199
 }
201
 }
200
 
202
 
201
 #endif // TFT_TOUCH_DEVICE_GT911
203
 #endif // TFT_TOUCH_DEVICE_GT911
202
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
204
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/tft/tft_fsmc.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../../inc/MarlinConfig.h"
26
 #include "../../../inc/MarlinConfig.h"
25
 
27
 
178
 }
180
 }
179
 
181
 
180
 #endif // HAS_FSMC_TFT
182
 #endif // HAS_FSMC_TFT
181
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
183
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/tft/tft_ltdc.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../../inc/MarlinConfig.h"
26
 #include "../../../inc/MarlinConfig.h"
25
 
27
 
384
 }
386
 }
385
 
387
 
386
 #endif // HAS_LTDC_TFT
388
 #endif // HAS_LTDC_TFT
387
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
389
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/tft/tft_spi.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../../inc/MarlinConfig.h"
26
 #include "../../../inc/MarlinConfig.h"
25
 
27
 
240
 }
242
 }
241
 
243
 
242
 #endif // HAS_SPI_TFT
244
 #endif // HAS_SPI_TFT
243
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
245
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/tft/xpt2046.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../../inc/MarlinConfig.h"
26
 #include "../../../inc/MarlinConfig.h"
25
 
27
 
167
 }
169
 }
168
 
170
 
169
 #endif // HAS_TFT_XPT2046
171
 #endif // HAS_TFT_XPT2046
170
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
172
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/timers.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
25
 
27
 
319
 // when hovering over it, making it easy to identify the conflicting timers.
321
 // when hovering over it, making it easy to identify the conflicting timers.
320
 static_assert(verify_no_timer_conflicts(), "One or more timer conflict detected. Examine \"timers_in_use\" to help identify conflict.");
322
 static_assert(verify_no_timer_conflicts(), "One or more timer conflict detected. Examine \"timers_in_use\" to help identify conflict.");
321
 
323
 
322
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
324
+#endif // HAL_STM32

+ 3
- 2
Marlin/src/HAL/STM32/usb_host.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
+#include "../platforms.h"
22
 
23
 
23
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
24
+#ifdef HAL_STM32
24
 
25
 
25
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
26
 
27
 
114
 }
115
 }
115
 
116
 
116
 #endif // USE_OTG_USB_HOST && USBHOST
117
 #endif // USE_OTG_USB_HOST && USBHOST
117
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
118
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/usb_serial.cpp Wyświetl plik

16
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
16
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17
  *
17
  *
18
  */
18
  */
19
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
19
+#include "../platforms.h"
20
+
21
+#ifdef HAL_STM32
20
 
22
 
21
 #include "../../inc/MarlinConfigPre.h"
23
 #include "../../inc/MarlinConfigPre.h"
22
 
24
 
51
 }
53
 }
52
 
54
 
53
 #endif // EMERGENCY_PARSER && USBD_USE_CDC
55
 #endif // EMERGENCY_PARSER && USBD_USE_CDC
54
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
56
+#endif // HAL_STM32

+ 4
- 2
Marlin/src/HAL/STM32/watchdog.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../inc/MarlinConfigPre.h"
26
 #include "../../inc/MarlinConfigPre.h"
25
 
27
 
46
 }
48
 }
47
 
49
 
48
 #endif // USE_WATCHDOG
50
 #endif // USE_WATCHDOG
49
-#endif // ARDUINO_ARCH_STM32 && !STM32GENERIC && !MAPLE_STM32F1
51
+#endif // HAL_STM32

+ 3
- 0
Marlin/src/HAL/platforms.h Wyświetl plik

38
 #elif defined(__STM32F1__) || defined(TARGET_STM32F1)
38
 #elif defined(__STM32F1__) || defined(TARGET_STM32F1)
39
   #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32F1/NAME)
39
   #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32F1/NAME)
40
 #elif defined(ARDUINO_ARCH_STM32)
40
 #elif defined(ARDUINO_ARCH_STM32)
41
+  #ifndef HAL_STM32
42
+    #define HAL_STM32
43
+  #endif
41
   #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32/NAME)
44
   #define HAL_PATH(PATH, NAME) XSTR(PATH/STM32/NAME)
42
 #elif defined(ARDUINO_ARCH_ESP32)
45
 #elif defined(ARDUINO_ARCH_ESP32)
43
   #define HAL_PATH(PATH, NAME) XSTR(PATH/ESP32/NAME)
46
   #define HAL_PATH(PATH, NAME) XSTR(PATH/ESP32/NAME)

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/compat.h Wyświetl plik

288
 
288
 
289
   // Remove compiler warning on an unused variable
289
   // Remove compiler warning on an unused variable
290
   #ifndef UNUSED
290
   #ifndef UNUSED
291
-    #if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
291
+    #ifdef HAL_STM32
292
       #define UNUSED(X) (void)X
292
       #define UNUSED(X) (void)X
293
     #else
293
     #else
294
       #define UNUSED(x) ((void)(x))
294
       #define UNUSED(x) ((void)(x))

+ 4
- 2
Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.cpp Wyświetl plik

19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
19
  * along with this program.  If not, see <https://www.gnu.org/licenses/>.
20
  *
20
  *
21
  */
21
  */
22
-#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC) && !defined(MAPLE_STM32F1)
22
+#include "../../../HAL/platforms.h"
23
+
24
+#ifdef HAL_STM32
23
 
25
 
24
 #include "../../../inc/MarlinConfigPre.h"
26
 #include "../../../inc/MarlinConfigPre.h"
25
 
27
 
349
 }
351
 }
350
 
352
 
351
 #endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE
353
 #endif // HAS_TFT_LVGL_UI && MKS_WIFI_MODULE
352
-#endif // !__STM32F1__
354
+#endif // HAL_STM32

+ 1
- 1
ini/features.ini Wyświetl plik

31
 NEOPIXEL_LED                           = adafruit/Adafruit NeoPixel@~1.8.0
31
 NEOPIXEL_LED                           = adafruit/Adafruit NeoPixel@~1.8.0
32
                                          src_filter=+<src/feature/leds/neopixel.cpp>
32
                                          src_filter=+<src/feature/leds/neopixel.cpp>
33
 I2C_AMMETER                            = peterus/INA226Lib@1.1.2
33
 I2C_AMMETER                            = peterus/INA226Lib@1.1.2
34
-USES_LIQUIDCRYSTAL                     = fmalpartida/LiquidCrystal@1.5.0
34
+USES_LIQUIDCRYSTAL                     = LiquidCrystal=https://github.com/MarlinFirmware/New-LiquidCrystal/archive/1.5.1.zip
35
 USES_LIQUIDCRYSTAL_I2C                 = marcoschwartz/LiquidCrystal_I2C@1.1.4
35
 USES_LIQUIDCRYSTAL_I2C                 = marcoschwartz/LiquidCrystal_I2C@1.1.4
36
 USES_LIQUIDTWI2                        = LiquidTWI2@1.2.7
36
 USES_LIQUIDTWI2                        = LiquidTWI2@1.2.7
37
 HAS_WIRED_LCD                          = src_filter=+<src/lcd/lcdprint.cpp>
37
 HAS_WIRED_LCD                          = src_filter=+<src/lcd/lcdprint.cpp>

+ 1
- 1
ini/stm32-common.ini Wyświetl plik

13
 platform         = ststm32@~12.1
13
 platform         = ststm32@~12.1
14
 board_build.core = stm32
14
 board_build.core = stm32
15
 build_flags      = ${common.build_flags}
15
 build_flags      = ${common.build_flags}
16
-                   -std=gnu++14
16
+                   -std=gnu++14 -DHAL_STM32
17
                    -DUSBCON -DUSBD_USE_CDC
17
                    -DUSBCON -DUSBD_USE_CDC
18
                    -DTIM_IRQ_PRIO=13
18
                    -DTIM_IRQ_PRIO=13
19
                    -DADC_RESOLUTION=12
19
                    -DADC_RESOLUTION=12

+ 1
- 1
ini/stm32f0.ini Wyświetl plik

10
 # Naming Example: STM32F070CBT6
10
 # Naming Example: STM32F070CBT6
11
 #
11
 #
12
 #   F : Foundation
12
 #   F : Foundation
13
-#   0 : Cortex M0 core
13
+#   0 : Cortex M0 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
14
 #  70 : Line/Features
14
 #  70 : Line/Features
15
 #   C : 48 pins  (R:64 or 66, F:20)
15
 #   C : 48 pins  (R:64 or 66, F:20)
16
 #   B : 128KB Flash-memory  (C:256KB, D:384KB, E:512KB, G:1024KB)
16
 #   B : 128KB Flash-memory  (C:256KB, D:384KB, E:512KB, G:1024KB)

+ 1
- 1
ini/stm32f1-maple.ini Wyświetl plik

10
 # Naming Example: STM32F103RCT6
10
 # Naming Example: STM32F103RCT6
11
 #
11
 #
12
 #   F : Foundation (sometimes High Performance F2/F4)
12
 #   F : Foundation (sometimes High Performance F2/F4)
13
-#   1 : Cortex M1 core
13
+#   1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
14
 #  03 : Line/Features
14
 #  03 : Line/Features
15
 #   R : 64 or 66 pins  (V:100, Z:144, I:176)
15
 #   R : 64 or 66 pins  (V:100, Z:144, I:176)
16
 #   C : 256KB Flash-memory  (D:384KB, E:512KB, G:1024KB)
16
 #   C : 256KB Flash-memory  (D:384KB, E:512KB, G:1024KB)

+ 1
- 1
ini/stm32f1.ini Wyświetl plik

10
 # Naming Example: STM32F103RCT6
10
 # Naming Example: STM32F103RCT6
11
 #
11
 #
12
 #   F : Foundation (sometimes High Performance F2/F4)
12
 #   F : Foundation (sometimes High Performance F2/F4)
13
-#   1 : Cortex M3 core
13
+#   1 : Cortex M3 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
14
 #  03 : Line/Features
14
 #  03 : Line/Features
15
 #   R : 64 or 66 pins  (T:36, C:48, V:100, Z:144, I:176)
15
 #   R : 64 or 66 pins  (T:36, C:48, V:100, Z:144, I:176)
16
 #   C : 256KB Flash-memory  (B: 128KB, D:384KB, E:512KB, G:1024KB)
16
 #   C : 256KB Flash-memory  (B: 128KB, D:384KB, E:512KB, G:1024KB)

+ 1
- 1
ini/stm32f4.ini Wyświetl plik

10
 # Naming Example: STM32F401RGT6
10
 # Naming Example: STM32F401RGT6
11
 #
11
 #
12
 #   F : Foundation (sometimes High Performance F2/F4)
12
 #   F : Foundation (sometimes High Performance F2/F4)
13
-#   4 : Cortex M4 core
13
+#   4 : Cortex M4 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
14
 #  01 : Line/Features
14
 #  01 : Line/Features
15
 #   R : 64 or 66 pins  (T:36, C:48 or 49, M:81, V:100, Z:144, I:176)
15
 #   R : 64 or 66 pins  (T:36, C:48 or 49, M:81, V:100, Z:144, I:176)
16
 #   G : 1024KB Flash-memory  (B:128KB, C:256KB, D:384KB, E:512KB)
16
 #   G : 1024KB Flash-memory  (B:128KB, C:256KB, D:384KB, E:512KB)

+ 1
- 1
ini/stm32f7.ini Wyświetl plik

10
 # Naming Example: STM32F767ZIT6
10
 # Naming Example: STM32F767ZIT6
11
 #
11
 #
12
 #   F : Foundation (sometimes High Performance F2/F4)
12
 #   F : Foundation (sometimes High Performance F2/F4)
13
-#   7 : Cortex M7 core
13
+#   7 : Cortex M7 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
14
 #  67 : Line/Features
14
 #  67 : Line/Features
15
 #   Z : 144 pins
15
 #   Z : 144 pins
16
 #   I : 4096KB Flash-memory
16
 #   I : 4096KB Flash-memory

+ 1
- 1
ini/stm32h7.ini Wyświetl plik

10
 # Naming Example: STM32H743IIT6
10
 # Naming Example: STM32H743IIT6
11
 #
11
 #
12
 #   H : High Performance
12
 #   H : High Performance
13
-#   7 : Cortex M7 core
13
+#   7 : Cortex M7 core (0:M0, 1-2:M3, 3-4:M4, 7:M7)
14
 #  43 : Line/Features
14
 #  43 : Line/Features
15
 #   I : 176 pins
15
 #   I : 176 pins
16
 #   I : 2048KB Flash-memory
16
 #   I : 2048KB Flash-memory

Ładowanie…
Anuluj
Zapisz