Skip to content

Commit 26df0c1

Browse files
committed
STM32 : default SPI anbd I2C for targets with ARDUINO-NANO
1 parent 94c7463 commit 26df0c1

File tree

3 files changed

+23
-0
lines changed
  • targets/TARGET_STM
    • TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8
    • TARGET_STM32G0/TARGET_STM32G031x8/TARGET_NUCLEO_G031K8
    • TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC

3 files changed

+23
-0
lines changed

targets/TARGET_STM/TARGET_STM32F3/TARGET_STM32F303x8/TARGET_NUCLEO_F303K8/PinNames.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ typedef enum {
134134
// Standardized LED and button names
135135
#define LED1 PB_3
136136

137+
#define I2C_SDA D4
138+
#define I2C_SCL D5
139+
140+
#define SPI_SCK D10
141+
#define SPI_MOSI D11
142+
#define SPI_MISO D12
143+
#define SPI_CS D13
144+
137145
#ifdef __cplusplus
138146
}
139147
#endif

targets/TARGET_STM/TARGET_STM32G0/TARGET_STM32G031x8/TARGET_NUCLEO_G031K8/PinNames.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,13 @@ typedef enum {
141141
// Standardized LED and button names
142142
#define LED1 PC_6 // LD3 [Green]
143143

144+
#define I2C_SDA D4
145+
#define I2C_SCL D5
146+
147+
#define SPI_SCK D10
148+
#define SPI_MOSI D11
149+
#define SPI_MISO D12
150+
#define SPI_CS D13
144151

145152
#ifdef __cplusplus
146153
}

targets/TARGET_STM/TARGET_STM32L4/TARGET_STM32L432xC/TARGET_NUCLEO_L432KC/PinNames.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,14 @@ typedef enum {
134134

135135
#define LED1 PB_3 // LD3 [Green]
136136

137+
#define I2C_SDA D4
138+
#define I2C_SCL D5
139+
140+
#define SPI_SCK D10
141+
#define SPI_MOSI D11
142+
#define SPI_MISO D12
143+
#define SPI_CS D13
144+
137145
#ifdef __cplusplus
138146
}
139147
#endif

0 commit comments

Comments
 (0)