CMSIS2000  0.0.7
 Указатель Структуры данных Файлы Функции Переменные Определения типов Перечисления Элементы перечислений Макросы Группы Страницы
system_LPC17xx.h
См. документацию.
1 /**************************************************************************//**
2  * @file system_LPC17xx.h
3  * @brief CMSIS Cortex-M3 Device Peripheral Access Layer Header File
4  * for the NXP LPC17xx Device Series
5  * @version V1.02
6  * @date 08. September 2009
7  *
8  * @note
9  * Copyright (C) 2009 ARM Limited. All rights reserved.
10  *
11  * @par
12  * ARM Limited (ARM) is supplying this software for use with Cortex-M
13  * processor based microcontrollers. This file can be freely distributed
14  * within development tools that are supporting such ARM based processors.
15  *
16  * @par
17  * THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
18  * OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
19  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
20  * ARM SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
21  * CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
22  *
23  ******************************************************************************/
24 
25 
26 #ifndef __SYSTEM_LPC17xx_H
27 #define __SYSTEM_LPC17xx_H
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 #include <stdint.h>
34 
35 /** @addtogroup LPC17xx_System
36  * @{
37  */
38 
39 
40 extern uint32_t SystemCoreClock; /*!< System Clock Frequency (Core Clock)*/
41 #ifdef i_MCU_MODEL
42 #if ((i_MCU_MODEL >= 1770) && (i_MCU_MODEL < 1800))
43  extern uint32_t PeripheralClock;/*!< Peripheral Clock Frequency (Pclk)*/
44  extern uint32_t EMCClock; /*!< EMC Clock*/
45  extern uint32_t USBClock; /*!< USB Frequency*/
46 #endif
47 #endif
48 
49 
50 /**
51  * Initialize the system
52  *
53  * @param none
54  * @return none
55  *
56  * @brief Setup the microcontroller system.
57  * Initialize the System and update the SystemCoreClock variable.
58  */
59 extern void SystemInit (void);
60 
61 /**
62  * Update SystemCoreClock variable
63  *
64  * @param none
65  * @return none
66  *
67  * @brief Updates the SystemCoreClock with current core Clock
68  * retrieved from cpu registers.
69  */
70 extern void SystemCoreClockUpdate (void);
71 
72 /*----------------------------------------------------------------------------
73  Define clocks
74  *----------------------------------------------------------------------------*/
75 #ifndef XTAL_HZ
76  #define XTAL_HZ (12000000UL) /* Oscillator frequency */
77 #endif
78 #ifndef OSC_CLK
79  #define OSC_CLK ( XTAL_HZ) /* Main oscillator frequency */
80 #endif
81 #ifndef RTC_CLK
82  #define RTC_CLK ( 32768UL) /* RTC oscillator frequency */
83 #endif
84 #ifndef IRC_OSC
85  #define IRC_OSC ( 4000000UL) /* Internal RC oscillator frequency */
86 #endif
87 #ifndef WDT_OSC
88  #define WDT_OSC ( 500000UL) /* Internal WDT oscillator frequency */
89 #endif
90 /*
91 //-------- <<< end of configuration section >>> ------------------------------
92 */
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 /**
99  * @}
100  */
101 
102 #endif /* __SYSTEM_LPC17xx_H */