Skip to content

Commit 3a854a4

Browse files
committed
Updated STM32L4xx HAL Drivers to v1.8.1
Included in STM32CubeL4 FW V1.10.0 Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 9cb48d3 commit 3a854a4

Some content is hidden

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

55 files changed

+3077
-3081
lines changed

system/Drivers/STM32L4xx_HAL_Driver/Inc/Legacy/stm32_hal_legacy.h

+223-221
Large diffs are not rendered by default.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc.h

+269-275
Large diffs are not rendered by default.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_adc_ex.h

+110-248
Large diffs are not rendered by default.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_def.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,14 @@ typedef enum
8383
} while(0)
8484

8585
#define UNUSED(x) ((void)(x))
86-
86+
8787
/** @brief Reset the Handle's State field.
8888
* @param __HANDLE__: specifies the Peripheral Handle.
89-
* @note This macro can be used for the following purpose:
89+
* @note This macro can be used for the following purpose:
9090
* - When the Handle is declared as local variable; before passing it as parameter
91-
* to HAL_PPP_Init() for the first time, it is mandatory to use this macro
91+
* to HAL_PPP_Init() for the first time, it is mandatory to use this macro
9292
* to set to 0 the Handle's "State" field.
93-
* Otherwise, "State" field may have any random value and the first time the function
93+
* Otherwise, "State" field may have any random value and the first time the function
9494
* HAL_PPP_Init() is called, the low level hardware initialization will be missed
9595
* (i.e. HAL_PPP_MspInit() will not be executed).
9696
* - When there is a need to reconfigure the low level hardware: instead of calling
@@ -123,7 +123,7 @@ typedef enum
123123
}while (0)
124124
#endif /* USE_RTOS */
125125

126-
#if defined ( __GNUC__ )
126+
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
127127
#ifndef __weak
128128
#define __weak __attribute__((weak))
129129
#endif /* __weak */
@@ -134,7 +134,7 @@ typedef enum
134134

135135

136136
/* Macro to get variable aligned on 4-bytes, for __ICCARM__ the directive "#pragma data_alignment=4" must be used instead */
137-
#if defined (__GNUC__) /* GNU Compiler */
137+
#if defined ( __GNUC__ ) && !defined (__CC_ARM) /* GNU Compiler */
138138
#ifndef __ALIGN_END
139139
#define __ALIGN_END __attribute__ ((aligned (4)))
140140
#endif /* __ALIGN_END */
@@ -186,14 +186,14 @@ typedef enum
186186

187187
#endif
188188

189-
/**
189+
/**
190190
* @brief __NOINLINE definition
191-
*/
191+
*/
192192
#if defined ( __CC_ARM ) || defined ( __GNUC__ )
193-
/* ARM & GNUCompiler
194-
----------------
193+
/* ARM & GNUCompiler
194+
----------------
195195
*/
196-
#define __NOINLINE __attribute__ ( (noinline) )
196+
#define __NOINLINE __attribute__ ( (noinline) )
197197

198198
#elif defined ( __ICCARM__ )
199199
/* ICCARM Compiler

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dfsdm.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,13 @@ typedef struct
501501
*/
502502

503503
/** @brief Reset DFSDM channel handle state.
504-
* @param __HANDLE__: DFSDM channel handle.
504+
* @param __HANDLE__ DFSDM channel handle.
505505
* @retval None
506506
*/
507507
#define __HAL_DFSDM_CHANNEL_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_CHANNEL_STATE_RESET)
508508

509509
/** @brief Reset DFSDM filter handle state.
510-
* @param __HANDLE__: DFSDM filter handle.
510+
* @param __HANDLE__ DFSDM filter handle.
511511
* @retval None
512512
*/
513513
#define __HAL_DFSDM_FILTER_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_DFSDM_FILTER_STATE_RESET)

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_dsi.h

