Skip to content

Commit 1f2e8c1

Browse files
committed
[L4] Update STM32L4xx HAL Drivers to v1.10.0
Included in STM32CubeL4 FW V1.14.0 Note: Trailing spaces have been cleaned. Signed-off-by: Frederic.Pillon <[email protected]>
1 parent 6ac6690 commit 1f2e8c1

File tree

214 files changed

+22597
-16677
lines changed

Some content is hidden

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

214 files changed

+22597
-16677
lines changed

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

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

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

Lines changed: 26 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,13 @@
66
******************************************************************************
77
* @attention
88
*
9-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
9+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
10+
* All rights reserved.</center></h2>
1011
*
11-
* Redistribution and use in source and binary forms, with or without modification,
12-
* are permitted provided that the following conditions are met:
13-
* 1. Redistributions of source code must retain the above copyright notice,
14-
* this list of conditions and the following disclaimer.
15-
* 2. Redistributions in binary form must reproduce the above copyright notice,
16-
* this list of conditions and the following disclaimer in the documentation
17-
* and/or other materials provided with the distribution.
18-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
19-
* may be used to endorse or promote products derived from this software
20-
* without specific prior written permission.
21-
*
22-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
23-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
24-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
25-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
26-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
27-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
28-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
30-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
12+
* This software component is licensed by ST under BSD 3-Clause license,
13+
* the "License"; You may not use this file except in compliance with the
14+
* License. You may obtain a copy of the License at:
15+
* opensource.org/licenses/BSD-3-Clause
3216
*
3317
******************************************************************************
3418
*/
@@ -154,7 +138,7 @@ typedef struct
154138
This parameter can be set to ENABLE or DISABLE */
155139

156140
uint32_t BankNumber; /*!< Select the start slave bank filter.
157-
This parameter must be a number between Min_Data = 0 and Max_Data = 28 */
141+
This parameter must be a number between Min_Data = 0 and Max_Data = 28 */
158142

159143
}CAN_FilterConfTypeDef;
160144

@@ -596,7 +580,7 @@ typedef struct
596580
* @retval None
597581
*/
598582
#define __HAL_CAN_FIFO_RELEASE(__HANDLE__, __FIFONUMBER__) (((__FIFONUMBER__) == CAN_FIFO0)? \
599-
((__HANDLE__)->Instance->RF0R |= CAN_RF0R_RFOM0) : ((__HANDLE__)->Instance->RF1R |= CAN_RF1R_RFOM1))
583+
((__HANDLE__)->Instance->RF0R |= CAN_RF0R_RFOM0) : ((__HANDLE__)->Instance->RF1R |= CAN_RF1R_RFOM1))
600584

601585
/**
602586
* @brief Cancel a transmit request.
@@ -612,40 +596,40 @@ typedef struct
612596
/**
613597
* @brief Enable or disable the DBG Freeze for CAN.
614598
* @param __HANDLE__: specifies the CAN Handle.
615-
* @param __NEWSTATE__: new state of the CAN peripheral.
599+
* @param __NEWSTATE__: new state of the CAN peripheral.
616600
* This parameter can be: ENABLE (CAN reception/transmission is frozen
617-
* during debug. Reception FIFO can still be accessed/controlled normally)
601+
* during debug. Reception FIFO can still be accessed/controlled normally)
618602
* or DISABLE (CAN is working during debug).
619603
* @retval None
620604
*/
621605
#define __HAL_CAN_DBG_FREEZE(__HANDLE__, __NEWSTATE__) (((__NEWSTATE__) == ENABLE)? \
622-
((__HANDLE__)->Instance->MCR |= CAN_MCR_DBF) : ((__HANDLE__)->Instance->MCR &= ~CAN_MCR_DBF))
606+
((__HANDLE__)->Instance->MCR |= CAN_MCR_DBF) : ((__HANDLE__)->Instance->MCR &= ~CAN_MCR_DBF))
623607

