Skip to content

Commit 7e62759

Browse files
committed
STM32: enable PinMap_GPIO table
1 parent 016d725 commit 7e62759

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

targets/TARGET_STM/PeripheralPins.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
#include "pinmap.h"
3535
#include "PeripheralNames.h"
3636

37+
//*** GPIO ***
38+
#if GPIO_PINMAP_READY
39+
/* If this macro is defined, then PinMap_GPIO is present in PeripheralPins.c */
40+
extern const PinMap PinMap_GPIO[];
41+
#endif
42+
3743
//*** ADC ***
3844
#if DEVICE_ANALOGIN
3945
extern const PinMap PinMap_ADC[];

targets/TARGET_STM/gpio_api.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "pinmap.h"
3333
#include "mbed_error.h"
3434
#include "pin_device.h"
35+
#include "PeripheralPins.h"
3536

3637
extern const uint32_t ll_pin_defines[16];
3738

@@ -186,3 +187,10 @@ inline void gpio_dir(gpio_t *obj, PinDirection direction)
186187
#endif /* DUAL_CORE */
187188
}
188189

190+
#if GPIO_PINMAP_READY
191+
/* If this macro is defined, then PinMap_GPIO is present in PeripheralPins.c */
192+
const PinMap *gpio_pinmap()
193+
{
194+
return PinMap_GPIO;
195+
}
196+
#endif

0 commit comments

Comments
 (0)