Skip to content

Commit 68d2a4f

Browse files
committed
stm32f4 template defines E407 green led
1 parent a4907af commit 68d2a4f

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

ilg.gnuarmeclipse.templates.stm/templates/stm32f4xx_exe_c_project/src/main-retarget.c

+14-1
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,26 @@ SysTick_Handler(void);
5858

5959
/* ----- LED definitions --------------------------------------------------- */
6060

61-
/* STM32F4DISCOVERY definitions (the GREEN LED) */
6261
/* Adjust them for your own board. */
6362

63+
#if defined(BOARD_OLIMEX_STM32_E407)
64+
65+
/* STM32-E407 definitions (the GREEN LED) */
66+
67+
#define BLINK_PORT GPIOC
68+
#define BLINK_PIN 13
69+
#define BLINK_RCC_BIT RCC_AHB1Periph_GPIOC
70+
71+
#else
72+
73+
/* STM32F4DISCOVERY definitions (the GREEN LED) */
74+
6475
#define BLINK_PORT GPIOD
6576
#define BLINK_PIN 12
6677
#define BLINK_RCC_BIT RCC_AHB1Periph_GPIOD
6778

79+
#endif
80+
6881
#define BLINK_TICKS SYSTICK_FREQUENCY_HZ/2
6982

7083
// ----------------------------------------------------------------------------

ilg.gnuarmeclipse.templates.stm/templates/stm32f4xx_exe_c_project/src/main-semihosting.c

+14-1
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,26 @@ SysTick_Handler(void);
5656

5757
/* ----- LED definitions --------------------------------------------------- */
5858

59-
/* STM32F4DISCOVERY definitions (the GREEN LED) */
6059
/* Adjust them for your own board. */
6160

61+
#if defined(BOARD_OLIMEX_STM32_E407)
62+
63+
/* STM32-E407 definitions (the GREEN LED) */
64+
65+
#define BLINK_PORT GPIOC
66+
#define BLINK_PIN 13
67+
#define BLINK_RCC_BIT RCC_AHB1Periph_GPIOC
68+
69+
#else
70+
71+
/* STM32F4DISCOVERY definitions (the GREEN LED) */
72+
6273
#define BLINK_PORT GPIOD
6374
#define BLINK_PIN 12
6475
#define BLINK_RCC_BIT RCC_AHB1Periph_GPIOD
6576

77+
#endif
78+
6679
#define BLINK_TICKS SYSTICK_FREQUENCY_HZ/2
6780

6881
// ----------------------------------------------------------------------------

ilg.gnuarmeclipse.templates.stm/templates/stm32f4xx_exe_c_project/src/main-standalone.c

+14-1
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,26 @@ SysTick_Handler(void);
4949

5050
/* ----- LED definitions --------------------------------------------------- */
5151

52-
/* STM32F4DISCOVERY definitions (the GREEN LED) */
5352
/* Adjust them for your own board. */
5453

54+
#if defined(BOARD_OLIMEX_STM32_E407)
55+
56+
/* STM32-E407 definitions (the GREEN LED) */
57+
58+
#define BLINK_PORT GPIOC
59+
#define BLINK_PIN 13
60+
#define BLINK_RCC_BIT RCC_AHB1Periph_GPIOC
61+
62+
#else
63+
64+
/* STM32F4DISCOVERY definitions (the GREEN LED) */
65+
5566
#define BLINK_PORT GPIOD
5667
#define BLINK_PIN 12
5768
#define BLINK_RCC_BIT RCC_AHB1Periph_GPIOD
5869

70+
#endif
71+
5972
#define BLINK_TICKS SYSTICK_FREQUENCY_HZ/2
6073

6174
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)