624608
/**
625609
* @}
626-
*/
627-
628-
/* Exported functions --------------------------------------------------------*/
610+
*/
611+
612+
/* Exported functions --------------------------------------------------------*/
629613
/** @addtogroup CAN_Exported_Functions CAN Exported Functions
630614
* @{
631615
*/
632-
633-
/** @defgroup CAN_Exported_Functions_Group1 Initialization and de-initialization functions
634-
* @brief Initialization and Configuration functions
616+
617+
/** @defgroup CAN_Exported_Functions_Group1 Initialization and de-initialization functions
618+
* @brief Initialization and Configuration functions
635619
* @{
636620
*/
637-
/* addtogroup and de-initialization functions *****************************/
621+
/* addtogroup and de-initialization functions *****************************/
638622
HAL_StatusTypeDef HAL_CAN_Init(CAN_HandleTypeDef* hcan);
639623
HAL_StatusTypeDef HAL_CAN_ConfigFilter(CAN_HandleTypeDef* hcan, CAN_FilterConfTypeDef* sFilterConfig);
640624
HAL_StatusTypeDef HAL_CAN_DeInit(CAN_HandleTypeDef* hcan);
641625
void HAL_CAN_MspInit(CAN_HandleTypeDef* hcan);
642626
void HAL_CAN_MspDeInit(CAN_HandleTypeDef* hcan);
643627
/**
644628
* @}
645-
*/
646-
629+
*/
630+
647631
/** @addtogroup CAN_Exported_Functions_Group2 Input and Output operation functions
648-
* @brief I/O operation functions
632+
* @brief I/O operation functions
649633
* @{
650634
*/
651635
/* IO operation functions *****************************************************/
@@ -661,22 +645,22 @@ void HAL_CAN_RxCpltCallback(CAN_HandleTypeDef* hcan);
661645
void HAL_CAN_ErrorCallback(CAN_HandleTypeDef *hcan);
662646
/**
663647
* @}
664-
*/
665-
648+
*/
649+
666650
/** @addtogroup CAN_Exported_Functions_Group3 Peripheral State and Error functions
667-
* @brief CAN Peripheral State functions
651+
* @brief CAN Peripheral State functions
668652
* @{
669653
*/
670654
/* Peripheral State and Error functions ***************************************/
671655
uint32_t HAL_CAN_GetError(CAN_HandleTypeDef *hcan);
672656
HAL_CAN_StateTypeDef HAL_CAN_GetState(CAN_HandleTypeDef* hcan);
673657
/**
674658
* @}
675-
*/
659+
*/
676660

677661
/**
678662
* @}
679-
*/
663+
*/
680664

681665
/* Private types -------------------------------------------------------------*/
682666
/* Private constants ---------------------------------------------------------*/

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32_assert_template.h

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,13 @@
88
******************************************************************************
99
* @attention
1010
*
11-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
11+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
12+
* All rights reserved.</center></h2>
1213
*
13-
* Redistribution and use in source and binary forms, with or without modification,
14-
* are permitted provided that the following conditions are met:
15-
* 1. Redistributions of source code must retain the above copyright notice,
16-
* this list of conditions and the following disclaimer.
17-
* 2. Redistributions in binary form must reproduce the above copyright notice,
18-
* this list of conditions and the following disclaimer in the documentation
19-
* and/or other materials provided with the distribution.
20-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
21-
* may be used to endorse or promote products derived from this software
22-
* without specific prior written permission.
23-
*
24-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
25-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
26-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
28-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
29-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
30-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
31-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
32-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
33-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14+
* This software component is licensed by ST under BSD 3-Clause license,
15+
* the "License"; You may not use this file except in compliance with the
16+
* License. You may obtain a copy of the License at:
17+
* opensource.org/licenses/BSD-3-Clause
3418
*
3519
******************************************************************************
3620
*/

system/Drivers/STM32L4xx_HAL_Driver/Inc/stm32l4xx_hal.h

