|
@@ -101,11 +101,24 @@ extern "C" {
|
101
|
101
|
#endif
|
102
|
102
|
|
103
|
103
|
// Override default Arduino configuration
|
|
104
|
+
|
104
|
105
|
// SPI Definitions
|
105
|
|
-#define PIN_SPI_SS PA4
|
106
|
|
-#define PIN_SPI_MOSI PA7
|
107
|
|
-#define PIN_SPI_MISO PA6
|
108
|
|
-#define PIN_SPI_SCK PA5
|
|
106
|
+#if DEFAULT_SPI == 3
|
|
107
|
+ #define PIN_SPI_SS PA15
|
|
108
|
+ #define PIN_SPI_MOSI PB3
|
|
109
|
+ #define PIN_SPI_MISO PB4
|
|
110
|
+ #define PIN_SPI_SCK PB5
|
|
111
|
+#elif DEFAULT_SPI == 2
|
|
112
|
+ #define PIN_SPI_SS PB12
|
|
113
|
+ #define PIN_SPI_MOSI PB13
|
|
114
|
+ #define PIN_SPI_MISO PB14
|
|
115
|
+ #define PIN_SPI_SCK PB15
|
|
116
|
+#else
|
|
117
|
+ #define PIN_SPI_SS PA4
|
|
118
|
+ #define PIN_SPI_MOSI PA7
|
|
119
|
+ #define PIN_SPI_MISO PA6
|
|
120
|
+ #define PIN_SPI_SCK PA5
|
|
121
|
+#endif
|
109
|
122
|
|
110
|
123
|
// I2C Definitions
|
111
|
124
|
#define PIN_WIRE_SDA PB7
|
|
@@ -118,6 +131,7 @@ extern "C" {
|
118
|
131
|
#ifndef TIMER_SERVO
|
119
|
132
|
#define TIMER_SERVO TIM2
|
120
|
133
|
#endif
|
|
134
|
+
|
121
|
135
|
// UART Definitions
|
122
|
136
|
// Define here Serial instance number to map on Serial generic name
|
123
|
137
|
#define SERIAL_UART_INSTANCE 1
|
|
@@ -126,7 +140,7 @@ extern "C" {
|
126
|
140
|
#define PIN_SERIAL_RX PA10
|
127
|
141
|
#define PIN_SERIAL_TX PA9
|
128
|
142
|
|
129
|
|
-/* Extra HAL modules */
|
|
143
|
+// Extra HAL modules
|
130
|
144
|
#if defined(STM32F103xE) || defined(STM32F103xG)
|
131
|
145
|
#define HAL_DAC_MODULE_ENABLED
|
132
|
146
|
#endif
|