CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
system_LPC2xxx.h
См. документацию.
1 /*
2  * CMSIS2000
3  * CMSIS-like sources for LPC2xxx series MCUs
4  *
5  * (C) Copyright 2011-2012, Dmitriy Cherepanov, All Rights Reserved
6  *
7  * Version: 0.0.7
8  * Date of the Last Update: 2013-03-04
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a copy
11  * of this software and associated documentation files (the "Software"), to
12  * deal in the Software without restriction, including without limitation the
13  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
14  * sell copies of the Software, and to permit persons to whom the Software is
15  * furnished to do so, subject to the following conditions:
16  *
17  * The above copyright notice and this permission notice shall be included in
18  * all copies or substantial portions of the Software.
19  *
20  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
25  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
26  * IN THE SOFTWARE.
27  *
28  * Do not be lasy! For the latest version see http://irtos.sourceforge.net .
29  *
30  *
31 #*/
32 #ifndef __SYSTEM_LPC2xxx_H
33 #define __SYSTEM_LPC2xxx_H
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 #include <stdint.h>
40 #include "LPC2xxx.h"
41 
42 #define constSystemCoreClock F_CCLK_HZ
43 
44 #ifdef __GNUC__
45 #if (__GNUC__ != 0)
46  #define MOVE_CODE_TO_FLASH __attribute__ ((section (".text.systeminit")))
47 #endif
48 #endif
49 
50 /** @addtogroup LPC2xxx_System LPC2xxx System
51  * @{
52  */
53 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock) */
54 /**
55  * Initialize the system
56  *
57  * @param none
58  * @return none
59  *
60  * @brief Setup the microcontroller system.
61  * Initialize the System and update the SystemCoreClock variable.
62  */
63 extern void SystemInit(void);
64 /**
65  * \brief Initialize the system VIC
66  *
67  * \return none
68  *
69  * @brief Setup the microcontroller VIC system.
70  * Initialize the VIC and reset all previous VIC interrupts.
71  */
72 extern void SystemVIC_Init(void);
73 #include "core_7tdmiInterrupt.h"
74 /**
75  * Setup and turn on Interrupt in VIC
76  \brief Set Interrupt Priority
77 
78  This function sets the priority for the specified interrupt. The interrupt
79  number can be positive to specify an external (device specific)
80  interrupt, or negative to specify an internal (core) interrupt.
81 
82  Note: The priority cannot be set for every core interrupt.
83 
84  \param [in] *isr_func ISR_HANDLER))' pointer to ISR function
85  \param [in] IRQn Number of the interrupt for set priority
86  \param [in] priority The priority of ISR
87  if priority is negative then ISR is disabled
88  so SystemVIC_SetISR(NULL,IRQn,-1) will clear ISR
89  */
90 #ifndef DOXYGEN_SHOULD_SKIP_THIS
91 extern void *SystemVIC_SetISR(ISR_HANDLER((*isr_func)),
93  signed char priority ) MOVE_CODE_TO_FLASH;
94 #else
95 extern void *SystemVIC_SetISR(*isr_func,
97  signed char priority ) MOVE_CODE_TO_FLASH;
98 
99 
100 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
101 
102 /**
103  * This macro will clear ISR
104  *
105  * \param [in] IRQn Number of the interrupt for set priority
106  *
107  */
108 #define SystemVIC_ClearISR(IRQn) SystemVIC_SetISR(NULL,IRQn,-1)
109 
110 
112 #ifdef __cplusplus
113 }
114 #endif
115 
116 /**
117  * @}
118  */
119 
120 #endif /* __SYSTEM_LPC17xx_H */