Lines changed: 72 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,13 @@
77
******************************************************************************
88
* @attention
99
*
10-
* <h2><center>&copy; COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10+
* <h2><center>&copy; Copyright (c) 2017 STMicroelectronics.
11+
* All rights reserved.</center></h2>
1112
*
12-
* Redistribution and use in source and binary forms, with or without modification,
13-
* are permitted provided that the following conditions are met:
14-
* 1. Redistributions of source code must retain the above copyright notice,
15-
* this list of conditions and the following disclaimer.
16-
* 2. Redistributions in binary form must reproduce the above copyright notice,
17-
* this list of conditions and the following disclaimer in the documentation
18-
* and/or other materials provided with the distribution.
19-
* 3. Neither the name of STMicroelectronics nor the names of its contributors
20-
* may be used to endorse or promote products derived from this software
21-
* without specific prior written permission.
22-
*
23-
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
24-
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
25-
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26-
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
27-
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
28-
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30-
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
31-
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32-
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13+
* This software component is licensed by ST under BSD 3-Clause license,
14+
* the "License"; You may not use this file except in compliance with the
15+
* License. You may obtain a copy of the License at:
16+
* opensource.org/licenses/BSD-3-Clause
3317
*
3418
******************************************************************************
3519
*/
@@ -55,6 +39,27 @@
5539

5640
/* Exported types ------------------------------------------------------------*/
5741
/* Exported constants --------------------------------------------------------*/
42+
43+
/** @defgroup HAL_Exported_Constants HAL Exported Constants
44+
* @{
45+
*/
46+
47+
/** @defgroup HAL_TICK_FREQ Tick Frequency
48+
* @{
49+
*/
50+
#define HAL_TICK_FREQ_10HZ 100U
51+
#define HAL_TICK_FREQ_100HZ 10U
52+
#define HAL_TICK_FREQ_1KHZ 1U
53+
#define HAL_TICK_FREQ_DEFAULT HAL_TICK_FREQ_1KHZ
54+
55+
/**
56+
* @}
57+
*/
58+
59+
/**
60+
* @}
61+
*/
62+
5863
/** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants
5964
* @{
6065
*/
@@ -517,6 +522,18 @@
517522
*/
518523

