Skip to content

Commit 875fe4c

Browse files
committed
system(l0) update STM32L0xx HAL Drivers to v1.10.7
Included in STM32CubeL0 FW v1.12.3 Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 7ef0723 commit 875fe4c

Some content is hidden

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

66 files changed

+1942
-1206
lines changed

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

+122-30
Large diffs are not rendered by default.

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_cortex.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ void HAL_SYSTICK_Callback(void);
261261
#if (__MPU_PRESENT == 1U)
262262
void HAL_MPU_Enable(uint32_t MPU_Control);
263263
void HAL_MPU_Disable(void);
264+
void HAL_MPU_EnableRegion(uint32_t RegionNumber);
265+
void HAL_MPU_DisableRegion(uint32_t RegionNumber);
264266
void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
265267
#endif /* __MPU_PRESENT */
266268
/**
@@ -361,4 +363,3 @@ void HAL_MPU_ConfigRegion(MPU_Region_InitTypeDef *MPU_Init);
361363

362364

363365

364-

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_crc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ uint32_t HAL_CRC_Calculate(CRC_HandleTypeDef *hcrc, uint32_t pBuffer[], uint32_t
318318
/** @defgroup CRC_Exported_Functions_Group3 Peripheral State functions
319319
* @{
320320
*/
321-
HAL_CRC_StateTypeDef HAL_CRC_GetState(CRC_HandleTypeDef *hcrc);
321+
HAL_CRC_StateTypeDef HAL_CRC_GetState(const CRC_HandleTypeDef *hcrc);
322322
/**
323323
* @}
324324
*/

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2c.h

-2
Original file line numberDiff line numberDiff line change
@@ -118,8 +118,6 @@ typedef enum
118118
HAL_I2C_STATE_BUSY_RX_LISTEN = 0x2AU, /*!< Address Listen Mode and Data Reception
119119
process is ongoing */
120120
HAL_I2C_STATE_ABORT = 0x60U, /*!< Abort user request ongoing */
121-
HAL_I2C_STATE_TIMEOUT = 0xA0U, /*!< Timeout state */
122-
HAL_I2C_STATE_ERROR = 0xE0U /*!< Error */
123121

124122
} HAL_I2C_StateTypeDef;
125123

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_i2s.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -452,8 +452,8 @@ void HAL_I2S_ErrorCallback(I2S_HandleTypeDef *hi2s);
452452
* @{
453453
*/
454454
/* Peripheral Control and State functions ************************************/
455-
HAL_I2S_StateTypeDef HAL_I2S_GetState(I2S_HandleTypeDef *hi2s);
456-
uint32_t HAL_I2S_GetError(I2S_HandleTypeDef *hi2s);
455+
HAL_I2S_StateTypeDef HAL_I2S_GetState(const I2S_HandleTypeDef *hi2s);
456+
uint32_t HAL_I2S_GetError(const I2S_HandleTypeDef *hi2s);
457457
/**
458458
* @}
459459
*/

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_lptim.h

+1-3
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ typedef void (*pLPTIM_CallbackTypeDef)(LPTIM_HandleTypeDef *hlptim); /*!< poin
390390
* @brief Write the passed parameter in the Autoreload register.
391391
* @param __HANDLE__ LPTIM handle
392392
* @param __VALUE__ Autoreload value
393+
* This parameter must be a value between Min_Data = 0x0001 and Max_Data = 0xFFFF.
393394
* @retval None
394395
* @note The ARR register can only be modified when the LPTIM instance is enabled.
395396
*/
@@ -732,9 +733,6 @@ HAL_LPTIM_StateTypeDef HAL_LPTIM_GetState(const LPTIM_HandleTypeDef *hlptim);
732733
#define IS_LPTIM_COUNTER_SOURCE(__SOURCE__) (((__SOURCE__) == LPTIM_COUNTERSOURCE_INTERNAL) || \
733734
((__SOURCE__) == LPTIM_COUNTERSOURCE_EXTERNAL))
734735

