1 /**
2   ******************************************************************************
3   * @file    stm32f0xx_hal_cortex.h
4   * @author  MCD Application Team
5   * @brief   Header file of CORTEX HAL module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2016 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file in
13   * the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef __STM32F0xx_HAL_CORTEX_H
21 #define __STM32F0xx_HAL_CORTEX_H
22 
23 #ifdef __cplusplus
24  extern "C" {
25 #endif
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32f0xx_hal_def.h"
29 
30 /** @addtogroup STM32F0xx_HAL_Driver
31   * @{
32   */
33 
34 /** @addtogroup CORTEX CORTEX
35   * @{
36   */
37 /* Exported types ------------------------------------------------------------*/
38 /* Exported constants --------------------------------------------------------*/
39 
40 /** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants
41   * @{
42   */
43 
44 /** @defgroup CORTEX_SysTick_clock_source CORTEX SysTick clock source
45   * @{
46   */
47 #define SYSTICK_CLKSOURCE_HCLK_DIV8    (0x00000000U)
48 #define SYSTICK_CLKSOURCE_HCLK         (0x00000004U)
49 
50 /**
51   * @}
52   */
53 
54 /**
55   * @}
56   */
57 
58 /* Exported Macros -----------------------------------------------------------*/
59 
60 /* Exported functions --------------------------------------------------------*/
61 /** @addtogroup CORTEX_Exported_Functions CORTEX Exported Functions
62   * @{
63   */
64 /** @addtogroup CORTEX_Exported_Functions_Group1 Initialization and de-initialization functions
65  *  @brief    Initialization and Configuration functions
66  * @{
67  */
68 /* Initialization and de-initialization functions *******************************/
69 void HAL_NVIC_SetPriority(IRQn_Type IRQn,uint32_t PreemptPriority, uint32_t SubPriority);
70 void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);
71 void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);
72 void HAL_NVIC_SystemReset(void);
73 uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);
74 /**
75   * @}
76   */
77 
78 /** @addtogroup CORTEX_Exported_Functions_Group2 Peripheral Control functions
79  *  @brief   Cortex control functions
80  * @{
81  */
82 
83 /* Peripheral Control functions *************************************************/
84 uint32_t HAL_NVIC_GetPriority(IRQn_Type IRQn);
85 uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);
86 void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);
87 void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
88 void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);
89 void HAL_SYSTICK_IRQHandler(void);
90 void HAL_SYSTICK_Callback(void);
91 /**
92   * @}
93   */
94 
95 /**
96   * @}
97   */
98 
99 /* Private types -------------------------------------------------------------*/
100 /* Private variables ---------------------------------------------------------*/
101 /* Private constants ---------------------------------------------------------*/
102 /* Private macros ------------------------------------------------------------*/
103 /** @defgroup CORTEX_Private_Macros CORTEX Private Macros
104   * @{
105   */
106 #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY)  ((PRIORITY) < 0x4)
107 
108 #define IS_NVIC_DEVICE_IRQ(IRQ)                ((IRQ) >= 0x00)
109 
110 #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \
111                                       ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))
112 /**
113   * @}
114   */
115 
116 /**
117   * @}
118   */
119 
120 /**
121   * @}
122   */
123 
124 #ifdef __cplusplus
125 }
126 #endif
127 
128 #endif /* __STM32F0xx_HAL_CORTEX_H */
129 
130 
131 
132