519524
/* Private macros ------------------------------------------------------------*/
525+
/** @defgroup HAL_Private_Macros HAL Private Macros
526+
* @{
527+
*/
528+
529+
#define IS_TICKFREQ(__FREQ__) (((__FREQ__) == HAL_TICK_FREQ_10HZ) || \
530+
((__FREQ__) == HAL_TICK_FREQ_100HZ) || \
531+
((__FREQ__) == HAL_TICK_FREQ_1KHZ))
532+
533+
/**
534+
* @}
535+
*/
536+
520537
/** @defgroup SYSCFG_Private_Macros SYSCFG Private Macros
521538
* @{
522539
*/
@@ -572,6 +589,8 @@
572589
* @{
573590
*/
574591
extern __IO uint32_t uwTick;
592+
extern uint32_t uwTickPrio;
593+
extern uint32_t uwTickFreq;
575594
/**
576595
* @}
577596
*/
@@ -589,8 +608,8 @@ extern __IO uint32_t uwTick;
589608
/* Initialization and de-initialization functions ******************************/
590609
HAL_StatusTypeDef HAL_Init(void);
591610
HAL_StatusTypeDef HAL_DeInit(void);
592-
void HAL_MspInit(void);
593-
void HAL_MspDeInit(void);
611+
void HAL_MspInit(void);
612+
void HAL_MspDeInit(void);
594613
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
595614

596615
/**
@@ -602,17 +621,20 @@ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
602621
*/
603622

604623
/* Peripheral Control functions ************************************************/
605-
void HAL_IncTick(void);
606-
void HAL_Delay(uint32_t Delay);
607-
uint32_t HAL_GetTick(void);
608-
void HAL_SuspendTick(void);
609-
void HAL_ResumeTick(void);
610-
uint32_t HAL_GetHalVersion(void);
611-
uint32_t HAL_GetREVID(void);
612-
uint32_t HAL_GetDEVID(void);
613-
uint32_t HAL_GetUIDw0(void);
614-
uint32_t HAL_GetUIDw1(void);
615-
uint32_t HAL_GetUIDw2(void);
624+
void HAL_IncTick(void);
625+
void HAL_Delay(uint32_t Delay);
626+
uint32_t HAL_GetTick(void);
627+
uint32_t HAL_GetTickPrio(void);
628+
HAL_StatusTypeDef HAL_SetTickFreq(uint32_t Freq);
629+
uint32_t HAL_GetTickFreq(void);
630+
void HAL_SuspendTick(void);
631+
void HAL_ResumeTick(void);
632+
uint32_t HAL_GetHalVersion(void);
633+
uint32_t HAL_GetREVID(void);
634+
uint32_t HAL_GetDEVID(void);
635+
uint32_t HAL_GetUIDw0(void);
636+
uint32_t HAL_GetUIDw1(void);
637+
uint32_t HAL_GetUIDw2(void);
616638

617639
/**
618640
* @}
@@ -623,12 +645,12 @@ uint32_t HAL_GetUIDw2(void);
623645
*/
624646

625647
/* DBGMCU Peripheral Control functions *****************************************/
626-
void HAL_DBGMCU_EnableDBGSleepMode(void);
627-
void HAL_DBGMCU_DisableDBGSleepMode(void);
628-
void HAL_DBGMCU_EnableDBGStopMode(void);
629-
void HAL_DBGMCU_DisableDBGStopMode(void);
630-
void HAL_DBGMCU_EnableDBGStandbyMode(void);
631-
void HAL_DBGMCU_DisableDBGStandbyMode(void);
648+
void HAL_DBGMCU_EnableDBGSleepMode(void);
649+
void HAL_DBGMCU_DisableDBGSleepMode(void);
650+
void HAL_DBGMCU_EnableDBGStopMode(void);
651+
void HAL_DBGMCU_DisableDBGStopMode(void);
652+
void HAL_DBGMCU_EnableDBGStandbyMode(void);
653+
void HAL_DBGMCU_DisableDBGStandbyMode(void);
632654

633655
/**
634656
* @}
@@ -639,20 +661,20 @@ void HAL_DBGMCU_DisableDBGStandbyMode(void);
639661
*/
640662

641663
/* SYSCFG Control functions ****************************************************/
642-
void HAL_SYSCFG_SRAM2Erase(void);
643-
void HAL_SYSCFG_EnableMemorySwappingBank(void);
644-
void HAL_SYSCFG_DisableMemorySwappingBank(void);
664+
void HAL_SYSCFG_SRAM2Erase(void);
665+
void HAL_SYSCFG_EnableMemorySwappingBank(void);
666+
void HAL_SYSCFG_DisableMemorySwappingBank(void);
645667

646668
#if defined(VREFBUF)
647-
void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling);
648-
void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode);
649-
void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue);
669+
void HAL_SYSCFG_VREFBUF_VoltageScalingConfig(uint32_t VoltageScaling);
670+
void HAL_SYSCFG_VREFBUF_HighImpedanceConfig(uint32_t Mode);
671+
void HAL_SYSCFG_VREFBUF_TrimmingConfig(uint32_t TrimmingValue);
650672
HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF(void);
651-
void HAL_SYSCFG_DisableVREFBUF(void);
673+
void HAL_SYSCFG_DisableVREFBUF(void);
652674
#endif /* VREFBUF */
653675

654-
void HAL_SYSCFG_EnableIOAnalogSwitchBooster(void);
655-
void HAL_SYSCFG_DisableIOAnalogSwitchBooster(void);
676+
void HAL_SYSCFG_EnableIOAnalogSwitchBooster(void);
677+
void HAL_SYSCFG_DisableIOAnalogSwitchBooster(void);
656678

657679
/**
658680
* @}

0 commit comments

Comments
 (0)