Skip to content

Commit b32151b

Browse files
author
Cruz Monrreal
authored
Merge pull request #8860 from ithinuel/aconno-port
Add the port for the ACONNO ACN52832 module on MTB's form factor
2 parents b3b0501 + fd6aa1b commit b32151b

File tree

3 files changed

+168
-0
lines changed

3 files changed

+168
-0
lines changed
Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,150 @@
1+
/********************************************************************************
2+
* \copyright
3+
* \copyright
4+
* Copyright 2018-2018, ARM Limited. All rights reserved.
5+
* SPDX-License-Identifier: Apache-2.0
6+
*******************************************************************************/
7+
8+
#ifndef MBED_PINNAMES_H
9+
#define MBED_PINNAMES_H
10+
11+
#include "cmsis.h"
12+
13+
#ifdef __cplusplus
14+
extern "C" {
15+
#endif
16+
17+
typedef enum {
18+
PIN_INPUT,
19+
PIN_OUTPUT
20+
} PinDirection;
21+
22+
#define PORT_SHIFT 3
23+
24+
typedef enum {
25+
p0 = 0,
26+
p1 = 1,
27+
p2 = 2,
28+
p3 = 3,
29+
p4 = 4,
30+
p5 = 5,
31+
p6 = 6,
32+
p7 = 7,
33+
p8 = 8,
34+
p9 = 9,
35+
p10 = 10,
36+
p11 = 11,
37+
p12 = 12,
38+
p13 = 13,
39+
p14 = 14,
40+
p15 = 15,
41+
p16 = 16,
42+
p17 = 17,
43+
p18 = 18,
44+
p19 = 19,
45+
p20 = 20,
46+
p21 = 21,
47+
p22 = 22,
48+
p23 = 23,
49+
p24 = 24,
50+
p25 = 25,
51+
p26 = 26,
52+
p27 = 27,
53+
p28 = 28,
54+
p29 = 29,
55+
p30 = 30,
56+
p31 = 31,
57+
58+
P0_0 = p0,
59+
P0_1 = p1,
60+
P0_2 = p2,
61+
P0_3 = p3,
62+
P0_4 = p4,
63+
P0_5 = p5,
64+
P0_6 = p6,
65+
P0_7 = p7,
66+
67+
P0_8 = p8,
68+
P0_9 = p9,
69+
P0_10 = p10,
70+
P0_11 = p11,
71+
P0_12 = p12,
72+
P0_13 = p13,
73+
P0_14 = p14,
74+
P0_15 = p15,
75+
76+
P0_16 = p16,
77+
P0_17 = p17,
78+
P0_18 = p18,
79+
P0_19 = p19,
80+
P0_20 = p20,
81+
P0_21 = p21,
82+
P0_22 = p22,
83+
P0_23 = p23,
84+
85+
P0_24 = p24,
86+
P0_25 = p25,
87+
P0_26 = p26,
88+
P0_27 = p27,
89+
P0_28 = p28,
90+
P0_29 = p29,
91+
P0_30 = p30,
92+
P0_31 = p31,
93+
94+
LED1 = p25,
95+
LED2 = p26,
96+
LED3 = p27,
97+
98+
AIN0 = p2,
99+
AIN1 = p3,
100+
AIN2 = p4,
101+
102+
GP0 = p19,
103+
GP1 = p20,
104+
GP2 = p28,
105+
GP3 = p29,
106+
GP4 = p30,
107+
GP5 = p31, // LCD-A0
108+
GP6 = p5, // LCD-RESET
109+
GP7 = p6, // LCD-CS
110+
GP8 = p7,
111+
112+
RX_PIN_NUMBER = p12,
113+
TX_PIN_NUMBER = p11,
114+
CTS_PIN_NUMBER = p9,
115+
RTS_PIN_NUMBER = p8,
116+
117+
// mBed interface Pins
118+
USBTX = TX_PIN_NUMBER,
119+
USBRX = RX_PIN_NUMBER,
120+
STDIO_UART_TX = TX_PIN_NUMBER,
121+
STDIO_UART_RX = RX_PIN_NUMBER,
122+
STDIO_UART_CTS = CTS_PIN_NUMBER,
123+
STDIO_UART_RTS = RTS_PIN_NUMBER,
124+
125+
SPI_MOSI = p16,
126+
SPI_MISO = p17,
127+
SPI_SCK = p18,
128+
SPI_CS = p10,
129+
130+
USER_BUTTON = GP0,
131+
132+
I2C_SDA = p14,
133+
I2C_SCL = p15,
134+
135+
// Not connected
136+
NC = (int)0xFFFFFFFF
137+
} PinName;
138+
139+
typedef enum {
140+
PullNone = 0,
141+
PullDown = 1,
142+
PullUp = 3,
143+
PullDefault = PullUp
144+
} PinMode;
145+
146+
#ifdef __cplusplus
147+
}
148+
#endif
149+
150+
#endif
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/********************************************************************************
2+
* \copyright
3+
* \copyright
4+
* Copyright 2018-2018, ARM Limited. All rights reserved.
5+
* SPDX-License-Identifier: Apache-2.0
6+
*******************************************************************************/
7+
8+
#ifndef MBED_DEVICE_H
9+
#define MBED_DEVICE_H
10+
11+
#include "objects.h"
12+
13+
#endif

targets/targets.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6606,6 +6606,11 @@
66066606
"device_name": "nRF52832_xxAA",
66076607
"detect_code": ["0466"]
66086608
},
6609+
"MTB_ACONNO_ACN52832": {
6610+
"inherits": ["MCU_NRF52832"],
6611+
"release_versions": ["5"],
6612+
"device_name": "nRF52832_xxAA"
6613+
},
66096614
"DELTA_DFBM_NQ620": {
66106615
"supported_form_factors": ["ARDUINO"],
66116616
"inherits": ["MCU_NRF52832"],

0 commit comments

Comments
 (0)