Skip to content

Commit d4e23e1

Browse files
authored
Merge pull request #3291 from mazgch/patch-1
Adding mbed enabled Maker board with NINA-B1 and EVA-M8Q
2 parents f89bf84 + 76cfccb commit d4e23e1

File tree

3 files changed

+137
-0
lines changed

3 files changed

+137
-0
lines changed
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
#ifndef MBED_PINNAMES_H
2+
#define MBED_PINNAMES_H
3+
4+
#include "cmsis.h"
5+
6+
#ifdef __cplusplus
7+
extern "C" {
8+
#endif
9+
10+
typedef enum {
11+
PIN_INPUT,
12+
PIN_OUTPUT
13+
} PinDirection;
14+
15+
#define PORT_SHIFT 3
16+
17+
typedef enum {
18+
// nRF52 pin names
19+
p0 = 0,
20+
p1 = 1,
21+
p2 = 2,
22+
p3 = 3,
23+
p4 = 4,
24+
p5 = 5,
25+
p6 = 6,
26+
p7 = 7,
27+
p8 = 8,
28+
p9 = 9,
29+
p10 = 10,
30+
p11 = 11,
31+
p12 = 12,
32+
p13 = 13,
33+
p14 = 14,
34+
p15 = 15,
35+
p16 = 16,
36+
p17 = 17,
37+
p18 = 18,
38+
p19 = 19,
39+
p20 = 20,
40+
p21 = 21,
41+
p22 = 22,
42+
p23 = 23,
43+
p24 = 24,
44+
p25 = 25,
45+
p26 = 26,
46+
p27 = 27,
47+
p28 = 28,
48+
p29 = 29,
49+
p30 = 30,
50+
p31 = 31,
51+
NC = (int)0xFFFFFFFF, // Not connected
52+
53+
//NINA-B1 module pin names
54+
NINA_B1_GPIO_1 = p8,
55+
NINA_B1_GPIO_2 = p11,
56+
NINA_B1_GPIO_3 = p12,
57+
NINA_B1_GPIO_4 = p13,
58+
NINA_B1_GPIO_5 = p14,
59+
NINA_B1_GPIO_7 = p16,
60+
NINA_B1_GPIO_8 = p18,
61+
62+
NINA_B1_GPIO_16 = p28,
63+
NINA_B1_GPIO_17 = p29,
64+
NINA_B1_GPIO_18 = p30,
65+
66+
NINA_B1_GPIO_20 = p31,
67+
NINA_B1_GPIO_21 = p7,
68+
NINA_B1_GPIO_22 = p6,
69+
NINA_B1_GPIO_23 = p5,
70+
NINA_B1_GPIO_24 = p2,
71+
NINA_B1_GPIO_25 = p3,
72+
NINA_B1_GPIO_27 = p4,
73+
NINA_B1_GPIO_28 = p9,
74+
NINA_B1_GPIO_29 = p10,
75+
76+
// Board pins
77+
LED1 = NINA_B1_GPIO_7, // ORANGE
78+
LED2 = NC,
79+
LED3 = NC,
80+
LED4 = NC,
81+
82+
// Nordic SDK pin names
83+
RX_PIN_NUMBER = p5,
84+
TX_PIN_NUMBER = p6,
85+
CTS_PIN_NUMBER = p7,
86+
RTS_PIN_NUMBER = p31,
87+
I2C_SDA0 = p2,
88+
I2C_SCL0 = p3,
89+
90+
// mBed interface pins
91+
USBTX = TX_PIN_NUMBER,
92+
USBRX = RX_PIN_NUMBER
93+
} PinName;
94+
95+
typedef enum {
96+
PullNone = 0,
97+
PullDown = 1,
98+
PullUp = 3,
99+
PullDefault = PullUp
100+
} PinMode;
101+
102+
#ifdef __cplusplus
103+
}
104+
105+
#endif
106+
#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: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2345,6 +2345,14 @@
23452345
"release_versions": ["2", "5"],
23462346
"device_name": "nRF52832_xxAA"
23472347
},
2348+
"UBLOX_EVA_NINA": {
2349+
"inherits": ["MCU_NRF52"],
2350+
"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"],
2351+
"device_has": ["ANALOGIN", "ERROR_PATTERN", "I2C", "I2C_ASYNCH", "INTERRUPTIN", "LOWPOWERTIMER", "PORTIN", "PORTINOUT", "PORTOUT", "PWMOUT", "RTC", "SERIAL", "SERIAL_ASYNCH", "SLEEP", "SPI", "SPI_ASYNCH", "SPISLAVE"],
2352+
"release_versions": ["2", "5"],
2353+
"overrides": {"uart_hwfc": 0},
2354+
"device_name": "nRF52832_xxAA"
2355+
},
23482356
"DELTA_DFBM_NQ620": {
23492357
"supported_form_factors": ["ARDUINO"],
23502358
"inherits": ["MCU_NRF52"],

0 commit comments

Comments
 (0)