735-
#define IS_LPTIM_AUTORELOAD(__AUTORELOAD__) ((0x00000001UL <= (__AUTORELOAD__)) &&\
736-
((__AUTORELOAD__) <= 0x0000FFFFUL))
737-
738736
#define IS_LPTIM_COMPARE(__COMPARE__) ((__COMPARE__) <= 0x0000FFFFUL)
739737

740738
#define IS_LPTIM_PERIOD(__PERIOD__) ((0x00000001UL <= (__PERIOD__)) &&\

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pcd.h

+9-12
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ HAL_StatusTypeDef HAL_PCD_EP_Flush(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
339339
HAL_StatusTypeDef HAL_PCD_EP_Abort(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
340340
HAL_StatusTypeDef HAL_PCD_ActivateRemoteWakeup(PCD_HandleTypeDef *hpcd);
341341
HAL_StatusTypeDef HAL_PCD_DeActivateRemoteWakeup(PCD_HandleTypeDef *hpcd);
342-
uint32_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
342+
uint32_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef const *hpcd, uint8_t ep_addr);
343343
/**
344344
* @}
345345
*/
@@ -348,7 +348,7 @@ uint32_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr
348348
/** @addtogroup PCD_Exported_Functions_Group4 Peripheral State functions
349349
* @{
350350
*/
351-
PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
351+
PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef const *hpcd);
352352
/**
353353
* @}
354354
*/
@@ -806,20 +806,17 @@ PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
806806
\
807807
*(pdwReg) &= 0x3FFU; \
808808
\
809-
if ((wCount) > 62U) \
809+
if ((wCount) == 0U) \
810810
{ \
811-
PCD_CALC_BLK32((pdwReg), (wCount), wNBlocks); \
811+
*(pdwReg) |= USB_CNTRX_BLSIZE; \
812+
} \
813+
else if ((wCount) <= 62U) \
814+
{ \
815+
PCD_CALC_BLK2((pdwReg), (wCount), wNBlocks); \
812816
} \
813817
else \
814818
{ \
815-
if ((wCount) == 0U) \
816-
{ \
817-
*(pdwReg) |= USB_CNTRX_BLSIZE; \
818-
} \
819-
else \
820-
{ \
821-
PCD_CALC_BLK2((pdwReg), (wCount), wNBlocks); \
822-
} \
819+
PCD_CALC_BLK32((pdwReg), (wCount), wNBlocks); \
823820
} \
824821
} while(0) /* PCD_SET_EP_CNT_RX_REG */
825822

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_pcd_ex.h

-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ extern "C" {
4747
*/
4848

4949

50-
5150
HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr,
5251
uint16_t ep_kind, uint32_t pmaadress);
5352

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rcc.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -1686,8 +1686,8 @@ typedef struct
16861686

16871687
/* Initialization and de-initialization functions ******************************/
16881688
HAL_StatusTypeDef HAL_RCC_DeInit(void);
1689-
HAL_StatusTypeDef HAL_RCC_OscConfig(RCC_OscInitTypeDef *RCC_OscInitStruct);
1690-
HAL_StatusTypeDef HAL_RCC_ClockConfig(RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);
1689+
HAL_StatusTypeDef HAL_RCC_OscConfig(const RCC_OscInitTypeDef *RCC_OscInitStruct);
1690+
HAL_StatusTypeDef HAL_RCC_ClockConfig(const RCC_ClkInitTypeDef *RCC_ClkInitStruct, uint32_t FLatency);
16911691

16921692
/**
16931693
* @}

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rng.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ uint32_t HAL_RNG_GetRandomNumber_IT(RNG_HandleTypeDef
304304
*hrng); /* Obsolete, use HAL_RNG_GenerateRandomNumber_IT() instead */
305305
HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber(RNG_HandleTypeDef *hrng, uint32_t *random32bit);
306306
HAL_StatusTypeDef HAL_RNG_GenerateRandomNumber_IT(RNG_HandleTypeDef *hrng);
307-
uint32_t HAL_RNG_ReadLastRandomNumber(RNG_HandleTypeDef *hrng);
307+
uint32_t HAL_RNG_ReadLastRandomNumber(const RNG_HandleTypeDef *hrng);
308308

