Fork of the official mbed C/C SDK provides the software platform and libraries to build your applications for RenBED.

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Mar 17 14:27:45 2015 +0000
Revision:
96:487b796308b0
Parent:
92:4fc01daae5a5
Release 96 of the mbed library

Changes:
- IAR support for ble boards, lpc, ethernet stack
- RTC - attach function to redirect time functions
- Nucleo F103RB - cube driver
- k20xx - fixes for teensy and k20 platforms in sleep/deepsleep and usb
- STM32L0, Nucleo/Disco L053 - refactoring

Who changed what in which revision?

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