rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
config-mbed.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  */
16 
21 /*
22  Author: Michael Hauspie <michael.hauspie@univ-lille1.fr>
23  Created: 2011-07-04
24  Time-stamp: <2014-05-28 15:40:09 (hauspie)>
25 
26  This files provides the configuration of the lib for the mbed platform
27 
28 */
29 
30 #ifndef __RFLPC_CONFIG_MBED_H__
31 #define __RFLPC_CONFIG_MBED_H__
32 
39 /**************************************
40  * Clock configuration *
41  **************************************/
42 
43 
66 #define RFLPC_CLOCK_USE_MAIN_OSCILLATOR
67 
68 
69 #ifdef RFLPC_CLOCK_USE_MAIN_OSCILLATOR
70 
71 #define RFLPC_CLOCK_MAIN_OSCILLATOR_FREQUENCY 12000000
72 #endif
73 
75 #define RFLPC_CLOCK_INPUT_DIVIDER 1
76 
77 #define RFLPC_CLOCK_PLL_MULTIPLIER 12
78 
79 #define RFLPC_CLOCK_CPU_DIVIDER 3
80 
85 /**************************************
86  * DIP Pins *
87  **************************************/
94 #define MBED_DIP5 RFLPC_PIN_P0_9
95 #define MBED_DIP6 RFLPC_PIN_P0_8
96 #define MBED_DIP7 RFLPC_PIN_P0_7
97 #define MBED_DIP8 RFLPC_PIN_P0_6
98 #define MBED_DIP9 RFLPC_PIN_P0_0
99 #define MBED_DIP10 RFLPC_PIN_P0_1
100 #define MBED_DIP11 RFLPC_PIN_P0_18
101 #define MBED_DIP12 RFLPC_PIN_P0_17
102 #define MBED_DIP13 RFLPC_PIN_P0_15
103 #define MBED_DIP14 RFLPC_PIN_P0_16
104 #define MBED_DIP15 RFLPC_PIN_P0_23
105 #define MBED_DIP16 RFLPC_PIN_P0_24
106 #define MBED_DIP17 RFLPC_PIN_P0_25
107 #define MBED_DIP18 RFLPC_PIN_P0_26
108 #define MBED_DIP19 RFLPC_PIN_P1_30
109 #define MBED_DIP20 RFLPC_PIN_P1_31
110 #define MBED_DIP21 RFLPC_PIN_P2_5
111 #define MBED_DIP22 RFLPC_PIN_P2_4
112 #define MBED_DIP23 RFLPC_PIN_P2_3
113 #define MBED_DIP24 RFLPC_PIN_P2_2
114 #define MBED_DIP25 RFLPC_PIN_P2_1
115 #define MBED_DIP26 RFLPC_PIN_P2_0
116 #define MBED_DIP27 RFLPC_PIN_P0_11
117 #define MBED_DIP28 RFLPC_PIN_P0_10
118 #define MBED_DIP29 RFLPC_PIN_P0_5
119 #define MBED_DIP30 RFLPC_PIN_P0_4
120 
125 /**************************************
126  * LEDS configuration *
127  **************************************/
128 
132 #define RFLPC_LED_1_PIN RFLPC_PIN_P1_18
133 
134 #define RFLPC_LED_2_PIN RFLPC_PIN_P1_20
135 
136 #define RFLPC_LED_3_PIN RFLPC_PIN_P1_21
137 
138 #define RFLPC_LED_4_PIN RFLPC_PIN_P1_23
139 
141 /**************************************
142  * Ethernet Configuration *
143  **************************************/
149 #define RFLPC_ETH_PHY_ADDR (0x01)
150 
161 #define RFLPC_ETH_USE_EXTENDED_MII
162 
163 
168 /* UART0 settings */
170 #define RFLPC_UART0_TXD_PIN RFLPC_PIN_P0_2
171 
172 #define RFLPC_UART0_RXD_PIN RFLPC_PIN_P0_3
173 #define RFLPC_UART0_PIN_FUNCTION 1
175 /* UART2 settings */
176 
177 #define RFLPC_UART2_TXD_PIN 10
178 
179 #define RFLPC_UART2_RXD_PIN 11
180 #define RFLPC_UART2_PIN_FUNCTION 1
182 /* UART3 settings */
183 
184 #define RFLPC_UART3_TXD_PIN 0
185 
186 #define RFLPC_UART3_RXD_PIN 1
187 #define RFLPC_UART3_PIN_FUNCTION 2
194 #endif