309309
void HAL_RNG_IRQHandler(RNG_HandleTypeDef *hrng);
310310
void HAL_RNG_ErrorCallback(RNG_HandleTypeDef *hrng);
@@ -317,8 +317,8 @@ void HAL_RNG_ReadyDataCallback(RNG_HandleTypeDef *hrng, uint32_t random32bit);
317317
/** @defgroup RNG_Exported_Functions_Group3 Peripheral State functions
318318
* @{
319319
*/
320-
HAL_RNG_StateTypeDef HAL_RNG_GetState(RNG_HandleTypeDef *hrng);
321-
uint32_t HAL_RNG_GetError(RNG_HandleTypeDef *hrng);
320+
HAL_RNG_StateTypeDef HAL_RNG_GetState(const RNG_HandleTypeDef *hrng);
321+
uint32_t HAL_RNG_GetError(const RNG_HandleTypeDef *hrng);
322322
/**
323323
* @}
324324
*/

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rtc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ HAL_RTCStateTypeDef HAL_RTC_GetState(RTC_HandleTypeDef *hrtc);
813813

814814
#define RTC_TIMEOUT_VALUE 1000U
815815

816-
#define RTC_EXTI_LINE_ALARM_EVENT EXTI_IMR_IM17 /*!< External interrupt line 17 Connected to the RTC Alarm event */
816+
#define RTC_EXTI_LINE_ALARM_EVENT EXTI_IMR_IM17 /*!< External interrupt line 17 connected to the RTC Alarm event */
817817
/**
818818
* @}
819819
*/

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_rtc_ex.h

+24-38
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ typedef struct
6060
This parameter can be a value of @ref RTCEx_Tamper_EraseBackUp_Definitions */
6161

6262
uint32_t MaskFlag; /*!< Specifies the Tamper Flag masking.
63-
This parameter can be a value of @ref RTCEx_Tamper_MaskFlag_Definitions */
63+
This parameter can be a value of @ref RTCEx_Tamper_MaskFlag_Definitions */
6464

6565
uint32_t Filter; /*!< Specifies the RTC Filter Tamper.
6666
This parameter can be a value of @ref RTCEx_Tamper_Filter_Definitions */
@@ -641,11 +641,11 @@ typedef struct
641641
* @param __INTERRUPT__ specifies the RTC Tamper interrupt sources to be enabled.
642642
* This parameter can be any combination of the following values:
643643
* @arg RTC_IT_TAMP: Tamper global interrupt
644-
* @arg RTC_IT_TAMP1: Tamper 1 interrupt
644+
* @arg RTC_IT_TAMP1: Tamper 1 interrupt (*)
645645
* @arg RTC_IT_TAMP2: Tamper 2 interrupt
646-
* @arg RTC_IT_TAMP3: Tamper 3 interrupt
647-
* @note RTC_IT_TAMP1 is not applicable to all devices.
648-
* @note RTC_IT_TAMP3 is not applicable to all devices.
646+
* @arg RTC_IT_TAMP3: Tamper 3 interrupt (*)
647+
*
648+
* (*) value not applicable to all devices.
649649
* @retval None
650650
*/
651651
#define __HAL_RTC_TAMPER_ENABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->TAMPCR |= (__INTERRUPT__))
@@ -656,40 +656,26 @@ typedef struct
656656
* @param __INTERRUPT__ specifies the RTC Tamper interrupt sources to be disabled.
657657
* This parameter can be any combination of the following values:
658658
* @arg RTC_IT_TAMP: Tamper global interrupt
659-
* @arg RTC_IT_TAMP1: Tamper 1 interrupt
659+
* @arg RTC_IT_TAMP1: Tamper 1 interrupt (*)
660660
* @arg RTC_IT_TAMP2: Tamper 2 interrupt
661-
* @arg RTC_IT_TAMP3: Tamper 3 interrupt
662-
* @note RTC_IT_TAMP1 is not applicable to all devices.
663-
* @note RTC_IT_TAMP3 is not applicable to all devices.
661+
* @arg RTC_IT_TAMP3: Tamper 3 interrupt (*)
662+
*
663+
* (*) value not applicable to all devices.
664664
* @retval None
665665
*/
666666
#define __HAL_RTC_TAMPER_DISABLE_IT(__HANDLE__, __INTERRUPT__) ((__HANDLE__)->Instance->TAMPCR &= ~(__INTERRUPT__))
667667

