Skip to content

Commit b010223

Browse files
author
gorazd
committed
add new target L-Tek FF-LPC546XX
1 parent e1090ca commit b010223

File tree

8 files changed

+1046
-0
lines changed

8 files changed

+1046
-0
lines changed
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
#ifndef MBED_PERIPHERALNAMES_H
17+
#define MBED_PERIPHERALNAMES_H
18+
19+
#include "cmsis.h"
20+
#include "PortNames.h"
21+
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
typedef enum {
27+
OSC32KCLK = 0,
28+
} RTCName;
29+
30+
typedef enum {
31+
UART_0 = Flexcomm0,
32+
UART_2 = Flexcomm2,
33+
UART_7 = Flexcomm7
34+
} UARTName;
35+
36+
#define STDIO_UART_TX USBTX
37+
#define STDIO_UART_RX USBRX
38+
#define STDIO_UART UART_0
39+
40+
typedef enum {
41+
I2C_7 = Flexcomm7,
42+
I2C_2 = Flexcomm2
43+
} I2CName;
44+
45+
#define TPM_SHIFT 8
46+
typedef enum {
47+
PWM_1 = (0 << TPM_SHIFT) | (0), // FTM0 CH0
48+
PWM_2 = (0 << TPM_SHIFT) | (1), // FTM0 CH1
49+
PWM_3 = (0 << TPM_SHIFT) | (2), // FTM0 CH2
50+
PWM_4 = (0 << TPM_SHIFT) | (3), // FTM0 CH3
51+
PWM_5 = (0 << TPM_SHIFT) | (4), // FTM0 CH4
52+
PWM_6 = (0 << TPM_SHIFT) | (5), // FTM0 CH5
53+
PWM_7 = (0 << TPM_SHIFT) | (6), // FTM0 CH6
54+
PWM_8 = (0 << TPM_SHIFT) | (7), // FTM0 CH7
55+
PWM_9 = (1 << TPM_SHIFT) | (0), // FTM1 CH0
56+
PWM_10 = (1 << TPM_SHIFT) | (1), // FTM1 CH1
57+
PWM_11 = (1 << TPM_SHIFT) | (2), // FTM1 CH2
58+
PWM_12 = (1 << TPM_SHIFT) | (3), // FTM1 CH3
59+
PWM_13 = (1 << TPM_SHIFT) | (4), // FTM1 CH4
60+
PWM_14 = (1 << TPM_SHIFT) | (5), // FTM1 CH5
61+
PWM_15 = (1 << TPM_SHIFT) | (6), // FTM1 CH6
62+
PWM_16 = (1 << TPM_SHIFT) | (7), // FTM1 CH7
63+
PWM_17 = (2 << TPM_SHIFT) | (0), // FTM2 CH0
64+
PWM_18 = (2 << TPM_SHIFT) | (1), // FTM2 CH1
65+
PWM_19 = (2 << TPM_SHIFT) | (2), // FTM2 CH2
66+
PWM_20 = (2 << TPM_SHIFT) | (3), // FTM2 CH3
67+
PWM_21 = (2 << TPM_SHIFT) | (4), // FTM2 CH4
68+
PWM_22 = (2 << TPM_SHIFT) | (5), // FTM2 CH5
69+
PWM_23 = (2 << TPM_SHIFT) | (6), // FTM2 CH6
70+
PWM_24 = (2 << TPM_SHIFT) | (7), // FTM2 CH7
71+
PWM_25 = (3 << TPM_SHIFT) | (0), // FTM3 CH0
72+
PWM_26 = (3 << TPM_SHIFT) | (1), // FTM3 CH1
73+
PWM_27 = (3 << TPM_SHIFT) | (2), // FTM3 CH2
74+
PWM_28 = (3 << TPM_SHIFT) | (3), // FTM3 CH3
75+
PWM_29 = (3 << TPM_SHIFT) | (4), // FTM3 CH4
76+
PWM_30 = (3 << TPM_SHIFT) | (5), // FTM3 CH5
77+
PWM_31 = (3 << TPM_SHIFT) | (6), // FTM3 CH6
78+
PWM_32 = (3 << TPM_SHIFT) | (7), // FTM3 CH7
79+
} PWMName;
80+
81+
#define ADC_INSTANCE_SHIFT 8
82+
#define ADC_B_CHANNEL_SHIFT 5
83+
84+
typedef enum {
85+
ADC0_SE0 = 0,
86+
ADC0_SE1 = 1,
87+
ADC0_SE2 = 2,
88+
ADC0_SE3 = 3,
89+
ADC0_SE4 = 4,
90+
ADC0_SE5 = 5,
91+
ADC0_SE6 = 6,
92+
ADC0_SE7 = 7,
93+
ADC0_SE8 = 8,
94+
ADC0_SE9 = 9,
95+
ADC0_SE10 = 10,
96+
ADC0_SE11 = 11,
97+
} ADCName;
98+
99+
typedef enum {
100+
CAN_1 = 1
101+
} CANName;
102+
103+
typedef enum {
104+
SPI_0 = Flexcomm0,
105+
SPI_2 = Flexcomm2,
106+
SPI_3 = Flexcomm3
107+
} SPIName;
108+
109+
#ifdef __cplusplus
110+
}
111+
#endif
112+
113+
#endif
Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2013 ARM Limited
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include "PeripheralPins.h"
18+
19+
/************RTC***************/
20+
const PinMap PinMap_RTC[] = {
21+
{NC, OSC32KCLK, 0},
22+
};
23+
24+
/************ADC***************/
25+
const PinMap PinMap_ADC[] = {
26+
{P0_15, ADC0_SE3, 0},
27+
{P0_16, ADC0_SE4, 0},
28+
{P0_23, ADC0_SE11, 0},
29+
{P0_31, ADC0_SE5, 0},
30+
{P1_0, ADC0_SE6, 0},
31+
{P0_10, ADC0_SE0, 0},
32+
{NC , NC , 0}
33+
};
34+
35+
/************CAN***************/
36+
const PinMap PinMap_CAN_TD[] = {
37+
{P0_1, CAN_1, 1},
38+
{NC , NC , 0}
39+
};
40+
41+
const PinMap PinMap_CAN_RD[] = {
42+
{P0_0, CAN_1, 1},
43+
{NC , NC , 0}
44+
};
45+
46+
47+
/************DAC***************/
48+
const PinMap PinMap_DAC[] = {
49+
{NC , NC , 0}
50+
};
51+
52+
/************I2C***************/
53+
const PinMap PinMap_I2C_SDA[] = {
54+
{P0_26, I2C_2, 1},
55+
{P1_29, I2C_7, 1},
56+
{NC , NC , 0}
57+
};
58+
59+
const PinMap PinMap_I2C_SCL[] = {
60+
{P0_27, I2C_2, 1},
61+
{P1_30, I2C_7, 1},
62+
{NC , NC , 0}
63+
};
64+
65+
/************UART***************/
66+
const PinMap PinMap_UART_TX[] = {
67+
{P0_30, UART_0, 1},
68+
{P0_27, UART_2, 1},
69+
{P1_30, UART_7, 1},
70+
{NC , NC , 0}
71+
};
72+
73+
const PinMap PinMap_UART_RX[] = {
74+
{P0_29, UART_0, 1},
75+
{P0_26, UART_2, 1},
76+
{P1_29, UART_7, 1},
77+
{NC , NC , 0}
78+
};
79+
80+
const PinMap PinMap_UART_CTS[] = {
81+
{NC , NC , 0}
82+
};
83+
84+
const PinMap PinMap_UART_RTS[] = {
85+
{NC , NC , 0}
86+
};
87+
88+
/************SPI***************/
89+
const PinMap PinMap_SPI_SCLK[] = {
90+
{P1_4, SPI_0, 1},
91+
{P1_23, SPI_2, 1},
92+
{P0_6, SPI_3, 1},
93+
{NC , NC , 0}
94+
};
95+
96+
const PinMap PinMap_SPI_MOSI[] = {
97+
{P1_5, SPI_0, 1},
98+
{P1_24, SPI_2, 1},
99+
{P0_8, SPI_3, 1},
100+
{NC , NC , 0}
101+
};
102+
103+
const PinMap PinMap_SPI_MISO[] = {
104+
{P1_6, SPI_0, 1},
105+
{P1_25, SPI_2, 1},
106+
{P0_9, SPI_3, 1},
107+
{NC , NC , 0}
108+
};
109+
110+
const PinMap PinMap_SPI_SSEL[] = {
111+
{P1_7, SPI_0, 1},
112+
{P0_7, SPI_3, 1},
113+
{NC , NC , 0}
114+
};
115+
116+
/************PWM***************/
117+
const PinMap PinMap_PWM[] = {
118+
{P0_17 , PWM_1, 4},
119+
{P0_18 , PWM_2, 4},
120+
{P0_19 , PWM_3, 4},
121+
{P0_22 , PWM_4, 4},
122+
{P0_28 , PWM_8, 4},
123+
{P0_29 , PWM_9, 4},
124+
{NC , NC, 0}
125+
};

0 commit comments

Comments
 (0)