+385-330
Large diffs are not rendered by default.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_gfxmmu.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@
4141
extern "C" {
4242
#endif
4343

44-
#if defined(GFXMMU)
4544
/* Includes ------------------------------------------------------------------*/
4645
#include "stm32l4xx_hal_def.h"
4746

47+
#if defined(GFXMMU)
48+
4849
/** @addtogroup STM32L4xx_HAL_Driver
4950
* @{
5051
*/
@@ -195,7 +196,7 @@ typedef struct
195196
*/
196197

197198
/** @brief Reset GFXMMU handle state.
198-
* @param __HANDLE__: GFXMMU handle.
199+
* @param __HANDLE__ GFXMMU handle.
199200
* @retval None
200201
*/
201202
#define __HAL_GFXMMU_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_GFXMMU_STATE_RESET)

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_i2c.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -335,9 +335,9 @@ typedef struct __I2C_HandleTypeDef
335335
* @{
336336
*/
337337
#define I2C_NO_STARTSTOP (0x00000000U)
338-
#define I2C_GENERATE_STOP I2C_CR2_STOP
339-
#define I2C_GENERATE_START_READ (uint32_t)(I2C_CR2_START | I2C_CR2_RD_WRN)
340-
#define I2C_GENERATE_START_WRITE I2C_CR2_START
338+
#define I2C_GENERATE_STOP (uint32_t)(0x80000000U | I2C_CR2_STOP)
339+
#define I2C_GENERATE_START_READ (uint32_t)(0x80000000U | I2C_CR2_START | I2C_CR2_RD_WRN)
340+
#define I2C_GENERATE_START_WRITE (uint32_t)(0x80000000U | I2C_CR2_START)
341341
/**
342342
* @}
343343
*/

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_ospi.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
extern "C" {
4242
#endif
4343

44-
#if defined(OCTOSPI) || defined(OCTOSPI1) || defined(OCTOSPI2)
45-
4644
/* Includes ------------------------------------------------------------------*/
4745
#include "stm32l4xx_hal_def.h"
4846

47+
#if defined(OCTOSPI) || defined(OCTOSPI1) || defined(OCTOSPI2)
48+
4949
/** @addtogroup STM32L4xx_HAL_Driver
5050
* @{
5151
*/
@@ -697,7 +697,7 @@ typedef struct
697697
* @arg HAL_OSPI_FLAG_TE: OSPI Transfer error flag
698698
* @retval None
699699
*/
700-
#define __HAL_OSPI_GET_FLAG(__HANDLE__, __FLAG__) (READ_BIT((__HANDLE__)->Instance->SR, (__FLAG__)) != 0)
700+
#define __HAL_OSPI_GET_FLAG(__HANDLE__, __FLAG__) ((READ_BIT((__HANDLE__)->Instance->SR, (__FLAG__)) != 0) ? SET : RESET)
701701

702702
/** @brief Clears the specified OSPI's flag status.
703703
* @param __HANDLE__: specifies the OSPI Handle.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_qspi.h

+11-11
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,11 @@
4141
extern "C" {
4242
#endif
4343

44-
#if defined(QUADSPI) || defined(QUADSPI1) || defined(QUADSPI2)
45-
4644
/* Includes ------------------------------------------------------------------*/
4745
#include "stm32l4xx_hal_def.h"
4846

47+
#if defined(QUADSPI) || defined(QUADSPI1) || defined(QUADSPI2)
48+
4949
/** @addtogroup STM32L4xx_HAL_Driver
5050
* @{
5151
*/
@@ -204,10 +204,10 @@ typedef struct
204204
/** @defgroup QSPI_ErrorCode QSPI Error Code
205205
* @{
206206
*/
207-
#define HAL_QSPI_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
208-
#define HAL_QSPI_ERROR_TIMEOUT ((uint32_t)0x00000001) /*!< Timeout error */
209-
#define HAL_QSPI_ERROR_TRANSFER ((uint32_t)0x00000002) /*!< Transfer error */
210-
#define HAL_QSPI_ERROR_DMA ((uint32_t)0x00000004) /*!< DMA transfer error */
207+
#define HAL_QSPI_ERROR_NONE ((uint32_t)0x00000000) /*!< No error */
208+
#define HAL_QSPI_ERROR_TIMEOUT ((uint32_t)0x00000001) /*!< Timeout error */
209+
#define HAL_QSPI_ERROR_TRANSFER ((uint32_t)0x00000002) /*!< Transfer error */
210+
#define HAL_QSPI_ERROR_DMA ((uint32_t)0x00000004) /*!< DMA transfer error */
211211
#define HAL_QSPI_ERROR_INVALID_PARAM ((uint32_t)0x00000008) /*!< Invalid parameters error */
212212
/**
213213
* @}
@@ -324,7 +324,7 @@ typedef struct
324324
/** @defgroup QSPI_DataMode QSPI Data Mode
325325
* @{
326326
*/
327-
#define QSPI_DATA_NONE ((uint32_t)0X00000000) /*!<No data*/
327+
#define QSPI_DATA_NONE ((uint32_t)0X00000000) /*!<No data*/
328328
#define QSPI_DATA_1_LINE ((uint32_t)QUADSPI_CCR_DMODE_0) /*!<Data on a single line*/
329329
#define QSPI_DATA_2_LINES ((uint32_t)QUADSPI_CCR_DMODE_1) /*!<Data on two lines*/
330330
#define QSPI_DATA_4_LINES ((uint32_t)QUADSPI_CCR_DMODE) /*!<Data on four lines*/
@@ -431,19 +431,19 @@ typedef struct
431431
* @{
432432
*/
433433
/** @brief Reset QSPI handle state.
434-
* @param __HANDLE__: QSPI handle.
434+
* @param __HANDLE__ : QSPI handle.
435435
* @retval None
436436
*/
437437
#define __HAL_QSPI_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_QSPI_STATE_RESET)
438438

439439
/** @brief Enable the QSPI peripheral.
440-
* @param __HANDLE__: specifies the QSPI Handle.
440+
* @param __HANDLE__ : specifies the QSPI Handle.
441441
* @retval None
442442
*/
443443
#define __HAL_QSPI_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)
444444

445445
/** @brief Disable the QSPI peripheral.
446-
* @param __HANDLE__: specifies the QSPI Handle.
446+
* @param __HANDLE__ : specifies the QSPI Handle.
447447
* @retval None
448448
*/
449449
#define __HAL_QSPI_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CR, QUADSPI_CR_EN)
@@ -501,7 +501,7 @@ typedef struct
501501
* @arg QSPI_FLAG_TE: QSPI Transfer error flag
502502
* @retval None
503503
*/
504-
#define __HAL_QSPI_GET_FLAG(__HANDLE__, __FLAG__) (READ_BIT((__HANDLE__)->Instance->SR, (__FLAG__)) != 0)
504+
#define __HAL_QSPI_GET_FLAG(__HANDLE__, __FLAG__) ((READ_BIT((__HANDLE__)->Instance->SR, (__FLAG__)) != 0) ? SET : RESET)
505505

506506
/** @brief Clears the specified QSPI's flag status.
507507
* @param __HANDLE__: specifies the QSPI Handle.

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal_rcc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ typedef struct
16421642

16431643
#define __HAL_RCC_GPIOA_IS_CLK_ENABLED() (READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_GPIOAEN) != RESET)
16441644

1645-
#define __HAL_RCC_GPIOB_IS_CLK_ENABLED() (READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_GPIOCEN) != RESET)
1645+
#define __HAL_RCC_GPIOB_IS_CLK_ENABLED() (READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_GPIOBEN) != RESET)
16461646

16471647
#define __HAL_RCC_GPIOC_IS_CLK_ENABLED() (READ_BIT(RCC->AHB2ENR, RCC_AHB2ENR_GPIOCEN) != RESET)
16481648

0 commit comments

Comments
 (0)