Skip to content

Commit 3933ccf

Browse files
authored
Merge pull request #3584 from LMESTM/dev_stm32_common_peripheralpins
STM32: make PeripheralPins.h a common file
2 parents cc8a132 + 1a4394a commit 3933ccf

File tree

9 files changed

+16
-571
lines changed

9 files changed

+16
-571
lines changed

targets/TARGET_STM/TARGET_STM32F0/PeripheralPins.h renamed to targets/TARGET_STM/PeripheralPins.h

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,39 +35,48 @@
3535
#include "PeripheralNames.h"
3636

3737
//*** ADC ***
38-
38+
#ifdef DEVICE_ANALOGIN
3939
extern const PinMap PinMap_ADC[];
40+
#endif
4041

4142
//*** DAC ***
42-
43+
#ifdef DEVICE_ANALOGOUT
4344
extern const PinMap PinMap_DAC[];
45+
#endif
4446

4547
//*** I2C ***
46-
48+
#if DEVICE_I2C
4749
extern const PinMap PinMap_I2C_SDA[];
4850
extern const PinMap PinMap_I2C_SCL[];
51+
#endif
4952

5053
//*** PWM ***
51-
54+
#if DEVICE_PWMOUT
5255
extern const PinMap PinMap_PWM[];
56+
#endif
5357

5458
//*** SERIAL ***
55-
59+
#ifdef DEVICE_SERIAL
5660
extern const PinMap PinMap_UART_TX[];
5761
extern const PinMap PinMap_UART_RX[];
62+
#ifdef DEVICE_SERIAL_FC
5863
extern const PinMap PinMap_UART_RTS[];
5964
extern const PinMap PinMap_UART_CTS[];
65+
#endif
66+
#endif
6067

6168
//*** SPI ***
62-
69+
#ifdef DEVICE_SPI
6370
extern const PinMap PinMap_SPI_MOSI[];
6471
extern const PinMap PinMap_SPI_MISO[];
6572
extern const PinMap PinMap_SPI_SCLK[];
6673
extern const PinMap PinMap_SPI_SSEL[];
74+
#endif
6775

6876
//*** CAN ***
69-
77+
#ifdef DEVICE_CAN
7078
extern const PinMap PinMap_CAN_RD[];
7179
extern const PinMap PinMap_CAN_TD[];
80+
#endif
7281

7382
#endif

targets/TARGET_STM/TARGET_STM32F1/PeripheralPins.h

Lines changed: 0 additions & 69 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32F2/PeripheralPins.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32F3/PeripheralPins.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

targets/TARGET_STM/TARGET_STM32F4/PeripheralPins.h

Lines changed: 0 additions & 72 deletions
This file was deleted.

0 commit comments

Comments
 (0)