Skip to content

Commit 1b3ad22

Browse files
committed
system(wl) update STM32WLxx HAL Drivers to v1.4.0
Included in STM32CubeWL FW v1.4.0 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 3da9a1b commit 1b3ad22

File tree

132 files changed

+5446
-4462
lines changed

Some content is hidden

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

132 files changed

+5446
-4462
lines changed

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

Lines changed: 478 additions & 68 deletions
Large diffs are not rendered by default.

system/Drivers/STM32WLxx_HAL_Driver/Inc/stm32_assert_template.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#define __STM32_ASSERT_H
2424

2525
#ifdef __cplusplus
26-
extern "C" {
26+
extern "C" {
2727
#endif
2828

2929
/* Exported types ------------------------------------------------------------*/
@@ -39,11 +39,11 @@
3939
* If expr is true, it returns no value.
4040
* @retval None
4141
*/
42-
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
42+
#define assert_param(expr) ((expr) ? (void)0U : assert_failed((uint8_t *)__FILE__, __LINE__))
4343
/* Exported functions ------------------------------------------------------- */
44-
void assert_failed(uint8_t* file, uint32_t line);
44+
void assert_failed(uint8_t *file, uint32_t line);
4545
#else
46-
#define assert_param(expr) ((void)0U)
46+
#define assert_param(expr) ((void)0U)
4747
#endif /* USE_FULL_ASSERT */
4848

4949
#ifdef __cplusplus

system/Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_hal.h

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -537,9 +537,9 @@ typedef enum
537537
*/
538538
/* Legacy define */
539539
#define __HAL_SYSCFG_SRAM2_WRP_1_31_ENABLE __HAL_SYSCFG_SRAM2_WRP_0_31_ENABLE
540-
#define __HAL_SYSCFG_SRAM2_WRP_0_31_ENABLE(__SRAM2WRP__) do {assert_param(IS_SYSCFG_SRAM2WRP_PAGE((__SRAM2WRP__)));\
541-
LL_SYSCFG_EnableSRAM2PageWRP_0_31(__SRAM2WRP__);\
542-
}while(0)
540+
#define __HAL_SYSCFG_SRAM2_WRP_0_31_ENABLE(__SRAM2WRP__) do { assert_param(IS_SYSCFG_SRAM2WRP_PAGE((__SRAM2WRP__)));\
541+
LL_SYSCFG_EnableSRAM2PageWRP_0_31(__SRAM2WRP__); \
542+
} while(0)
543543

544544
/** @brief SRAM2 page write protection unlock prior to erase
545545
* @note Writing a wrong key reactivates the write protection
@@ -593,13 +593,13 @@ typedef enum
593593
/** @brief Fast mode Plus driving capability enable/disable macros
594594
* @param __FASTMODEPLUS__ This parameter can be a value of @ref SYSCFG_FastModePlus_GPIO
595595
*/
596-
#define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__))); \
597-
LL_SYSCFG_EnableFastModePlus(__FASTMODEPLUS__); \
598-
}while(0)
596+
#define __HAL_SYSCFG_FASTMODEPLUS_ENABLE(__FASTMODEPLUS__) do { assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__))); \
597+
LL_SYSCFG_EnableFastModePlus(__FASTMODEPLUS__); \
598+
} while(0)
599599

600-
#define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do {assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__))); \
601-
LL_SYSCFG_DisableFastModePlus(__FASTMODEPLUS__); \
602-
}while(0)
600+
#define __HAL_SYSCFG_FASTMODEPLUS_DISABLE(__FASTMODEPLUS__) do { assert_param(IS_SYSCFG_FASTMODEPLUS((__FASTMODEPLUS__))); \
601+
LL_SYSCFG_DisableFastModePlus(__FASTMODEPLUS__); \
602+
} while(0)
603603

