Skip to content

Commit 2e9c334

Browse files
Ashok RaoAshok Rao
authored andcommitted
Adding LAIRD_BL600 MTB
1 parent 10c8177 commit 2e9c334

File tree

3 files changed

+281
-0
lines changed

3 files changed

+281
-0
lines changed
Lines changed: 233 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,233 @@
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+
102+
// Module pins. Refer datasheet for pin numbers.
103+
SIO_1 = P0_1,
104+
SIO_2 = P0_2,
105+
SIO_3 = P0_3,
106+
SIO_4 = P0_4,
107+
SIO_5 = P0_5,
108+
SIO_6 = P0_6,
109+
SIO_7 = P0_7,
110+
SIO_8 = P0_8,
111+
SIO_9 = P0_9,
112+
SIO_10 = P0_10,
113+
SIO_11 = P0_11,
114+
SIO_12 = P0_12,
115+
SIO_13 = P0_13,
116+
SIO_14 = P0_14,
117+
SIO_15 = P0_15,
118+
SIO_16 = P0_16,
119+
SIO_17 = P0_17,
120+
SIO_18 = P0_18,
121+
SIO_19 = P0_19,
122+
SIO_20 = P0_20,
123+
SIO_21 = P0_21,
124+
SIO_22 = P0_22,
125+
SIO_23 = P0_23,
126+
SIO_24 = P0_24,
127+
SIO_25 = P0_25,
128+
SIO_26 = P0_26,
129+
SIO_27 = P0_27,
130+
SIO_28 = P0_28,
131+
SIO_29 = P0_29,
132+
SIO_30 = P0_30,
133+
SIO_0 = P0_0,
134+
135+
// Not connected
136+
NC = (int)0xFFFFFFFF,
137+
138+
//Mbed MTB pin defines.
139+
P_1 = NC,
140+
P_2 = SIO_1,
141+
P_3 = NC,
142+
P_4 = SIO_2,
143+
P_5 = SIO_3,
144+
P_6 = SIO_4,
145+
P_7 = SIO_5,
146+
P_8 = SIO_6,
147+
P_9 = SIO_7,
148+
P_10 = NC,
149+
P_11 = NC,
150+
P_12 = SIO_8,
151+
P_13 = SIO_9,
152+
P_14 = SIO_10,
153+
P_15 = SIO_11,
154+
P_16 = SIO_12,
155+
P_17 = NC,
156+
P_18 = SIO_13,
157+
P_19 = SIO_14,
158+
P_20 = SIO_15,
159+
P_21 = SIO_16,
160+
P_22 = NC,
161+
P_23 = NC,
162+
P_24 = SIO_17,
163+
P_25 = SIO_18,
164+
P_26 = SIO_19,
165+
P_27 = SIO_20,
166+
P_28 = NC,
167+
P_29 = NC,
168+
P_30 = NC,
169+
P_31 = NC,
170+
P_32 = SIO_21,
171+
P_33 = SIO_22,
172+
P_34 = SIO_23,
173+
P_35 = SIO_24,
174+
P_36 = SIO_25,
175+
P_37 = NC,
176+
P_38 = SIO_26,
177+
P_39 = SIO_27,
178+
P_40 = SIO_28,
179+
P_41 = SIO_29,
180+
P_42 = SIO_30,
181+
P_43 = NC,
182+
P_44 = SIO_0,
183+
184+
LED1 = SIO_4,
185+
LED2 = SIO_5,
186+
LED3 = SIO_6,
187+
188+
//Standardized button name
189+
BUTTON1 = SIO_30,
190+
191+
//Nordic SDK pin names
192+
RX_PIN_NUMBER = p22,
193+
TX_PIN_NUMBER = p21,
194+
CTS_PIN_NUMBER = p24,
195+
RTS_PIN_NUMBER = p23,
196+
197+
// mBed interface Pins
198+
USBTX = MBED_CONF_TARGET_USB_TX,
199+
USBRX = MBED_CONF_TARGET_USB_RX,
200+
201+
SPI_MOSI0 = SIO_10,
202+
SPI_MISO0 = SIO_11,
203+
SPI_SS0 = SIO_19, //CS for LCD on MTB
204+
SPI_SCK0 = SIO_12,
205+
206+
SPI_MOSI1 = SIO_27,
207+
SPI_MISO1 = SIO_28,
208+
SPI_SS1 = SIO_7, //CS for SD card on MTB
209+
SPI_SCK1 = SIO_29,
210+
211+
//Default SPI
212+
SPIS_PSELMOSI = SPI_MOSI0,
213+
SPIS_PSELMISO = SPI_MISO0,
214+
SPIS_PSELSS = SPI_SS0,
215+
SPIS_PSELSCK = SPI_SCK0,
216+
217+
I2C_SDA0 = SIO_8,
218+
I2C_SCL0 = SIO_9,
219+
220+
} PinName;
221+
222+
typedef enum {
223+
PullNone = 0,
224+
PullDown = 1,
225+
PullUp = 3,
226+
PullDefault = PullUp
227+
} PinMode;
228+
229+
#ifdef __cplusplus
230+
}
231+
#endif
232+
233+
#endif
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// The 'provides' section in 'target.json' is now used to create the device's hardware preprocessor switches.
2+
// Check the 'provides' 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: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,6 +2463,31 @@
24632463
"extra_labels_add": ["MTM_CONNECT04S"],
24642464
"macros_add": ["TARGET_MTM_CONNECT04S"]
24652465
},
2466+
"MTB_LAIRD_BL600": {
2467+
"inherits": ["MCU_NRF51_32K_UNIFIED"],
2468+
"device_has": ["ANALOGIN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SERIAL_FC", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
2469+
"device_name": "nRF51822_xxAA",
2470+
"release_versions" : ["5"],
2471+
"extra_labels_add": ["MTB_LAIRD_BL600"],
2472+
"config": {
2473+
"usb_tx": {
2474+
"help": "Value SIO_21",
2475+
"value": "SIO_21"
2476+
},
2477+
"usb_rx": {
2478+
"help": "Value SIO_22",
2479+
"value": "SIO_22"
2480+
},
2481+
"stdio_uart": {
2482+
"help": "Value: UART_0",
2483+
"value": "UART_0",
2484+
"macro_name": "STDIO_UART"
2485+
}
2486+
},
2487+
"overrides": {
2488+
"uart_hwfc": 0
2489+
}
2490+
},
24662491
"TY51822R3": {
24672492
"inherits": ["MCU_NRF51_32K_UNIFIED"],
24682493
"macros_add": ["TARGET_NRF_32MHZ_XTAL"],

0 commit comments

Comments
 (0)