Dataloger

Committer:
jhon309
Date:
Thu Aug 20 00:37:14 2015 +0000
Revision:
0:666850d06c9f
ok

Who changed what in which revision?

UserRevisionLine numberNew contents of line
jhon309 0:666850d06c9f 1 /**
jhon309 0:666850d06c9f 2 ******************************************************************************
jhon309 0:666850d06c9f 3 * @file stm32f0xx_hal_cortex.h
jhon309 0:666850d06c9f 4 * @author MCD Application Team
jhon309 0:666850d06c9f 5 * @version V1.2.0
jhon309 0:666850d06c9f 6 * @date 11-December-2014
jhon309 0:666850d06c9f 7 * @brief Header file of CORTEX HAL module.
jhon309 0:666850d06c9f 8 ******************************************************************************
jhon309 0:666850d06c9f 9 * @attention
jhon309 0:666850d06c9f 10 *
jhon309 0:666850d06c9f 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
jhon309 0:666850d06c9f 12 *
jhon309 0:666850d06c9f 13 * Redistribution and use in source and binary forms, with or without modification,
jhon309 0:666850d06c9f 14 * are permitted provided that the following conditions are met:
jhon309 0:666850d06c9f 15 * 1. Redistributions of source code must retain the above copyright notice,
jhon309 0:666850d06c9f 16 * this list of conditions and the following disclaimer.
jhon309 0:666850d06c9f 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
jhon309 0:666850d06c9f 18 * this list of conditions and the following disclaimer in the documentation
jhon309 0:666850d06c9f 19 * and/or other materials provided with the distribution.
jhon309 0:666850d06c9f 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
jhon309 0:666850d06c9f 21 * may be used to endorse or promote products derived from this software
jhon309 0:666850d06c9f 22 * without specific prior written permission.
jhon309 0:666850d06c9f 23 *
jhon309 0:666850d06c9f 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
jhon309 0:666850d06c9f 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
jhon309 0:666850d06c9f 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
jhon309 0:666850d06c9f 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
jhon309 0:666850d06c9f 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
jhon309 0:666850d06c9f 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
jhon309 0:666850d06c9f 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
jhon309 0:666850d06c9f 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
jhon309 0:666850d06c9f 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
jhon309 0:666850d06c9f 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
jhon309 0:666850d06c9f 34 *
jhon309 0:666850d06c9f 35 ******************************************************************************
jhon309 0:666850d06c9f 36 */
jhon309 0:666850d06c9f 37
jhon309 0:666850d06c9f 38 /* Define to prevent recursive inclusion -------------------------------------*/
jhon309 0:666850d06c9f 39 #ifndef __STM32F0xx_HAL_CORTEX_H
jhon309 0:666850d06c9f 40 #define __STM32F0xx_HAL_CORTEX_H
jhon309 0:666850d06c9f 41
jhon309 0:666850d06c9f 42 #ifdef __cplusplus
jhon309 0:666850d06c9f 43 extern "C" {
jhon309 0:666850d06c9f 44 #endif
jhon309 0:666850d06c9f 45
jhon309 0:666850d06c9f 46 /* Includes ------------------------------------------------------------------*/
jhon309 0:666850d06c9f 47 #include "stm32f0xx_hal_def.h"
jhon309 0:666850d06c9f 48
jhon309 0:666850d06c9f 49 /** @addtogroup STM32F0xx_HAL_Driver
jhon309 0:666850d06c9f 50 * @{
jhon309 0:666850d06c9f 51 */
jhon309 0:666850d06c9f 52
jhon309 0:666850d06c9f 53 /** @addtogroup CORTEX CORTEX HAL module driver
jhon309 0:666850d06c9f 54 * @{
jhon309 0:666850d06c9f 55 */
jhon309 0:666850d06c9f 56 /* Exported types ------------------------------------------------------------*/
jhon309 0:666850d06c9f 57 /* Exported constants --------------------------------------------------------*/
jhon309 0:666850d06c9f 58 /** @defgroup CORTEX_Exported_Constants CORTEX Exported Constants
jhon309 0:666850d06c9f 59 * @{
jhon309 0:666850d06c9f 60 */
jhon309 0:666850d06c9f 61
jhon309 0:666850d06c9f 62 /** @defgroup CORTEX_Priority CORTEX Priority
jhon309 0:666850d06c9f 63 * @{
jhon309 0:666850d06c9f 64 */
jhon309 0:666850d06c9f 65 #define IS_NVIC_PREEMPTION_PRIORITY(PRIORITY) ((PRIORITY) < 0x4)
jhon309 0:666850d06c9f 66 /**
jhon309 0:666850d06c9f 67 * @}
jhon309 0:666850d06c9f 68 */
jhon309 0:666850d06c9f 69
jhon309 0:666850d06c9f 70 /** @defgroup CORTEX_SysTick_clock_source CORTEX SysTick clock source
jhon309 0:666850d06c9f 71 * @{
jhon309 0:666850d06c9f 72 */
jhon309 0:666850d06c9f 73 #define SYSTICK_CLKSOURCE_HCLK_DIV8 ((uint32_t)0x00000000)
jhon309 0:666850d06c9f 74 #define SYSTICK_CLKSOURCE_HCLK ((uint32_t)0x00000004)
jhon309 0:666850d06c9f 75 #define IS_SYSTICK_CLK_SOURCE(SOURCE) (((SOURCE) == SYSTICK_CLKSOURCE_HCLK) || \
jhon309 0:666850d06c9f 76 ((SOURCE) == SYSTICK_CLKSOURCE_HCLK_DIV8))
jhon309 0:666850d06c9f 77 /**
jhon309 0:666850d06c9f 78 * @}
jhon309 0:666850d06c9f 79 */
jhon309 0:666850d06c9f 80
jhon309 0:666850d06c9f 81 /**
jhon309 0:666850d06c9f 82 * @}
jhon309 0:666850d06c9f 83 */
jhon309 0:666850d06c9f 84
jhon309 0:666850d06c9f 85 /* Exported Macros -----------------------------------------------------------*/
jhon309 0:666850d06c9f 86 /** @defgroup CORTEX_Exported_Macro CORTEX Exported Macro
jhon309 0:666850d06c9f 87 * @{
jhon309 0:666850d06c9f 88 */
jhon309 0:666850d06c9f 89
jhon309 0:666850d06c9f 90 /** @brief Configures the SysTick clock source.
jhon309 0:666850d06c9f 91 * @param __CLKSRC__: specifies the SysTick clock source.
jhon309 0:666850d06c9f 92 * This parameter can be one of the following values:
jhon309 0:666850d06c9f 93 * @arg SYSTICK_CLKSOURCE_HCLK_DIV8: AHB clock divided by 8 selected as SysTick clock source.
jhon309 0:666850d06c9f 94 * @arg SYSTICK_CLKSOURCE_HCLK: AHB clock selected as SysTick clock source.
jhon309 0:666850d06c9f 95 * @retval None
jhon309 0:666850d06c9f 96 */
jhon309 0:666850d06c9f 97 #define __HAL_CORTEX_SYSTICKCLK_CONFIG(__CLKSRC__) \
jhon309 0:666850d06c9f 98 do { \
jhon309 0:666850d06c9f 99 if ((__CLKSRC__) == SYSTICK_CLKSOURCE_HCLK) \
jhon309 0:666850d06c9f 100 { \
jhon309 0:666850d06c9f 101 SysTick->CTRL |= SYSTICK_CLKSOURCE_HCLK; \
jhon309 0:666850d06c9f 102 } \
jhon309 0:666850d06c9f 103 else \
jhon309 0:666850d06c9f 104 SysTick->CTRL &= ~SYSTICK_CLKSOURCE_HCLK; \
jhon309 0:666850d06c9f 105 } while(0)
jhon309 0:666850d06c9f 106
jhon309 0:666850d06c9f 107 /**
jhon309 0:666850d06c9f 108 * @}
jhon309 0:666850d06c9f 109 */
jhon309 0:666850d06c9f 110
jhon309 0:666850d06c9f 111 /* Exported functions --------------------------------------------------------*/
jhon309 0:666850d06c9f 112 /** @addtogroup CORTEX_Exported_Functions CORTEX Exported Functions
jhon309 0:666850d06c9f 113 * @{
jhon309 0:666850d06c9f 114 */
jhon309 0:666850d06c9f 115 /** @addtogroup CORTEX_Exported_Functions_Group1 Initialization and de-initialization functions
jhon309 0:666850d06c9f 116 * @brief Initialization and Configuration functions
jhon309 0:666850d06c9f 117 * @{
jhon309 0:666850d06c9f 118 */
jhon309 0:666850d06c9f 119 /* Initialization and de-initialization functions *******************************/
jhon309 0:666850d06c9f 120 void HAL_NVIC_SetPriority(IRQn_Type IRQn,uint32_t PreemptPriority, uint32_t SubPriority);
jhon309 0:666850d06c9f 121 void HAL_NVIC_EnableIRQ(IRQn_Type IRQn);
jhon309 0:666850d06c9f 122 void HAL_NVIC_DisableIRQ(IRQn_Type IRQn);
jhon309 0:666850d06c9f 123 void HAL_NVIC_SystemReset(void);
jhon309 0:666850d06c9f 124 uint32_t HAL_SYSTICK_Config(uint32_t TicksNumb);
jhon309 0:666850d06c9f 125 /**
jhon309 0:666850d06c9f 126 * @}
jhon309 0:666850d06c9f 127 */
jhon309 0:666850d06c9f 128
jhon309 0:666850d06c9f 129 /** @addtogroup CORTEX_Exported_Functions_Group2 Peripheral Control functions
jhon309 0:666850d06c9f 130 * @brief Cortex control functions
jhon309 0:666850d06c9f 131 * @{
jhon309 0:666850d06c9f 132 */
jhon309 0:666850d06c9f 133
jhon309 0:666850d06c9f 134 /* Peripheral Control functions *************************************************/
jhon309 0:666850d06c9f 135 uint32_t HAL_NVIC_GetPriority(IRQn_Type IRQn);
jhon309 0:666850d06c9f 136 uint32_t HAL_NVIC_GetPendingIRQ(IRQn_Type IRQn);
jhon309 0:666850d06c9f 137 void HAL_NVIC_SetPendingIRQ(IRQn_Type IRQn);
jhon309 0:666850d06c9f 138 void HAL_NVIC_ClearPendingIRQ(IRQn_Type IRQn);
jhon309 0:666850d06c9f 139 void HAL_SYSTICK_CLKSourceConfig(uint32_t CLKSource);
jhon309 0:666850d06c9f 140 void HAL_SYSTICK_IRQHandler(void);
jhon309 0:666850d06c9f 141 void HAL_SYSTICK_Callback(void);
jhon309 0:666850d06c9f 142 /**
jhon309 0:666850d06c9f 143 * @}
jhon309 0:666850d06c9f 144 */
jhon309 0:666850d06c9f 145
jhon309 0:666850d06c9f 146 /**
jhon309 0:666850d06c9f 147 * @}
jhon309 0:666850d06c9f 148 */
jhon309 0:666850d06c9f 149
jhon309 0:666850d06c9f 150 /**
jhon309 0:666850d06c9f 151 * @}
jhon309 0:666850d06c9f 152 */
jhon309 0:666850d06c9f 153
jhon309 0:666850d06c9f 154 /**
jhon309 0:666850d06c9f 155 * @}
jhon309 0:666850d06c9f 156 */
jhon309 0:666850d06c9f 157
jhon309 0:666850d06c9f 158 #ifdef __cplusplus
jhon309 0:666850d06c9f 159 }
jhon309 0:666850d06c9f 160 #endif
jhon309 0:666850d06c9f 161
jhon309 0:666850d06c9f 162 #endif /* __STM32F0xx_HAL_CORTEX_H */
jhon309 0:666850d06c9f 163
jhon309 0:666850d06c9f 164
jhon309 0:666850d06c9f 165 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
jhon309 0:666850d06c9f 166