Skip to content

Commit ec83ff7

Browse files
committed
[L0] Update STM32L0xx HAL Drivers to v1.10.4
Included in STM32CubeL0 FW v1.12.0 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 7f7bf8a commit ec83ff7

File tree

110 files changed

+8386
-3980
lines changed

Some content is hidden

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

110 files changed

+8386
-3980
lines changed

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

Lines changed: 385 additions & 27 deletions
Large diffs are not rendered by default.

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ typedef enum
6161
/** @defgroup SYSCFG_BootMode Boot Mode
6262
* @{
6363
*/
64-
#define SYSCFG_BOOT_MAINFLASH ((uint32_t)0x00000000U)
65-
#define SYSCFG_BOOT_SYSTEMFLASH ((uint32_t)SYSCFG_CFGR1_BOOT_MODE_0)
66-
#define SYSCFG_BOOT_SRAM ((uint32_t)SYSCFG_CFGR1_BOOT_MODE)
64+
#define SYSCFG_BOOT_MAINFLASH (0x00000000U)
65+
#define SYSCFG_BOOT_SYSTEMFLASH SYSCFG_CFGR1_BOOT_MODE_0
66+
#define SYSCFG_BOOT_SRAM SYSCFG_CFGR1_BOOT_MODE
6767

6868
/**
6969
* @}
@@ -105,7 +105,7 @@ typedef enum
105105
/** @defgroup SYSCFG_VREFINT_OUT_SELECT SYSCFG VREFINT Out Selection
106106
* @{
107107
*/
108-
#define SYSCFG_VREFINT_OUT_NONE ((uint32_t)0x00000000U) /* no pad connected */
108+
#define SYSCFG_VREFINT_OUT_NONE (0x00000000U) /* no pad connected */
109109
#define SYSCFG_VREFINT_OUT_PB0 SYSCFG_CFGR3_VREF_OUT_0 /* Selects PBO as output for the Vrefint */
110110
#define SYSCFG_VREFINT_OUT_PB1 SYSCFG_CFGR3_VREF_OUT_1 /* Selects PB1 as output for the Vrefint */
111111
#define SYSCFG_VREFINT_OUT_PB0_PB1 SYSCFG_CFGR3_VREF_OUT /* Selects PBO and PB1 as output for the Vrefint */

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc.h

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

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_adc_ex.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,28 +46,28 @@
4646
/** @defgroup ADCEx_Channel_Mode ADC Single Ended
4747
* @{
4848
*/
49-
#define ADC_SINGLE_ENDED (uint32_t)0x00000000U /* dummy value */
49+
#define ADC_SINGLE_ENDED 0x00000000U /* dummy value */
5050
/**
5151
* @}
5252
*/
5353

5454
/** @defgroup ADC_regular_external_trigger_source ADC External Trigger Source
5555
* @{
5656
*/
57-
#define ADC_EXTERNALTRIGCONV_T6_TRGO ((uint32_t)0x00000000U)
57+
#define ADC_EXTERNALTRIGCONV_T6_TRGO (0x00000000U)
5858
#define ADC_EXTERNALTRIGCONV_T21_CC2 (ADC_CFGR1_EXTSEL_0)
5959
#define ADC_EXTERNALTRIGCONV_T2_TRGO (ADC_CFGR1_EXTSEL_1)
6060
#define ADC_EXTERNALTRIGCONV_T2_CC4 (ADC_CFGR1_EXTSEL_1 | ADC_CFGR1_EXTSEL_0)
6161
#define ADC_EXTERNALTRIGCONV_T22_TRGO (ADC_CFGR1_EXTSEL_2)
6262
#define ADC_EXTERNALTRIGCONV_T3_TRGO (ADC_CFGR1_EXTSEL_2 | ADC_CFGR1_EXTSEL_1)
6363
#define ADC_EXTERNALTRIGCONV_EXT_IT11 (ADC_CFGR1_EXTSEL_2 | ADC_CFGR1_EXTSEL_1 | ADC_CFGR1_EXTSEL_0)
64-
#define ADC_SOFTWARE_START (ADC_CFGR1_EXTSEL + (uint32_t)1)
64+
#define ADC_SOFTWARE_START (ADC_CFGR1_EXTSEL + 1U)
6565

