Bladeren bron

Use board-specific or platform SPI pins in HAL_STM32 (#12323)

Karl Andersson 6 jaren geleden
bovenliggende
commit
176654791e
3 gewijzigde bestanden met toevoegingen van 5 en 17 verwijderingen
  1. 1
    5
      Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp
  2. 4
    4
      Marlin/src/HAL/HAL_STM32/spi_pins.h
  3. 0
    8
      Marlin/src/pins/pins_ARMED.h

+ 1
- 5
Marlin/src/HAL/HAL_STM32/HAL_spi_STM32.cpp Bestand weergeven

@@ -26,11 +26,7 @@
26 26
 // Includes
27 27
 // --------------------------------------------------------------------------
28 28
 
29
-#include "HAL.h"
30
-#include "../shared/HAL_SPI.h"
31
-#include "pins_arduino.h"
32
-#include "spi_pins.h"
33
-#include "../../core/macros.h"
29
+#include "../../inc/MarlinConfig.h"
34 30
 
35 31
 #include <SPI.h>
36 32
 

+ 4
- 4
Marlin/src/HAL/HAL_STM32/spi_pins.h Bestand weergeven

@@ -22,14 +22,14 @@
22 22
  * Define SPI Pins: SCK, MISO, MOSI, SS
23 23
  */
24 24
 #ifndef SCK_PIN
25
-  #define SCK_PIN   13
25
+  #define SCK_PIN   PIN_SPI_SCK
26 26
 #endif
27 27
 #ifndef MISO_PIN
28
-  #define MISO_PIN  12
28
+  #define MISO_PIN  PIN_SPI_MISO
29 29
 #endif
30 30
 #ifndef MOSI_PIN
31
-  #define MOSI_PIN  11
31
+  #define MOSI_PIN  PIN_SPI_MOSI
32 32
 #endif
33 33
 #ifndef SS_PIN
34
-  #define SS_PIN    14
34
+  #define SS_PIN    PIN_SPI_SS
35 35
 #endif

+ 0
- 8
Marlin/src/pins/pins_ARMED.h Bestand weergeven

@@ -105,13 +105,6 @@
105 105
 #endif
106 106
 
107 107
 //
108
-// SPI
109
-//
110
-#define SCK_PIN            PA5
111
-#define MISO_PIN           PA6
112
-#define MOSI_PIN           PA7
113
-
114
-//
115 108
 // Temperature Sensors
116 109
 //
117 110
 #define TEMP_0_PIN         PC0   // Analog Input
@@ -133,7 +126,6 @@
133 126
 // Misc functions
134 127
 //
135 128
 #define SDSS               PE7
136
-#define SS_PIN             PE7
137 129
 #define LED_PIN            PB7   // Heart beat
138 130
 #define PS_ON_PIN          PA10
139 131
 #define KILL_PIN           PA8

Laden…
Annuleren
Opslaan