7
7
******************************************************************************
8
8
* @attention
9
9
*
10
- * <h2><center>© COPYRIGHT(c) 2017 STMicroelectronics</center></h2>
10
+ * <h2><center>© Copyright (c) 2017 STMicroelectronics.
11
+ * All rights reserved.</center></h2>
11
12
*
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
33
17
*
34
18
******************************************************************************
35
19
*/
55
39
56
40
/* Exported types ------------------------------------------------------------*/
57
41
/* 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
+
58
63
/** @defgroup SYSCFG_Exported_Constants SYSCFG Exported Constants
59
64
* @{
60
65
*/
517
522
*/
518
523
519
524
/* 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
+
520
537
/** @defgroup SYSCFG_Private_Macros SYSCFG Private Macros
521
538
* @{
522
539
*/
572
589
* @{
573
590
*/
574
591
extern __IO uint32_t uwTick ;
592
+ extern uint32_t uwTickPrio ;
593
+ extern uint32_t uwTickFreq ;
575
594
/**
576
595
* @}
577
596
*/
@@ -589,8 +608,8 @@ extern __IO uint32_t uwTick;
589
608
/* Initialization and de-initialization functions ******************************/
590
609
HAL_StatusTypeDef HAL_Init (void );
591
610
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 );
594
613
HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority );
595
614
596
615
/**
@@ -602,17 +621,20 @@ HAL_StatusTypeDef HAL_InitTick (uint32_t TickPriority);
602
621
*/
603
622
604
623
/* 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 );
616
638
617
639
/**
618
640
* @}
@@ -623,12 +645,12 @@ uint32_t HAL_GetUIDw2(void);
623
645
*/
624
646
625
647
/* 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 );
632
654
633
655
/**
634
656
* @}
@@ -639,20 +661,20 @@ void HAL_DBGMCU_DisableDBGStandbyMode(void);
639
661
*/
640
662
641
663
/* 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 );
645
667
646
668
#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 );
650
672
HAL_StatusTypeDef HAL_SYSCFG_EnableVREFBUF (void );
651
- void HAL_SYSCFG_DisableVREFBUF (void );
673
+ void HAL_SYSCFG_DisableVREFBUF (void );
652
674
#endif /* VREFBUF */
653
675
654
- void HAL_SYSCFG_EnableIOAnalogSwitchBooster (void );
655
- void HAL_SYSCFG_DisableIOAnalogSwitchBooster (void );
676
+ void HAL_SYSCFG_EnableIOAnalogSwitchBooster (void );
677
+ void HAL_SYSCFG_DisableIOAnalogSwitchBooster (void );
656
678
657
679
/**
658
680
* @}
0 commit comments