604604
/**
605605
* @}
@@ -816,8 +816,8 @@ void HAL_SYSCFG_EnableIOAnalogSwitchBooster(void);
816816
void HAL_SYSCFG_DisableIOAnalogSwitchBooster(void);
817817

818818
#if defined(DUAL_CORE)
819-
void HAL_SYSCFG_EnableIT(SYSCFG_InterruptTypeDef *Interrupt);
820-
void HAL_SYSCFG_DisableIT(SYSCFG_InterruptTypeDef *Interrupt);
819+
void HAL_SYSCFG_EnableIT(const SYSCFG_InterruptTypeDef *Interrupt);
820+
void HAL_SYSCFG_DisableIT(const SYSCFG_InterruptTypeDef *Interrupt);
821821
#endif
822822
/**
823823
* @}

system/Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_hal_adc.h

Lines changed: 157 additions & 170 deletions
Large diffs are not rendered by default.

system/Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_hal_adc_ex.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ extern "C" {
5353
/** @defgroup ADC_HAL_EC_GROUPS ADC instance - Groups
5454
* @{
5555
*/
56-
#define ADC_REGULAR_GROUP (LL_ADC_GROUP_REGULAR) /*!< ADC group regular (available on all STM32 devices) */
56+
#define ADC_REGULAR_GROUP (LL_ADC_GROUP_REGULAR) /*!< ADC group regular (available on
57+
all STM32 devices) */
5758
/**
5859
* @}
5960
*/
@@ -143,7 +144,7 @@ extern "C" {
143144

144145
/* ADC calibration */
145146
HAL_StatusTypeDef HAL_ADCEx_Calibration_Start(ADC_HandleTypeDef *hadc);
146-
uint32_t HAL_ADCEx_Calibration_GetValue(ADC_HandleTypeDef *hadc);
147+
uint32_t HAL_ADCEx_Calibration_GetValue(const ADC_HandleTypeDef *hadc);
147148
HAL_StatusTypeDef HAL_ADCEx_Calibration_SetValue(ADC_HandleTypeDef *hadc, uint32_t CalibrationFactor);
148149

149150
/* ADC IRQHandler and Callbacks used in non-blocking modes (Interruption) */

system/Drivers/STM32WLxx_HAL_Driver/Inc/stm32wlxx_hal_comp.h

Lines changed: 37 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ typedef struct
5050

5151
uint32_t WindowMode; /*!< Set window mode of a pair of comparators instances
5252
(2 consecutive instances odd and even COMP<x> and COMP<x+1>).
53-
Note: HAL COMP driver allows to set window mode from any COMP instance of the pair of COMP instances composing window mode.
53+
Note: HAL COMP driver allows to set window mode from any COMP
54+
instance of the pair of COMP instances composing window mode.
5455
This parameter can be a value of @ref COMP_WindowMode */
5556

5657
uint32_t Mode; /*!< Set comparator operating mode to adjust power and speed.
@@ -151,15 +152,25 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
151152
* @}
152153
*/
153154

155+
154156
/** @defgroup COMP_WindowMode COMP Window Mode
155157
* @{
156158
*/
157-
#define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators instances pair COMP1 and COMP2 are independent */
158-
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances pair COMP1 and COMP2 have their input plus connected together. The common input is COMP1 input plus (COMP2 input plus is no more accessible). */
159+
#define COMP_WINDOWMODE_DISABLE (0x00000000UL) /*!< Window mode disable: Comparators
160+
instances pair COMP1 and COMP2 are
161+
independent */
162+
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_WINMODE) /*!< Window mode enable: Comparators instances
163+
pair COMP1 and COMP2 have their input
164+
plus connected together.
165+
The common input is COMP1 input plus
166+
(COMP2 input plus is no more accessible).
167+
*/
159168
/**
160169
* @}
161170
*/
162171

172+
173+
163174
/** @defgroup COMP_PowerMode COMP power mode
164175
* @{
165176
*/
@@ -300,14 +311,14 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
300311
* @param __HANDLE__ COMP handle
301312
* @retval None
302313
*/
303-
#define __HAL_COMP_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
314+
#define __HAL_COMP_ENABLE(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
304315

305316
/**
306317
* @brief Disable the specified comparator.
307318
* @param __HANDLE__ COMP handle
308319
* @retval None
309320
*/
310-
#define __HAL_COMP_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
321+
#define __HAL_COMP_DISABLE(__HANDLE__) CLEAR_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_EN)
311322

312323
/**
313324
* @brief Lock the specified comparator configuration.
@@ -318,14 +329,14 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
318329
* @param __HANDLE__ COMP handle
319330
* @retval None
320331
*/
321-
#define __HAL_COMP_LOCK(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK)
332+
#define __HAL_COMP_LOCK(__HANDLE__) SET_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK)
322333

