Skip to content

Commit 8d54243

Browse files
authored
Merge pull request #2615 from bcc6/master
[MTM_MTCONNECT04S] Added support for MTM_MTCONNECT04S
2 parents f6d7ee8 + b5b6fdc commit 8d54243

File tree

5 files changed

+206
-0
lines changed

5 files changed

+206
-0
lines changed

hal/targets.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,6 +1582,22 @@
15821582
"extra_labels_add": ["NRF51_MICROBIT"],
15831583
"macros_add": ["TARGET_NRF51_MICROBIT", "TARGET_NRF_LFCLK_RC"]
15841584
},
1585+
"MTM_MTCONNECT04S": {
1586+
"inherits": ["MCU_NRF51_32K"],
1587+
"progen": {"target": "mtm-mtconnect04s"},
1588+
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "INTERRUPTIN", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "SERIAL", "SLEEP", "SPI", "SPISLAVE"],
1589+
"release_versions": ["2"]
1590+
},
1591+
"MTM_MTCONNECT04S_BOOT": {
1592+
"inherits": ["MCU_NRF51_32K_BOOT"],
1593+
"extra_labels_add": ["MTM_CONNECT04S"],
1594+
"macros_add": ["TARGET_MTM_CONNECT04S"]
1595+
},
1596+
"MTM_MTCONNECT04S_OTA": {
1597+
"inherits": ["MCU_NRF51_32K_OTA"],
1598+
"extra_labels_add": ["MTM_CONNECT04S"],
1599+
"macros_add": ["TARGET_MTM_CONNECT04S"]
1600+
},
15851601

15861602
"TY51822R3": {
15871603
"inherits": ["MCU_NRF51_32K_UNIFIED"],
Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2015 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+
P0_0 = p0,
67+
P0_1 = p1,
68+
P0_2 = p2,
69+
P0_3 = p3,
70+
P0_4 = p4,
71+
P0_5 = p5,
72+
P0_6 = p6,
73+
P0_7 = p7,
74+
75+
P0_8 = p8,
76+
P0_9 = p9,
77+
P0_10 = p10,
78+
P0_11 = p11,
79+
P0_12 = p12,
80+
P0_13 = p13,
81+
P0_14 = p14,
82+
P0_15 = p15,
83+
84+
P0_16 = p16,
85+
P0_17 = p17,
86+
P0_18 = p18,
87+
P0_19 = p19,
88+
P0_20 = p20,
89+
P0_21 = p21,
90+
P0_22 = p22,
91+
P0_23 = p23,
92+
93+
P0_24 = p24,
94+
P0_25 = p25,
95+
P0_26 = p26,
96+
P0_27 = p27,
97+
P0_28 = p28,
98+
P0_29 = p29,
99+
P0_30 = p30,
100+
P0_31 = p31,
101+
102+
LEDR = p16,
103+
LEDG = p15,
104+
LEDB = p6,
105+
LED1 = LEDR,
106+
LED2 = LEDG,
107+
LED3 = LEDB,
108+
LED4 = LEDB,
109+
110+
RX_PIN_NUMBER = p4,
111+
TX_PIN_NUMBER = p5,
112+
CTS_PIN_NUMBER = p2,
113+
RTS_PIN_NUMBER = p3,
114+
115+
// mBed interface Pins
116+
USBTX = TX_PIN_NUMBER,
117+
USBRX = RX_PIN_NUMBER,
118+
119+
I2C_SDA0 = p14,
120+
I2C_SCL0 = p13,
121+
122+
// Not connected
123+
NC = (int)0xFFFFFFFF
124+
} PinName;
125+
126+
typedef enum {
127+
PullNone = 0,
128+
PullDown = 1,
129+
PullUp = 3,
130+
PullDefault = PullUp
131+
} PinMode;
132+
133+
#ifdef __cplusplus
134+
}
135+
#endif
136+
137+
#endif
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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-2015 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+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
#include "objects.h"
37+
38+
#endif
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{% extends "gcc_arm_common.tmpl" %}
2+
3+
{% block additional_variables %}
4+
SOFTDEVICE = mbed/TARGET_MTM_MTCONNECT04S/TARGET_NORDIC/TARGET_MCU_NRF51822/Lib/s130_nrf51822_1_0_0/s130_nrf51_1.0.0_softdevice.hex
5+
{% endblock %}
6+
7+
{% block additional_executables %}
8+
SREC_CAT = srec_cat
9+
{% endblock %}
10+
11+
{% block additional_targets %}
12+
merge:
13+
$(SREC_CAT) $(SOFTDEVICE) -intel $(PROJECT).hex -intel -o combined.hex -intel --line-length=44
14+
{% endblock %}

tools/export/gccarm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ class GccArm(Exporter):
108108
'NRF51_DK',
109109
'NRF51_DONGLE',
110110
'NRF51_MICROBIT',
111+
'MTM_MTCONNECT04S',
111112
'SEEED_TINY_BLE',
112113
'DISCO_F401VC',
113114
'DELTA_DFCM_NNN40',

0 commit comments

Comments
 (0)