Skip to content

Commit 5c9ea25

Browse files
committed
[L0] Update STM32L0xx HAL Drivers to v1.10.3
Included in STM32CubeL0 FW v1.11.3 Signed-off-by: Frederic Pillon <[email protected]>
1 parent 70a6928 commit 5c9ea25

27 files changed

+5118
-1881
lines changed

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h

+31
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,25 @@
3939

4040
/* Exported types ------------------------------------------------------------*/
4141
/* Exported constants --------------------------------------------------------*/
42+
4243
/** @defgroup HAL_Exported_Constants HAL Exported Constants
4344
* @{
4445
*/
4546

47+
/** @defgroup HAL_TICK_FREQ Tick Frequency
48+
* @{
49+
*/
50+
typedef enum
51+
{
52+
HAL_TICK_FREQ_10HZ = 100U,
53+
HAL_TICK_FREQ_100HZ = 10U,
54+
HAL_TICK_FREQ_1KHZ = 1U,
55+
HAL_TICK_FREQ_DEFAULT = HAL_TICK_FREQ_1KHZ
56+
} HAL_TickFreqTypeDef;
57+
/**
58+
* @}
59+
*/
60+
4661
/** @defgroup SYSCFG_BootMode Boot Mode
4762
* @{
4863
*/
@@ -350,11 +365,24 @@
350365
* @}
351366
*/
352367

368+
/** @defgroup HAL_Private_Macros HAL Private Macros
369+
* @{
370+
*/
371+
#define IS_TICKFREQ(FREQ) (((FREQ) == HAL_TICK_FREQ_10HZ) || \
372+
((FREQ) == HAL_TICK_FREQ_100HZ) || \
373+
((FREQ) == HAL_TICK_FREQ_1KHZ))
374+
/**
375+
* @}
376+
*/
377+
353378
/* Exported variables --------------------------------------------------------*/
354379
/** @defgroup HAL_Exported_Variables HAL Exported Variables
355380
* @{
356381
*/
357382
extern __IO uint32_t uwTick;
383+
extern uint32_t uwTickPrio;
384+
extern HAL_TickFreqTypeDef uwTickFreq;
385+
358386
/**
359387
* @}
360388
*/
@@ -384,6 +412,9 @@ HAL_StatusTypeDef HAL_InitTick(uint32_t TickPriority);
384412
void HAL_IncTick(void);
385413
void HAL_Delay(uint32_t Delay);
386414
uint32_t HAL_GetTick(void);
415+
uint32_t HAL_GetTickPrio(void);
416+
HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq);
417+
HAL_TickFreqTypeDef HAL_GetTickFreq(void);
387418
void HAL_SuspendTick(void);
388419
void HAL_ResumeTick(void);
389420
uint32_t HAL_GetHalVersion(void);

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_gpio.h

+13-13
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define __STM32L0xx_HAL_GPIO_H
2323

2424
#ifdef __cplusplus
25-
extern "C" {
25+
extern "C" {
2626
#endif
2727

2828
/* Includes ------------------------------------------------------------------*/
@@ -65,7 +65,7 @@ typedef struct
6565

6666
uint32_t Alternate; /*!< Peripheral to be connected to the selected pins
6767
This parameter can be a value of @ref GPIOEx_Alternate_function_selection */
68-
}GPIO_InitTypeDef;
68+
} GPIO_InitTypeDef;
6969
/**
7070
* @}
7171
*/
@@ -80,7 +80,7 @@ typedef enum
8080
{
8181
GPIO_PIN_RESET = 0U,
8282
GPIO_PIN_SET
83-
}GPIO_PinState;
83+
} GPIO_PinState;
8484
/**
8585
* @}
8686
*/
@@ -124,8 +124,8 @@ typedef enum
124124
*/
125125

126126
#define GPIO_PIN_MASK ((uint32_t)0x0000FFFFU) /* PIN mask for assert test */
127-
#define IS_GPIO_PIN(__PIN__) ((((__PIN__) & GPIO_PIN_MASK) != (uint32_t)0x00) &&\
128-
(((__PIN__) & ~GPIO_PIN_MASK) == (uint32_t)0x00))
127+
#define IS_GPIO_PIN(__PIN__) ((((uint32_t)(__PIN__) & GPIO_PIN_MASK) != (uint32_t)0x00) &&\
128+
(((uint32_t)(__PIN__) & ~GPIO_PIN_MASK) == (uint32_t)0x00))
129129

130130
/** @defgroup GPIO_mode_define Mode definition
131131
* @brief GPIO Configuration Mode
@@ -188,10 +188,10 @@ typedef enum
188188
((__SPEED__) == GPIO_SPEED_FREQ_HIGH ) || ((__SPEED__) == GPIO_SPEED_FREQ_VERY_HIGH))
189189

190190

191-
/** @defgroup GPIO_pull_define Pull definition
192-
* @brief GPIO Pull-Up or Pull-Down Activation
193-
* @{
194-
*/
191+
/** @defgroup GPIO_pull_define Pull definition
192+
* @brief GPIO Pull-Up or Pull-Down Activation
193+
* @{
194+
*/
195195
#define GPIO_NOPULL ((uint32_t)0x00000000U) /*!< No Pull-up or Pull-down activation */
196196
#define GPIO_PULLUP ((uint32_t)0x00000001U) /*!< Pull-up activation */
197197
#define GPIO_PULLDOWN ((uint32_t)0x00000002U) /*!< Pull-down activation */
@@ -283,10 +283,10 @@ void HAL_GPIO_DeInit(GPIO_TypeDef *GPIOx, uint32_t GPIO_Pin);
283283
/** @defgroup GPIO_Exported_Functions_Group2 IO operation functions
284284
* @{
285285
*/
286-
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
287-
void HAL_GPIO_WritePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
288-
void HAL_GPIO_TogglePin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
289-
HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin);
286+
GPIO_PinState HAL_GPIO_ReadPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
287+
void HAL_GPIO_WritePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin, GPIO_PinState PinState);
288+
void HAL_GPIO_TogglePin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
289+
HAL_StatusTypeDef HAL_GPIO_LockPin(GPIO_TypeDef *GPIOx, uint16_t GPIO_Pin);
290290
void HAL_GPIO_EXTI_IRQHandler(uint16_t GPIO_Pin);
291291
void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin);
292292
/**

0 commit comments

Comments
 (0)