LPCOpen Platform for LPC18XX/43XX microcontrollers  18XX43XX
LPCOpen Platform for the NXP LPC18XX/43XX family of Microcontrollers
chip.h
Go to the documentation of this file.
1 /*
2  * @brief Chip inclusion selector file
3  *
4  * Copyright(C) NXP Semiconductors, 2013
5  * All rights reserved.
6  *
7  * Software that is described herein is for illustrative purposes only
8  * which provides customers with programming information regarding the
9  * LPC products. This software is supplied "AS IS" without any warranties of
10  * any kind, and NXP Semiconductors and its licensor disclaim any and
11  * all warranties, express or implied, including all implied warranties of
12  * merchantability, fitness for a particular purpose and non-infringement of
13  * intellectual property rights. NXP Semiconductors assumes no responsibility
14  * or liability for the use of the software, conveys no license or rights under any
15  * patent, copyright, mask work right, or any other intellectual property rights in
16  * or to any products. NXP Semiconductors reserves the right to make changes
17  * in the software without notification. NXP Semiconductors also makes no
18  * representation or warranty that such application will be suitable for the
19  * specified use without further testing or modification.
20  *
21  * Permission to use, copy, modify, and distribute this software and its
22  * documentation is hereby granted, under NXP Semiconductors' and its
23  * licensor's relevant copyrights in the software, without fee, provided that it
24  * is used in conjunction with NXP Semiconductors microcontrollers. This
25  * copyright, permission, and disclaimer notice must appear in all copies of
26  * this code.
27  */
28 
29 #ifndef __CHIP_H_
30 #define __CHIP_H_
31 
32 #include "sys_config.h"
33 #include "cmsis.h"
34 
35 #if defined(CHIP_LPC18XX)
36 #include "chip_lpc18xx.h"
37 
38 #elif defined(CHIP_LPC43XX)
39 #include "chip_lpc43xx.h"
40 
41 #else
42 #error CHIP_LPC18XX or CHIP_LPC43XX must be defined
43 #endif
44 
45 /* Aliasing for Chip_USB_Init */
46 #define Chip_USB_Init Chip_USB0_Init
47 
48 #ifdef __cplusplus
49 extern "C"
50 {
51 #endif
52 
63 extern const uint32_t OscRateIn;
64 
71 extern const uint32_t ExtRateIn;
72 
85 extern uint32_t SystemCoreClock;
86 
92 void SystemCoreClockUpdate(void);
93 
100 void Chip_USB0_Init(void);
101 
108 void Chip_USB1_Init(void);
109 
116 void Chip_SystemInit(void);
117 
133 void Chip_SetupCoreClock(CHIP_CGU_CLKIN_T clkin, uint32_t core_freq, bool setbase);
134 
143 void Chip_SetupXtalClocking(void);
144 
153 void Chip_SetupIrcClocking(void);
154 
159 #ifdef __cplusplus
160 }
161 #endif
162 
163 #endif /* __CHIP_H_ */