Browse Source

Don't include STM32 Core code when compiling STM32 Generic (#12575)

mr-miky 5 years ago
parent
commit
11c7945365

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL.cpp View File

@@ -21,7 +21,8 @@
21 21
  *
22 22
  */
23 23
 
24
-#ifdef ARDUINO_ARCH_STM32
24
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
25
+
25 26
 
26 27
 // --------------------------------------------------------------------------
27 28
 // Includes

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL_Servo_STM32.cpp View File

@@ -20,7 +20,8 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
+
24 25
 
25 26
 #include "../../inc/MarlinConfig.h"
26 27
 

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp View File

@@ -20,7 +20,8 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24
+
24 25
 
25 26
 // --------------------------------------------------------------------------
26 27
 // Includes

+ 2
- 1
Marlin/src/HAL/HAL_STM32/HAL_timers_STM32.cpp View File

@@ -19,7 +19,8 @@
19 19
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
20 20
  *
21 21
  */
22
-#ifdef ARDUINO_ARCH_STM32
22
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
23
+
23 24
 
24 25
 // --------------------------------------------------------------------------
25 26
 // Includes

+ 1
- 1
Marlin/src/HAL/HAL_STM32/fastio_STM32.cpp View File

@@ -20,7 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24 24
 
25 25
 #include "../../inc/MarlinConfig.h"
26 26
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32/persistent_store_impl.cpp View File

@@ -20,7 +20,7 @@
20 20
  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 21
  *
22 22
  */
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24 24
 
25 25
 #include "../../inc/MarlinConfig.h"
26 26
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32/watchdog_STM32.cpp View File

@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23
-#ifdef ARDUINO_ARCH_STM32
23
+#if defined(ARDUINO_ARCH_STM32) && !defined(STM32GENERIC)
24 24
 
25 25
 #include "../../inc/MarlinConfig.h"
26 26
 

+ 1
- 1
Marlin/src/HAL/HAL_STM32F4/EEPROM_Emul/eeprom_emul.cpp View File

@@ -47,7 +47,7 @@
47 47
 /** @addtogroup EEPROM_Emulation
48 48
   * @{
49 49
   */
50
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
50
+#if defined(STM32GENERIC) && (defined(STM32F4))
51 51
 
52 52
 /* Includes ------------------------------------------------------------------*/
53 53
 #include "eeprom_emul.h"

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/EmulatedEeprom.cpp View File

@@ -17,7 +17,7 @@
17 17
  *
18 18
  */
19 19
 
20
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
20
+#if defined(STM32GENERIC) && (defined(STM32F4))
21 21
 
22 22
 /**
23 23
  * Description: functions for I2C connected external EEPROM.
@@ -139,4 +139,4 @@ void eeprom_update_block(const void *__src, void *__dst, size_t __n) {
139 139
 }
140 140
 
141 141
 #endif // ENABLED(EEPROM_SETTINGS) && DISABLED(I2C_EEPROM) && DISABLED(SPI_EEPROM)
142
-#endif // STM32F4 || STM32F4xx
142
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL.cpp View File

@@ -21,7 +21,7 @@
21 21
  *
22 22
  */
23 23
 
24
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
24
+#if defined(STM32GENERIC) && defined(STM32F4)
25 25
 
26 26
 // --------------------------------------------------------------------------
27 27
 // Includes
@@ -130,4 +130,4 @@ uint16_t HAL_adc_get_result(void) {
130 130
   return HAL_adc_result;
131 131
 }
132 132
 
133
-#endif // STM32F4 || STM32F4xx
133
+#endif // // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL_Servo_STM32F4.cpp View File

@@ -21,7 +21,7 @@
21 21
  *
22 22
  */
23 23
 
24
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
24
+#if defined(STM32GENERIC) && defined(STM32F4)
25 25
 
26 26
 #include "../../inc/MarlinConfig.h"
27 27
 
@@ -50,4 +50,4 @@ void libServo::move(const int value) {
50 50
 }
51 51
 #endif // HAS_SERVOS
52 52
 
53
-#endif // STM32F4 || STM32F4xx
53
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL_spi_STM32F4.cpp View File

@@ -30,7 +30,7 @@
30 30
  * Adapted to the STM32F4 HAL
31 31
  */
32 32
 
33
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
33
+#if defined(STM32GENERIC) && defined(STM32F4)
34 34
 
35 35
 // --------------------------------------------------------------------------
36 36
 // Includes
@@ -173,4 +173,4 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
173 173
 
174 174
 #endif // SOFTWARE_SPI
175 175
 
176
-#endif // STM32F4 || STM32F4xx
176
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/HAL_timers_STM32F4.cpp View File

@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
23
+#if defined(STM32GENERIC) && defined(STM32F4)
24 24
 
25 25
 // --------------------------------------------------------------------------
26 26
 // Includes
@@ -156,4 +156,4 @@ bool HAL_timer_interrupt_enabled(const uint8_t timer_num) {
156 156
   return false;
157 157
 }
158 158
 
159
-#endif // STM32F4 || STM32F4xx
159
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/persistent_store_eeprom.cpp View File

@@ -21,7 +21,7 @@
21 21
  *
22 22
  */
23 23
 
24
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
24
+#if defined(STM32GENERIC) && defined(STM32F4)
25 25
 
26 26
 #include "../shared/persistent_store_api.h"
27 27
 
@@ -66,4 +66,4 @@ bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t
66 66
 size_t PersistentStore::capacity() { return E2END + 1; }
67 67
 
68 68
 #endif // EEPROM_SETTINGS
69
-#endif // STM32F4 || STM32F4xx
69
+#endif // STM32GENERIC && STM32F4

+ 2
- 2
Marlin/src/HAL/HAL_STM32F4/watchdog_STM32F4.cpp View File

@@ -20,7 +20,7 @@
20 20
  *
21 21
  */
22 22
 
23
-#if defined(STM32GENERIC) && (defined(STM32F4) || defined(STM32F4xx))
23
+#if defined(STM32GENERIC) && defined(STM32F4)
24 24
 
25 25
 #include "../../inc/MarlinConfig.h"
26 26
 
@@ -54,4 +54,4 @@
54 54
 
55 55
 #endif // USE_WATCHDOG
56 56
 
57
-#endif // STM32F4 || STM32F4xx
57
+#endif // STM32GENERIC && STM32F4

Loading…
Cancel
Save