323334
/**
324335
* @brief Check whether the specified comparator is locked.
325336
* @param __HANDLE__ COMP handle
326337
* @retval Value 0 if COMP instance is not locked, value 1 if COMP instance is locked
327338
*/
328-
#define __HAL_COMP_IS_LOCKED(__HANDLE__) (READ_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK) == COMP_CSR_LOCK)
339+
#define __HAL_COMP_IS_LOCKED(__HANDLE__) (READ_BIT((__HANDLE__)->Instance->CSR, COMP_CSR_LOCK) == COMP_CSR_LOCK)
329340

330341
/**
331342
* @}
@@ -334,7 +345,6 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
334345
/** @defgroup COMP_Exti_Management COMP external interrupt line management
335346
* @{
336347
*/
337-
338348
/**
339349
* @brief Enable the COMP1 EXTI line rising edge trigger.
340350
* @retval None
@@ -363,19 +373,19 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
363373
* @brief Enable the COMP1 EXTI line rising & falling edge trigger.
364374
* @retval None
365375
*/
366-
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
367-
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
368-
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
369-
} while(0)
376+
#define __HAL_COMP_COMP1_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
377+
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
378+
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
379+
} while(0)
370380

371381
/**
372382
* @brief Disable the COMP1 EXTI line rising & falling edge trigger.
373383
* @retval None
374384
*/
375-
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
376-
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
377-
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP1); \
378-
} while(0)
385+
#define __HAL_COMP_COMP1_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
386+
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP1); \
387+
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP1);\
388+
} while(0)
379389

380390
/**
381391
* @brief Enable the COMP1 EXTI line in interrupt mode.
@@ -463,19 +473,19 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
463473
* @brief Enable the COMP2 EXTI line rising & falling edge trigger.
464474
* @retval None
465475
*/
466-
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
467-
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
468-
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
469-
} while(0)
476+
#define __HAL_COMP_COMP2_EXTI_ENABLE_RISING_FALLING_EDGE() do { \
477+
LL_EXTI_EnableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
478+
LL_EXTI_EnableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
479+
} while(0)
470480

471481
/**
472482
* @brief Disable the COMP2 EXTI line rising & falling edge trigger.
473483
* @retval None
474484
*/
475-
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
476-
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
477-
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP2); \
478-
} while(0)
485+
#define __HAL_COMP_COMP2_EXTI_DISABLE_RISING_FALLING_EDGE() do { \
486+
LL_EXTI_DisableRisingTrig_0_31(COMP_EXTI_LINE_COMP2); \
487+
LL_EXTI_DisableFallingTrig_0_31(COMP_EXTI_LINE_COMP2);\
488+
} while(0)
479489

480490
/**
481491
* @brief Enable the COMP2 EXTI line in interrupt mode.
@@ -599,7 +609,7 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
599609
/* Note: On this STM32 series, comparator input minus parameters are */
600610
/* the same on all COMP instances. */
601611
/* However, comparator instance kept as macro parameter for */
602-
/* compatibility with other STM32 families. */
612+
/* compatibility with other STM32 series. */
603613
#define IS_COMP_INPUT_MINUS(__COMP_INSTANCE__, __INPUT_MINUS__) (((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_4VREFINT) || \
604614
((__INPUT_MINUS__) == COMP_INPUT_MINUS_1_2VREFINT) || \
605615
((__INPUT_MINUS__) == COMP_INPUT_MINUS_3_4VREFINT) || \
@@ -619,15 +629,15 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
619629
((__POL__) == COMP_OUTPUTPOL_INVERTED))
620630

621631
#define IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__) \
622-
( ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
632+
(((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_NONE) \
623633
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM1_OC5) \
624634
|| ((__OUTPUT_BLANKING_SOURCE__) == COMP_BLANKINGSRC_TIM2_OC3) \
625635
)
626636

627637
/* Note: Output blanking source common to all COMP instances */
628638
/* Macro kept for compatibility with other STM32 series */
629639
#define IS_COMP_BLANKINGSRC_INSTANCE(__INSTANCE__, __OUTPUT_BLANKING_SOURCE__) \
630-
(IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__))
640+
(IS_COMP_BLANKINGSRCE(__OUTPUT_BLANKING_SOURCE__))
631641

632642

633643
#define IS_COMP_TRIGGERMODE(__MODE__) (((__MODE__) == COMP_TRIGGERMODE_NONE) || \

0 commit comments

Comments
 (0)