668-
/**
669-
* @brief Check whether the specified RTC Tamper interrupt has occurred or not.
670-
* @param __HANDLE__ specifies the RTC handle.
671-
* @param __INTERRUPT__ specifies the RTC Tamper interrupt to check.
672-
* This parameter can be:
673-
* @arg RTC_IT_TAMP1: Tamper 1 interrupt
674-
* @arg RTC_IT_TAMP2: Tamper 2 interrupt
675-
* @arg RTC_IT_TAMP3: Tamper 3 interrupt
676-
* @note RTC_IT_TAMP1 is not applicable to all devices.
677-
* @note RTC_IT_TAMP3 is not applicable to all devices.
678-
* @retval None
679-
*/
680-
#define __HAL_RTC_TAMPER_GET_IT(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->ISR) & ((__INTERRUPT__) >> 4U)) != 0U) ? 1U : 0U)
681-
682668
/**
683669
* @brief Check whether the specified RTC Tamper interrupt has been enabled or not.
684670
* @param __HANDLE__ specifies the RTC handle.
685671
* @param __INTERRUPT__ specifies the RTC Tamper interrupt source to check.
686672
* This parameter can be:
687673
* @arg RTC_IT_TAMP: Tamper global interrupt
688-
* @arg RTC_IT_TAMP1: Tamper 1 interrupt
674+
* @arg RTC_IT_TAMP1: Tamper 1 interrupt (*)
689675
* @arg RTC_IT_TAMP2: Tamper 2 interrupt
690-
* @arg RTC_IT_TAMP3: Tamper 3 interrupt
691-
* @note RTC_IT_TAMP1 is not applicable to all devices.
692-
* @note RTC_IT_TAMP3 is not applicable to all devices.
676+
* @arg RTC_IT_TAMP3: Tamper 3 interrupt (*)
677+
*
678+
* (*) value not applicable to all devices.
693679
* @retval None
694680
*/
695681
#define __HAL_RTC_TAMPER_GET_IT_SOURCE(__HANDLE__, __INTERRUPT__) (((((__HANDLE__)->Instance->TAMPCR) & (__INTERRUPT__)) != 0U) ? 1U : 0U)
@@ -699,11 +685,11 @@ typedef struct
699685
* @param __HANDLE__ specifies the RTC handle.
700686
* @param __FLAG__ specifies the RTC Tamper flag to be checked.
701687
* This parameter can be:
702-
* @arg RTC_FLAG_TAMP1F: Tamper 1 interrupt flag
688+
* @arg RTC_FLAG_TAMP1F: Tamper 1 interrupt flag (*)
703689
* @arg RTC_FLAG_TAMP2F: Tamper 2 interrupt flag
704-
* @arg RTC_FLAG_TAMP3F: Tamper 3 interrupt flag
705-
* @note RTC_FLAG_TAMP1F is not applicable to all devices.
706-
* @note RTC_FLAG_TAMP3F is not applicable to all devices.
690+
* @arg RTC_FLAG_TAMP3F: Tamper 3 interrupt flag (*)
691+
*
692+
* (*) value not applicable to all devices.
707693
* @retval None
708694
*/
709695
#define __HAL_RTC_TAMPER_GET_FLAG(__HANDLE__, __FLAG__) (((((__HANDLE__)->Instance->ISR) & (__FLAG__)) != 0U)? 1U : 0U)
@@ -713,11 +699,11 @@ typedef struct
713699
* @param __HANDLE__ specifies the RTC handle.
714700
* @param __FLAG__ specifies the RTC Tamper Flag to clear.
715701
* This parameter can be:
716-
* @arg RTC_FLAG_TAMP1F: Tamper 1 interrupt flag
702+
* @arg RTC_FLAG_TAMP1F: Tamper 1 interrupt flag (*)
717703
* @arg RTC_FLAG_TAMP2F: Tamper 2 interrupt flag
718-
* @arg RTC_FLAG_TAMP3F: Tamper 3 interrupt flag
719-
* @note RTC_FLAG_TAMP1F is not applicable to all devices.
720-
* @note RTC_FLAG_TAMP3F is not applicable to all devices.
704+
* @arg RTC_FLAG_TAMP3F: Tamper 3 interrupt flag (*)
705+
*
706+
* (*) value not applicable to all devices.
721707
* @retval None
722708
*/
723709
#define __HAL_RTC_TAMPER_CLEAR_FLAG(__HANDLE__, __FLAG__) ((__HANDLE__)->Instance->ISR) = (~((__FLAG__) | RTC_ISR_INIT)|((__HANDLE__)->Instance->ISR & RTC_ISR_INIT))
@@ -746,13 +732,13 @@ typedef struct
746732
* @brief Enable event on the RTC Tamper and Timestamp associated EXTI line.
747733
* @retval None.
748734
*/
749-
#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
735+
#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_ENABLE_EVENT() (EXTI->EMR |= RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
750736

