Skip to content

Commit 3c3b17d

Browse files
committed
STM32F4 restructuration for better maintenance
1 parent 92cdcfb commit 3c3b17d

File tree

444 files changed

+745
-48594
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

444 files changed

+745
-48594
lines changed

targets/TARGET_STM/TARGET_STM32F4/TARGET_STM32F401xC/device/stm32f4xx.h renamed to targets/TARGET_STM/TARGET_STM32F4/STM32Cube_FW/CMSIS/stm32f4xx.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
* is using in the C source code, usually in main.c. This file contains:
99
* - Configuration section that allows to select:
1010
* - The STM32F4xx device used in the target application
11-
* - To use or not the peripheral's drivers in application code(i.e.
12-
* code will be based on direct access to peripheral's registers
11+
* - To use or not the peripherals drivers in application code(i.e.
12+
* code will be based on direct access to peripherals registers
1313
* rather than drivers API), this option is controlled by
1414
* "#define USE_HAL_DRIVER"
1515
*
@@ -88,7 +88,7 @@
8888
STM32F439NI, STM32F429IG and STM32F429II Devices */
8989
/* #define STM32F439xx */ /*!< STM32F439VG, STM32F439VI, STM32F439ZG, STM32F439ZI, STM32F439BG, STM32F439BI, STM32F439NG,
9090
STM32F439NI, STM32F439IG and STM32F439II Devices */
91-
#define STM32F401xC /*!< STM32F401CB, STM32F401CC, STM32F401RB, STM32F401RC, STM32F401VB and STM32F401VC Devices */
91+
/* #define STM32F401xC */ /*!< STM32F401CB, STM32F401CC, STM32F401RB, STM32F401RC, STM32F401VB and STM32F401VC Devices */
9292
/* #define STM32F401xE */ /*!< STM32F401CD, STM32F401RD, STM32F401VD, STM32F401CE, STM32F401RE and STM32F401VE Devices */
9393
/* #define STM32F410Tx */ /*!< STM32F410T8 and STM32F410TB Devices */
9494
/* #define STM32F410Cx */ /*!< STM32F410C8 and STM32F410CB Devices */
@@ -118,15 +118,15 @@
118118
In this case, these drivers will not be included and the application code will
119119
be based on direct access to peripherals registers
120120
*/
121-
#define USE_HAL_DRIVER
121+
/*#define USE_HAL_DRIVER */
122122
#endif /* USE_HAL_DRIVER */
123123

124124
/**
125-
* @brief CMSIS version number V2.6.2
125+
* @brief CMSIS version number V2.6.3
126126
*/
127127
#define __STM32F4xx_CMSIS_VERSION_MAIN (0x02U) /*!< [31:24] main version */
128128
#define __STM32F4xx_CMSIS_VERSION_SUB1 (0x06U) /*!< [23:16] sub1 version */
129-
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x02U) /*!< [15:8] sub2 version */
129+
#define __STM32F4xx_CMSIS_VERSION_SUB2 (0x03U) /*!< [15:8] sub2 version */
130130
#define __STM32F4xx_CMSIS_VERSION_RC (0x00U) /*!< [7:0] release candidate */
131131
#define __STM32F4xx_CMSIS_VERSION ((__STM32F4xx_CMSIS_VERSION_MAIN << 24)\
132132
|(__STM32F4xx_CMSIS_VERSION_SUB1 << 16)\
@@ -211,10 +211,10 @@ typedef enum
211211
} FunctionalState;
212212
#define IS_FUNCTIONAL_STATE(STATE) (((STATE) == DISABLE) || ((STATE) == ENABLE))
213213

214-
typedef enum
214+
typedef enum
215215
{
216-
ERROR = 0U,
217-
SUCCESS = !ERROR
216+
SUCCESS = 0U,
217+
ERROR = !SUCCESS
218218
} ErrorStatus;
219219

220220
/**

targets/TARGET_STM/TARGET_STM32F4/TARGET_MTB_MTS_DRAGONFLY/device/stm32f4xx.h

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

targets/TARGET_STM/TARGET_STM32F4/TARGET_MTB_MTS_DRAGONFLY/device/system_clock.c renamed to targets/TARGET_STM/TARGET_STM32F4/TARGET_MTB_MTS_DRAGONFLY/system_clock.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ void SystemInit(void)
6767
{
6868
/* FPU settings ------------------------------------------------------------*/
6969
#if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
70-
SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
70+
SCB->CPACR |= ((3UL << 10 * 2) | (3UL << 11 * 2)); /* set CP10 and CP11 Full Access */
7171
#endif
7272
/* Reset the RCC clock configuration to the default reset state ------------*/
7373
/* Set HSION bit */
@@ -123,7 +123,7 @@ void SetSysClock(void)
123123
{
124124
/* 3- If fail start with HSI clock */
125125
if (SetSysClock_PLL_HSI() == 0) {
126-
while(1) {
126+
while (1) {
127127
// [TODO] Put something here to tell the user that a problem occured...
128128
}
129129
}

targets/TARGET_STM/TARGET_STM32F4/TARGET_MTS_DRAGONFLY_F411RE/device/us_ticker_data.h renamed to targets/TARGET_STM/TARGET_STM32F4/TARGET_MTB_MTS_DRAGONFLY/us_ticker_data.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717
#define __US_TICKER_DATA_H
1818

1919
#ifdef __cplusplus
20-
extern "C" {
20+
extern "C" {
2121
#endif
2222

2323
#include "stm32f4xx.h"
2424
#include "stm32f4xx_ll_tim.h"
2525
#include "cmsis_nvic.h"
26-
26+
2727
#define TIM_MST TIM5
2828
#define TIM_MST_IRQ TIM5_IRQn
2929
#define TIM_MST_RCC __HAL_RCC_TIM5_CLK_ENABLE()

0 commit comments

Comments
 (0)