Skip to content

Commit 9f8d96a

Browse files
committed
Add the port for the ACONNO ACN52832 module on MTB's form factor
1 parent f8e1116 commit 9f8d96a

File tree

3 files changed

+201
-0
lines changed

3 files changed

+201
-0
lines changed
Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
/* mbed Microcontroller Library
2+
* Copyright (c) 2006-2018 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+
#ifndef MBED_PINNAMES_H
18+
#define MBED_PINNAMES_H
19+
20+
#include "cmsis.h"
21+
22+
#ifdef __cplusplus
23+
extern "C" {
24+
#endif
25+
26+
typedef enum {
27+
PIN_INPUT,
28+
PIN_OUTPUT
29+
} PinDirection;
30+
31+
#define PORT_SHIFT 3
32+
33+
typedef enum {
34+
p0 = 0,
35+
p1 = 1,
36+
p2 = 2,
37+
p3 = 3,
38+
p4 = 4,
39+
p5 = 5,
40+
p6 = 6,
41+
p7 = 7,
42+
p8 = 8,
43+
p9 = 9,
44+
p10 = 10,
45+
p11 = 11,
46+
p12 = 12,
47+
p13 = 13,
48+
p14 = 14,
49+
p15 = 15,
50+
p16 = 16,
51+
p17 = 17,
52+
p18 = 18,
53+
p19 = 19,
54+
p20 = 20,
55+
p21 = 21,
56+
p22 = 22,
57+
p23 = 23,
58+
p24 = 24,
59+
p25 = 25,
60+
p26 = 26,
61+
p27 = 27,
62+
p28 = 28,
63+
p29 = 29,
64+
p30 = 30,
65+
p31 = 31,
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+
LED1 = p25,
104+
LED2 = p26,
105+
LED3 = p27,
106+
107+
AIN0 = p2,
108+
AIN1 = p3,
109+
AIN2 = p4,
110+
111+
GP0 = p19,
112+
GP1 = p20,
113+
GP2 = p28,
114+
GP3 = p29,
115+
GP4 = p30,
116+
GP5 = p31,
117+
GP6 = p5,
118+
GP7 = p6,
119+
GP8 = p7,
120+
121+
RX_PIN_NUMBER = p12,
122+
TX_PIN_NUMBER = p11,
123+
CTS_PIN_NUMBER = p9,
124+
RTS_PIN_NUMBER = p8,
125+
126+
// mBed interface Pins
127+
USBTX = TX_PIN_NUMBER,
128+
USBRX = RX_PIN_NUMBER,
129+
STDIO_UART_TX = TX_PIN_NUMBER,
130+
STDIO_UART_RX = RX_PIN_NUMBER,
131+
STDIO_UART_CTS = CTS_PIN_NUMBER,
132+
STDIO_UART_RTS = RTS_PIN_NUMBER,
133+
134+
SPI_MOSI = p16,
135+
SPI_MISO = p17,
136+
SPI_SCK = p18,
137+
138+
USER_BUTTON = GP0,
139+
140+
I2C_SDA = p14,
141+
I2C_SCL = p15,
142+
143+
// Not connected
144+
NC = (int)0xFFFFFFFF
145+
} PinName;
146+
147+
typedef enum {
148+
PullNone = 0,
149+
PullDown = 1,
150+
PullUp = 3,
151+
PullDefault = PullUp
152+
} PinMode;
153+
154+
#ifdef __cplusplus
155+
}
156+
#endif
157+
158+
#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-2018 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

targets/targets.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6571,6 +6571,11 @@
65716571
"WSF_MAX_HANDLERS=10"
65726572
]
65736573
},
6574+
"MTB_ACONNO_ACN52832": {
6575+
"inherits": ["MCU_NRF52832"],
6576+
"release_versions": ["5"],
6577+
"device_name": "nRF52832_xxAA"
6578+
},
65746579
"SDT52832B": {
65756580
"inherits": ["MCU_NRF52832"],
65766581
"release_versions": ["5"],

0 commit comments

Comments
 (0)