751737
/**
752738
* @brief Disable event on the RTC Tamper and Timestamp associated EXTI line.
753739
* @retval None.
754740
*/
755-
#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
741+
#define __HAL_RTC_TAMPER_TIMESTAMP_EXTI_DISABLE_EVENT() (EXTI->EMR &= ~RTC_EXTI_LINE_TAMPER_TIMESTAMP_EVENT)
756742

757743
/**
758744
* @brief Enable falling edge trigger on the RTC Tamper and Timestamp associated EXTI line.
@@ -947,7 +933,7 @@ HAL_StatusTypeDef HAL_RTCEx_DisableBypassShadow(RTC_HandleTypeDef *hrtc);
947933
* @{
948934
*/
949935
/* Extended RTC features functions *******************************************/
950-
void HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc);
936+
void HAL_RTCEx_AlarmBEventCallback(RTC_HandleTypeDef *hrtc);
951937
HAL_StatusTypeDef HAL_RTCEx_PollForAlarmBEvent(RTC_HandleTypeDef *hrtc, uint32_t Timeout);
952938
/**
953939
* @}

system/Drivers/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal_smbus.h

-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@ typedef struct
100100
#define HAL_SMBUS_STATE_MASTER_BUSY_RX (0x00000022U) /*!< Master Data Reception process is ongoing */
101101
#define HAL_SMBUS_STATE_SLAVE_BUSY_TX (0x00000032U) /*!< Slave Data Transmission process is ongoing */
102102
#define HAL_SMBUS_STATE_SLAVE_BUSY_RX (0x00000042U) /*!< Slave Data Reception process is ongoing */
103-
#define HAL_SMBUS_STATE_TIMEOUT (0x00000003U) /*!< Timeout state */
104-
#define HAL_SMBUS_STATE_ERROR (0x00000004U) /*!< Reception process is ongoing */
105103
#define HAL_SMBUS_STATE_LISTEN (0x00000008U) /*!< Address Listen Mode is ongoing */
106104
/**
107105
* @}

0 commit comments

Comments
 (0)