6666
/* ADC group regular external trigger TIM21_TRGO available only on */
6767
/* STM32L0 devices categories: Cat.2, Cat.3, Cat.5 */
6868
#if defined (STM32L031xx) || defined (STM32L041xx) || \
6969
defined (STM32L051xx) || defined (STM32L052xx) || defined (STM32L053xx) || \
70-
defined (STM32L061xx) || defined (STM32L062xx) || defined (STM32L063xx) || \
70+
defined (STM32L062xx) || defined (STM32L063xx) || \
7171
defined (STM32L071xx) || defined (STM32L072xx) || defined (STM32L073xx) || \
7272
defined (STM32L081xx) || defined (STM32L082xx) || defined (STM32L083xx) || \
7373
defined (STM32L010x6) || defined (STM32L010x8) || defined (STM32L010xB)
@@ -117,7 +117,7 @@
117117
* @param _Calibration_Factor_: Calibration factor value
118118
* @retval None
119119
*/
120-
#define IS_ADC_CALFACT(_Calibration_Factor_) ((_Calibration_Factor_) <= ((uint32_t)0x7FU))
120+
#define IS_ADC_CALFACT(_Calibration_Factor_) ((_Calibration_Factor_) <= (0x7FU))
121121
/**
122122
* @}
123123
*/
@@ -150,7 +150,7 @@
150150
((CONV) == ADC_EXTERNALTRIGCONV_EXT_IT11 ) || \
151151
((CONV) == ADC_SOFTWARE_START))
152152
#elif defined (STM32L051xx) || defined (STM32L052xx) || defined (STM32L053xx) || \
153-
defined (STM32L061xx) || defined (STM32L062xx) || defined (STM32L063xx)
153+
defined (STM32L062xx) || defined (STM32L063xx)
154154
#define IS_ADC_EXTTRIG(CONV) (((CONV) == ADC_EXTERNALTRIGCONV_T6_TRGO ) || \
155155
((CONV) == ADC_EXTERNALTRIGCONV_T21_CC2 ) || \
156156
((CONV) == ADC_EXTERNALTRIGCONV_T2_TRGO ) || \

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_comp.h

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ typedef struct
7878
/**
7979
* @brief HAL COMP state machine: HAL COMP states definition
8080
*/
81-
#define COMP_STATE_BITFIELD_LOCK ((uint32_t)0x10)
81+
#define COMP_STATE_BITFIELD_LOCK (0x10U)
8282
typedef enum
8383
{
8484
HAL_COMP_STATE_RESET = 0x00U, /*!< COMP not yet initialized */
@@ -147,7 +147,7 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
147147
/** @defgroup COMP_WindowMode COMP Window Mode
148148
* @{
149149
*/
150-
#define COMP_WINDOWMODE_DISABLE ((uint32_t)0x00000000U) /*!< Window mode disable: Comparators instances pair COMP1 and COMP2 are independent */
150+
#define COMP_WINDOWMODE_DISABLE (0x00000000U) /*!< Window mode disable: Comparators instances pair COMP1 and COMP2 are independent */
151151
#define COMP_WINDOWMODE_COMP1_INPUT_PLUS_COMMON (COMP_CSR_COMP1WM) /*!< 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). */
152152
/**
153153
* @}
@@ -160,15 +160,15 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
160160
/* (propagation delay and power consumption), */
161161
/* refer to device datasheet. */
162162
#define COMP_POWERMODE_MEDIUMSPEED (COMP_CSR_COMP2SPEED) /*!< COMP power mode to low power (indicated as "high speed" in reference manual) (only for COMP instance: COMP2) */
163-
#define COMP_POWERMODE_ULTRALOWPOWER ((uint32_t)0x00000000U) /*!< COMP power mode to ultra low power (indicated as "low speed" in reference manual) (only for COMP instance: COMP2) */
163+
#define COMP_POWERMODE_ULTRALOWPOWER (0x00000000U) /*!< COMP power mode to ultra low power (indicated as "low speed" in reference manual) (only for COMP instance: COMP2) */
164164
/**
165165
* @}
166166
*/
167167

168168
/** @defgroup COMP_InputPlus COMP input plus (non-inverting input)
169169
* @{
170170
*/
171-
#define COMP_INPUT_PLUS_IO1 ((uint32_t)0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, pin PA3 for COMP2) */
171+
#define COMP_INPUT_PLUS_IO1 (0x00000000U) /*!< Comparator input plus connected to IO1 (pin PA1 for COMP1, pin PA3 for COMP2) */
172172
#define COMP_INPUT_PLUS_IO2 (COMP_CSR_COMP2INPSEL_0) /*!< Comparator input plus connected to IO2 (pin PB4 for COMP2) (only for COMP instance: COMP2) */
173173
#define COMP_INPUT_PLUS_IO3 (COMP_CSR_COMP2INPSEL_1) /*!< Comparator input plus connected to IO3 (pin PA5 for COMP2) (only for COMP instance: COMP2) */
174174
#define COMP_INPUT_PLUS_IO4 (COMP_CSR_COMP2INPSEL_0 | COMP_CSR_COMP2INPSEL_1) /*!< Comparator input plus connected to IO4 (pin PB6 for COMP2) (only for COMP instance: COMP2) */
@@ -186,7 +186,7 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
186186
#define COMP_INPUT_MINUS_1_4VREFINT (COMP_CSR_COMP2INNSEL_2 ) /*!< Comparator input minus connected to 1/4 VREFINT (only for COMP instance: COMP2) */
187187
#define COMP_INPUT_MINUS_1_2VREFINT (COMP_CSR_COMP2INNSEL_2 | COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to 1/2 VREFINT (only for COMP instance: COMP2) */
188188
#define COMP_INPUT_MINUS_3_4VREFINT (COMP_CSR_COMP2INNSEL_2 | COMP_CSR_COMP2INNSEL_1 ) /*!< Comparator input minus connected to 3/4 VREFINT (only for COMP instance: COMP2) */
189-
#define COMP_INPUT_MINUS_VREFINT ((uint32_t)0x00000000U) /*!< Comparator input minus connected to VrefInt */
189+
#define COMP_INPUT_MINUS_VREFINT (0x00000000U) /*!< Comparator input minus connected to VrefInt */
190190
#define COMP_INPUT_MINUS_DAC1_CH1 ( COMP_CSR_COMP2INNSEL_1 ) /*!< Comparator input minus connected to DAC1 channel 1 (DAC_OUT1) */
191191
#define COMP_INPUT_MINUS_DAC1_CH2 ( COMP_CSR_COMP2INNSEL_1 | COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to DAC1 channel 2 (DAC_OUT2) */
192192
#define COMP_INPUT_MINUS_IO1 ( COMP_CSR_COMP2INNSEL_0) /*!< Comparator input minus connected to IO1 (pin PA0 for COMP1, pin PA2 for COMP2) */
@@ -200,17 +200,17 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
200200
* @{
201201
*/
202202

203-
#define COMP_LPTIMCONNECTION_DISABLED ((uint32_t)0x00000000U) /*!< COMPx signal is gated */
204-
#define COMP_LPTIMCONNECTION_IN1_ENABLED ((uint32_t)0x00000001U) /*!< COMPx signal is connected to LPTIM input 1 */
205-
#define COMP_LPTIMCONNECTION_IN2_ENABLED ((uint32_t)0x00000002U) /*!< COMPx signal is connected to LPTIM input 2 */
203+
#define COMP_LPTIMCONNECTION_DISABLED (0x00000000U) /*!< COMPx signal is gated */
204+
#define COMP_LPTIMCONNECTION_IN1_ENABLED (0x00000001U) /*!< COMPx signal is connected to LPTIM input 1 */
205+
#define COMP_LPTIMCONNECTION_IN2_ENABLED (0x00000002U) /*!< COMPx signal is connected to LPTIM input 2 */
206206
/**
207207
* @}
208208
*/
209209

210210
/** @defgroup COMP_OutputPolarity COMP output Polarity
211211
* @{
212212
*/
213-
#define COMP_OUTPUTPOL_NONINVERTED ((uint32_t)0x00000000U) /*!< COMP output on GPIO isn't inverted */
213+
#define COMP_OUTPUTPOL_NONINVERTED (0x00000000U) /*!< COMP output on GPIO isn't inverted */
214214
#define COMP_OUTPUTPOL_INVERTED COMP_CSR_COMPxPOLARITY /*!< COMP output on GPIO is inverted */
215215
/**
216216
* @}
@@ -225,18 +225,18 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
225225

226226
/* When output polarity is not inverted, comparator output is low when
227227
the input plus is at a lower voltage than the input minus */
228-
#define COMP_OUTPUT_LEVEL_LOW ((uint32_t)0x00000000U)
228+
#define COMP_OUTPUT_LEVEL_LOW (0x00000000U)
229229
/* When output polarity is not inverted, comparator output is high when
230230
the input plus is at a higher voltage than the input minus */
231-
#define COMP_OUTPUT_LEVEL_HIGH ((uint32_t)0x00000001U)
231+
#define COMP_OUTPUT_LEVEL_HIGH (0x00000001U)
232232
/**
233233
* @}
234234
*/
235235

236236
/** @defgroup COMP_EXTI_TriggerMode COMP output to EXTI
237237
* @{
238238
*/
239-
#define COMP_TRIGGERMODE_NONE ((uint32_t)0x00000000U) /*!< Comparator output triggering no External Interrupt Line */
239+
#define COMP_TRIGGERMODE_NONE (0x00000000U) /*!< Comparator output triggering no External Interrupt Line */
240240
#define COMP_TRIGGERMODE_IT_RISING (COMP_EXTI_IT | COMP_EXTI_RISING) /*!< Comparator output triggering External Interrupt Line event with interruption, on rising edge */
241241
#define COMP_TRIGGERMODE_IT_FALLING (COMP_EXTI_IT | COMP_EXTI_FALLING) /*!< Comparator output triggering External Interrupt Line event with interruption, on falling edge */
242242
#define COMP_TRIGGERMODE_IT_RISING_FALLING (COMP_EXTI_IT | COMP_EXTI_RISING | COMP_EXTI_FALLING) /*!< Comparator output triggering External Interrupt Line event with interruption, on both rising and falling edges */
@@ -515,10 +515,10 @@ typedef void (*pCOMP_CallbackTypeDef)(COMP_HandleTypeDef *hcomp); /*!< pointer
515515
/** @defgroup COMP_ExtiLine COMP EXTI Lines
516516
* @{
517517
*/
518-
#define COMP_EXTI_IT ((uint32_t) 0x01U) /*!< EXTI line event with interruption */
519-
#define COMP_EXTI_EVENT ((uint32_t) 0x02U) /*!< EXTI line event only (without interruption) */
520-
#define COMP_EXTI_RISING ((uint32_t) 0x10U) /*!< EXTI line event on rising edge */
521-
#define COMP_EXTI_FALLING ((uint32_t) 0x20U) /*!< EXTI line event on falling edge */
518+
#define COMP_EXTI_IT (0x01U) /*!< EXTI line event with interruption */
519+
#define COMP_EXTI_EVENT (0x02U) /*!< EXTI line event only (without interruption) */
520+
#define COMP_EXTI_RISING (0x10U) /*!< EXTI line event on rising edge */
521+
#define COMP_EXTI_FALLING (0x20U) /*!< EXTI line event on falling edge */
522522
/**
523523
* @}
524524
*/

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_conf_template.h

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
#define HAL_CRYP_MODULE_ENABLED
4242
#define HAL_DAC_MODULE_ENABLED
4343
#define HAL_DMA_MODULE_ENABLED
44+
#define HAL_EXTI_MODULE_ENABLED
4445
#define HAL_FIREWALL_MODULE_ENABLED
4546
#define HAL_FLASH_MODULE_ENABLED
4647
#define HAL_GPIO_MODULE_ENABLED
@@ -72,19 +73,19 @@
7273
* (when HSE is used as system clock source, directly or through the PLL).
7374
*/
7475
#if !defined (HSE_VALUE)
75-
#define HSE_VALUE ((uint32_t)8000000U) /*!< Value of the External oscillator in Hz */
76+
#define HSE_VALUE (8000000U) /*!< Value of the External oscillator in Hz */
7677
#endif /* HSE_VALUE */
7778

7879
#if !defined (HSE_STARTUP_TIMEOUT)
79-
#define HSE_STARTUP_TIMEOUT ((uint32_t)100U) /*!< Time out for HSE start up, in ms */
80+
#define HSE_STARTUP_TIMEOUT (100U) /*!< Time out for HSE start up, in ms */
8081
#endif /* HSE_STARTUP_TIMEOUT */
8182

8283
/**
8384
* @brief Internal Multiple Speed oscillator (MSI) default value.
8485
* This value is the default MSI range value after Reset.
8586
*/
8687
#if !defined (MSI_VALUE)
87-
#define MSI_VALUE ((uint32_t)2097152U) /*!< Value of the Internal oscillator in Hz*/
88+
#define MSI_VALUE (2097152U) /*!< Value of the Internal oscillator in Hz*/
8889
#endif /* MSI_VALUE */
8990

9091
/**
@@ -93,14 +94,14 @@
9394
* (when HSI is used as system clock source, directly or through the PLL).
9495
*/
9596
#if !defined (HSI_VALUE)
96-
#define HSI_VALUE ((uint32_t)16000000U) /*!< Value of the Internal oscillator in Hz*/
97+
#define HSI_VALUE (16000000U) /*!< Value of the Internal oscillator in Hz*/
9798
#endif /* HSI_VALUE */
9899

99100
/**
100101
* @brief Internal High Speed oscillator for USB (HSI48) value.
101102
*/
102103
#if !defined (HSI48_VALUE)
103-
#define HSI48_VALUE ((uint32_t)48000000U) /*!< Value of the Internal High Speed oscillator for USB in Hz.
104+
#define HSI48_VALUE (48000000U) /*!< Value of the Internal High Speed oscillator for USB in Hz.
104105
The real value may vary depending on the variations
105106
in voltage and temperature. */
106107
#endif /* HSI48_VALUE */
@@ -109,7 +110,7 @@
109110
* @brief Internal Low Speed oscillator (LSI) value.
110111
*/
111112
#if !defined (LSI_VALUE)
112-
#define LSI_VALUE ((uint32_t)37000U) /*!< LSI Typical Value in Hz*/
113+
#define LSI_VALUE (37000U) /*!< LSI Typical Value in Hz*/
113114
#endif /* LSI_VALUE */ /*!< Value of the Internal Low Speed oscillator in Hz
114115
The real value may vary depending on the variations
115116
in voltage and temperature.*/
@@ -118,14 +119,14 @@
118119
* This value is used by the UART, RTC HAL module to compute the system frequency
119120
*/
120121
#if !defined (LSE_VALUE)
121-
#define LSE_VALUE ((uint32_t)32768U) /*!< Value of the External oscillator in Hz*/
122+
#define LSE_VALUE (32768U) /*!< Value of the External oscillator in Hz*/
122123
#endif /* LSE_VALUE */
123124

124125
/**
125126
* @brief Time out for LSE start up value in ms.
126127
*/
127128
#if !defined (LSE_STARTUP_TIMEOUT)
128-
#define LSE_STARTUP_TIMEOUT ((uint32_t)5000U) /*!< Time out for LSE start up, in ms */
129+
#define LSE_STARTUP_TIMEOUT (5000U) /*!< Time out for LSE start up, in ms */
129130
#endif /* LSE_STARTUP_TIMEOUT */
130131

131132

@@ -136,8 +137,8 @@
136137
/**
137138
* @brief This is the HAL system configuration section
138139
*/
139-
#define VDD_VALUE ((uint32_t)3300U) /*!< Value of VDD in mv */
140-
#define TICK_INT_PRIORITY (((uint32_t)1U<<__NVIC_PRIO_BITS) - 1U) /*!< tick interrupt priority */
140+
#define VDD_VALUE (3300U) /*!< Value of VDD in mv */
141+
#define TICK_INT_PRIORITY ((1U<<__NVIC_PRIO_BITS) - 1U) /*!< tick interrupt priority */
141142
#define USE_RTOS 0U
142143
#define PREFETCH_ENABLE 1U
143144
#define PREREAD_ENABLE 0U
@@ -206,6 +207,10 @@
206207
#include "stm32l0xx_hal_dma.h"
207208
#endif /* HAL_DMA_MODULE_ENABLED */
208209

210+
#ifdef HAL_EXTI_MODULE_ENABLED
211+
#include "stm32l0xx_hal_exti.h"
212+
#endif /* HAL_EXTI_MODULE_ENABLED */
213+
209214
#ifdef HAL_CORTEX_MODULE_ENABLED
210215
#include "stm32l0xx_hal_cortex.h"
211216
#endif /* HAL_CORTEX_MODULE_ENABLED */

0 commit comments

Comments
 (0)