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:
Wed May 13 08:08:21 2015 +0200
Revision:
99:dbbf35b96557
Release 99 of the mbed library

Changes:
- new targets - MAXWSNENV, DISCO_L053C8
- STM32F4xx - ST Cube driver
- KSDK mcu - SPI timing fix
- Nordic - update to softdevice s130

Who changed what in which revision?

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