rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
clock.h
Go to the documentation of this file.
1 /* This file is part of rflpc. Copyright 2010-2011 Michael Hauspie
2  *
3  * rflpc is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * rflpc is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with rflpc. If not, see <http://www.gnu.org/licenses/>.
15  */
22 /*
23  Author: Michael Hauspie <michael.hauspie@univ-lille1.fr>
24  Created:
25  Time-stamp: <2011-09-12 15:47:02 (hauspie)>
26 */
27 #ifndef __RFLPC_CLOCK_H__
28 #define __RFLPC_CLOCK_H__
29 
30 #include "nxp/LPC17xx.h"
31 
32 
38 typedef enum
39 {
41  RFLPC_CCLK = 1,
45 
47 extern uint32_t rflpc_clock_get_system_clock();
56 extern void rflpc_clock_init(void);
58 #endif
Use the CPU clock.
Definition: clock.h:41
uint32_t rflpc_clock_get_system_clock()
returns the system clock in Hz
Divide the CPU clock by 4.
Definition: clock.h:40
rflpc_clock_divider_t
This enums defines the different cpu clock dividers for use as peripheral clocks. ...
Definition: clock.h:38
void rflpc_clock_init(void)
init the PLL0 to clock the board at its operational speed.
Divide the CPU clock by 2.
Definition: clock.h:42
Divide the CPU clock by 8.
Definition: clock.h:43