Skip to content

Commit 2c651af

Browse files
author
Marcus Chang
committed
Updated target MTB_LAIRD_BL652 to use SDK 14.2
1 parent b9f91b3 commit 2c651af

File tree

3 files changed

+269
-1
lines changed

3 files changed

+269
-1
lines changed
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2013 Nordic Semiconductor
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_PINNAMES_H
17+
#define MBED_PINNAMES_H
18+
19+
#include "cmsis.h"
20+
21+
#ifdef __cplusplus
22+
extern "C" {
23+
#endif
24+
25+
typedef enum {
26+
PIN_INPUT,
27+
PIN_OUTPUT
28+
} PinDirection;
29+
30+
#define PORT_SHIFT 3
31+
32+
typedef enum {
33+
p0 = 0,
34+
p1 = 1,
35+
p2 = 2,
36+
p3 = 3,
37+
p4 = 4,
38+
p5 = 5,
39+
p6 = 6,
40+
p7 = 7,
41+
p8 = 8,
42+
p9 = 9,
43+
p10 = 10,
44+
p11 = 11,
45+
p12 = 12,
46+
p13 = 13,
47+
p14 = 14,
48+
p15 = 15,
49+
p16 = 16,
50+
p17 = 17,
51+
p18 = 18,
52+
p19 = 19,
53+
p20 = 20,
54+
p21 = 21,
55+
p22 = 22,
56+
p23 = 23,
57+
p24 = 24,
58+
p25 = 25,
59+
p26 = 26,
60+
p27 = 27,
61+
p28 = 28,
62+
p29 = 29,
63+
p30 = 30,
64+
p31 = 31,
65+
66+
67+
P0_0 = p0,
68+
P0_1 = p1,
69+
P0_2 = p2,
70+
P0_3 = p3,
71+
P0_4 = p4,
72+
P0_5 = p5,
73+
P0_6 = p6,
74+
P0_7 = p7,
75+
76+
P0_8 = p8,
77+
P0_9 = p9,
78+
P0_10 = p10,
79+
P0_11 = p11,
80+
P0_12 = p12,
81+
P0_13 = p13,
82+
P0_14 = p14,
83+
P0_15 = p15,
84+
85+
P0_16 = p16,
86+
P0_17 = p17,
87+
P0_18 = p18,
88+
P0_19 = p19,
89+
P0_20 = p20,
90+
P0_21 = p21,
91+
P0_22 = p22,
92+
P0_23 = p23,
93+
94+
P0_24 = p24,
95+
P0_25 = p25,
96+
P0_26 = p26,
97+
P0_27 = p27,
98+
P0_28 = p28,
99+
P0_29 = p29,
100+
P0_30 = p30,
101+
P0_31 = p31,
102+
103+
// Module pins. Refer datasheet for pin numbers.
104+
SIO_1 = P0_1,
105+
SIO_2 = P0_2,
106+
SIO_3 = P0_3,
107+
SIO_4 = P0_4,
108+
SIO_5 = P0_5,
109+
SIO_6 = P0_6,
110+
SIO_7 = P0_7,
111+
SIO_8 = P0_8,
112+
SIO_9 = P0_9, //NFC1
113+
SIO_10 = P0_10, //NFC2
114+
SIO_11 = P0_11,
115+
SIO_12 = P0_12,
116+
SIO_13 = P0_13,
117+
SIO_14 = P0_14,
118+
SIO_15 = P0_15,
119+
SIO_16 = P0_16,
120+
SIO_17 = P0_17,
121+
SIO_18 = P0_18,
122+
SIO_19 = P0_19,
123+
SIO_20 = P0_20,
124+
125+
SIO_22 = P0_22,
126+
SIO_23 = P0_23,
127+
SIO_24 = P0_24,
128+
SIO_25 = P0_25,
129+
SIO_26 = P0_26,
130+
SIO_27 = P0_27,
131+
SIO_28 = P0_28,
132+
SIO_29 = P0_29,
133+
SIO_30 = P0_30,
134+
SIO_31 = P0_31,
135+
SIO_0 = P0_0,
136+
137+
// Not connected
138+
NC = (int)0xFFFFFFFF,
139+
140+
//Mbed MTB pin defines.
141+
P_1 = NC,
142+
P_2 = SIO_24, //MISO
143+
P_3 = SIO_23, //MOSI
144+
P_4 = SIO_22,
145+
// P_5 = SWDIO,
146+
// P_6 = SWDCLK,
147+
// P_7 = NRST,
148+
P_8 = SIO_20,
149+
P_9 = SIO_18,
150+
P_10 = SIO_16,
151+
P_11 = SIO_14,
152+
P_12 = SIO_12,
153+
P_13 = SIO_11,
154+
P_14 = SIO_10,
155+
P_15 = SIO_9,
156+
P_16 = NC,
157+
P_17 = SIO_8,
158+
P_18 = SIO_7,
159+
P_19 = SIO_6,
160+
P_20 = SIO_5,
161+
P_21 = SIO_4,
162+
P_22 = SIO_3,
163+
P_23 = SIO_2,
164+
P_24 = SIO_1,
165+
P_25 = SIO_0,
166+
P_26 = NC,
167+
P_27 = NC,
168+
P_28 = SIO_13,
169+
P_29 = SIO_15,
170+
P_30 = SIO_17,
171+
P_31 = SIO_19,
172+
P_32 = SIO_31,
173+
P_33 = SIO_30,
174+
P_34 = SIO_29,
175+
P_35 = SIO_28,
176+
P_36 = SIO_27,
177+
P_37 = SIO_26,
178+
P_38 = SIO_25,
179+
P_39 = NC,
180+
181+
//LEDs
182+
LED1 = SIO_28,
183+
LED2 = SIO_29,
184+
LED3 = SIO_30,
185+
LED_RED = LED1,
186+
LED_GREEN = LED2,
187+
LED_BLUE = LED3,
188+
189+
GP0 = SIO_11,
190+
//Standardized button name
191+
BUTTON1 = GP0,
192+
193+
//Nordic SDK pin names
194+
RX_PIN_NUMBER = SIO_8,
195+
TX_PIN_NUMBER = SIO_6,
196+
CTS_PIN_NUMBER = SIO_7,
197+
RTS_PIN_NUMBER = SIO_5,
198+
199+
// mBed interface Pins
200+
USBTX = TX_PIN_NUMBER,
201+
USBRX = RX_PIN_NUMBER,
202+
STDIO_UART_TX = TX_PIN_NUMBER,
203+
STDIO_UART_RX = RX_PIN_NUMBER,
204+
205+
SPI_MOSI = SIO_23,
206+
SPI_MISO = SIO_24,
207+
SPI_SS0 = SIO_17, //CS for LCD on MTB
208+
SPI_SS1 = SIO_10, //CS for SD card on MTB
209+
SPI_SCK1 = SIO_25,
210+
SPI_SCK2 = SIO_31,
211+
212+
//Default SPI
213+
SPI_SCK = SPI_SCK1,
214+
SPI_CS = SPI_SS1,
215+
216+
I2C_SDA = SIO_26,
217+
I2C_SCL = SIO_27,
218+
219+
//MTB aliases
220+
GP1 = SIO_13,
221+
AIN0 = SIO_2,
222+
AIN1 = SIO_3,
223+
AIN2 = SIO_4,
224+
GP2 = SIO_10,
225+
GP3 = SIO_9,
226+
GP4 = SIO_22,
227+
GP5 = SIO_19, //A0 for LCD on MTB
228+
GP6 = SIO_18, //RESET for LCD on MTB
229+
GP7 = SIO_17,
230+
GP8 = SIO_15,
231+
232+
} PinName;
233+
234+
typedef enum {
235+
PullNone = 0,
236+
PullDown = 1,
237+
PullUp = 3,
238+
PullDefault = PullUp
239+
} PinMode;
240+
241+
#ifdef __cplusplus
242+
}
243+
#endif
244+
245+
#endif
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// The 'features' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'features' section of the target description in 'targets.json' for more details.
3+
/* mbed Microcontroller Library
4+
* Copyright (c) 2006-2013 ARM Limited
5+
*
6+
* Licensed under the Apache License, Version 2.0 (the "License");
7+
* you may not use this file except in compliance with the License.
8+
* You may obtain a copy of the License at
9+
*
10+
* http://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing, software
13+
* distributed under the License is distributed on an "AS IS" BASIS,
14+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
* See the License for the specific language governing permissions and
16+
* limitations under the License.
17+
*/
18+
#ifndef MBED_DEVICE_H
19+
#define MBED_DEVICE_H
20+
21+
#include "objects.h"
22+
23+
#endif

targets/targets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3585,7 +3585,7 @@
35853585
}
35863586
},
35873587
"MTB_LAIRD_BL652": {
3588-
"inherits": ["MCU_NRF52"],
3588+
"inherits": ["MCU_NRF52832"],
35893589
"macros_add": ["BOARD_PCA10040", "NRF52_PAN_12", "NRF52_PAN_15", "NRF52_PAN_58", "NRF52_PAN_55", "NRF52_PAN_54", "NRF52_PAN_31", "NRF52_PAN_30", "NRF52_PAN_51", "NRF52_PAN_36", "NRF52_PAN_53", "S132", "CONFIG_GPIO_AS_PINRESET", "BLE_STACK_SUPPORT_REQD", "SWI_DISABLE0", "NRF52_PAN_20", "NRF52_PAN_64", "NRF52_PAN_62", "NRF52_PAN_63"],
35903590
"device_has_add": ["ANALOGIN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
35913591
"extra_labels_add": ["MTB_LAIRD_BL652"],

0 commit comments

Comments
 (0)