Skip to content

Commit 6eeddcb

Browse files
authored
Merge pull request mysensors#3 from d00616/master
Rename files. Variable structure like Arduino Primo
2 parents 457e711 + 4533429 commit 6eeddcb

File tree

17 files changed

+866
-247
lines changed

17 files changed

+866
-247
lines changed

.ci/arduino.groovy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def buildnRF52832(config, sketches, String key) {
4242
def fqbn = '-fqbn=MySensors:nRF5:MyBoard_nRF52832:bootcode=none,lfclk=lfxo,reset=notenable -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m4'
4343
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (nRF52832 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
4444
try {
45-
buildArduino(config, fqbn, config.repository_root+'libraries/MyNRF5Board/examples/MyNRF5Board/MyNRF5Board.ino', key+'_nRF52832')
45+
buildArduino(config, fqbn, config.repository_root+'libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino', key+'_nRF52832')
4646
} catch (ex) {
4747
echo "Build failed with: "+ ex.toString()
4848
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (nRF52832 - '+key+')', 'Build error', '${BUILD_URL}')
@@ -66,7 +66,7 @@ def buildnRF51822(config, sketches, String key) {
6666
def fqbn = '-fqbn=MySensors:nRF5:MyBoard_nRF51822:chip=xxaa,bootcode=none,lfclk=lfxo -prefs build.f_cpu=16000000 -prefs build.mcu=cortex-m0'
6767
config.pr.setBuildStatus(config, 'PENDING', 'Toll gate (nRF51822 - '+key+')', 'Building...', '${BUILD_URL}flowGraphTable/')
6868
try {
69-
buildArduino(config, fqbn, config.repository_root+'libraries/MyNRF5Board/examples/MyNRF5Board/MyNRF5Board.ino', key+'_nRF51822')
69+
buildArduino(config, fqbn, config.repository_root+'libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino', key+'_nRF51822')
7070
} catch (ex) {
7171
echo "Build failed with: "+ ex.toString()
7272
config.pr.setBuildStatus(config, 'FAILURE', 'Toll gate (nRF51822 - '+key+')', 'Build error', '${BUILD_URL}')

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Current build status of master branch with respect to the master and development
88

99
Current build status of master branch with respect to the master and development branch of the MySensors library using the nightly build of the Arduino IDE: [![Build Status](https://ci.mysensors.org/job/MySensors-nightly-IDE/job/ArduinoHwNRF5/job/master/badge/icon)](https://ci.mysensors.org/job/MySensors-nightly-IDE/job/ArduinoHwNRF5/job/master/)
1010

11-
## MyNRF5Board
11+
## MyBoardNRF5
1212

1313
This repository allows managing the nRF5 pin mapping as part of your code.
1414
You can use the method for any nRF51822 or nRF52832 board or module.
@@ -24,27 +24,27 @@ To use the custom pin mapping you have to do following steps:
2424
https://github.com/sandeepmistry/arduino-nRF5/
2525
2. Install the "My Sensors nRF5 Boards" with the board manager like
2626
explained at https://github.com/mysensors/ArduinoBoards
27-
3. Copy the files "MyNRF5Board.cpp" and "MyNRF5Board.h" from
28-
"MyNRF5Board" example into your sketch.
29-
4. Modify pin mappings in "MyNRF5Board.cpp" and "MyNRF5Board.h" to fit
27+
3. Copy the files "MyBoardNRF5.cpp" and "MyBoardNRF5.h" from
28+
"MyBoardNRF5" example into your sketch.
29+
4. Modify pin mappings in "MyBoardNRF5.cpp" and "MyBoardNRF5.h" to fit
3030
your requirements.
31-
5. Select "MyNRF5Board nrf52832" or "MyNRF5Board nrf52822" as your board.
31+
5. Select "MyBoardNRF5 nrf52832" or "MyBoardNRF5 nrf52822" as your board.
3232
Choose the correct parameters and programmer in the Tools menu.
3333

34-
### MyNRF5Board.h
34+
### MyBoardNRF5.h
3535

3636
This file allows you to change the pins of internal hardware, like the
3737
serial port, SPI bus or Wire bus.
3838

3939
All pins referenced here are mapped via the "g_ADigitalPinMap" Array
40-
defined in "MyNRF5Board.cpp" to pins of the MCU.
40+
defined in "MyBoardNRF5.cpp" to pins of the MCU.
4141

4242
As an example, if you have at the third position in "g_ADigitalPinMap" the
4343
12, then all ports referenced in Arduino with 2 are mapped to P0.12. If you
4444
don't change the "g_ADigitalPinMap" Array, the Arduino pins 0..31 are
4545
translated to P0.00..P0..31.
4646

47-
### MyNRF5Board.cpp
47+
### MyBoardNRF5.cpp
4848

4949
This file allows you to change the relation between pins referenced in
5050
the Arduino IDE (0..31) and pins of the nRF5 MCU (P0.00..P0.31).
@@ -65,7 +65,7 @@ The pin mapping effects commands like "pinMode()", "digitalWrite()",
6565
"analogRead()" and "analogWrite()".
6666

6767
If you change the pin mapping, you have to modify the pins in
68-
"MyNRF5Board.h". Especially the analog pin mapping must be replaced with
68+
"MyBoardNRF5.h". Especially the analog pin mapping must be replaced with
6969
your pin numbers by replacing PIN_AIN0..7 with a number of your mapping
7070
array. You can use the constants PIN_AIN0..7 in the "g_ADigitalPinMap"
7171
Array if you want to reference analog ports MCU independent. You cannot

boards.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ menu.bootcode=Bootloader/SD
2121
menu.lfclk=Low Frequency Clock
2222
menu.reset=Reset
2323

24-
# MyNRF5Board nRF52832
24+
# MyBoardNRF5 nRF52832
2525
# Board definition is expected in
2626
# MyBoard.cpp and MyBoard.h as part
2727
# of the sketch
2828
###################################
2929

30-
MyBoard_nRF52832.name=MyNRF5Board nRF52832
30+
MyBoard_nRF52832.name=MyBoardNRF5 nRF52832
3131

3232
MyBoard_nRF52832.bootloader.tool=sandeepmistry:openocd
3333

@@ -39,9 +39,9 @@ MyBoard_nRF52832.build.mcu=cortex-m4
3939
MyBoard_nRF52832.build.f_cpu=16000000
4040
MyBoard_nRF52832.build.board=GENERIC
4141
MyBoard_nRF52832.build.core=sandeepmistry:nRF5
42-
MyBoard_nRF52832.build.variant=MyNRF5Board
42+
MyBoard_nRF52832.build.variant=MyBoardNRF5
4343
MyBoard_nRF52832.build.variant_system_lib=
44-
# -I{build.path} and -DMYNRF5BOARD is only required by MyNRF5Board
44+
# -I{build.path} and -DMYNRF5BOARD is only required by MyBoardNRF5
4545
MyBoard_nRF52832.build.extra_flags=-DNRF52 -DMYNRF5BOARD -I{build.path}
4646
MyBoard_nRF52832.build.float_flags=-mfloat-abi=hard -mfpu=fpv4-sp-d16
4747
MyBoard_nRF52832.build.ldscript=nrf52_xxaa.ld
@@ -68,13 +68,13 @@ MyBoard_nRF52832.menu.reset.enabled=Enable
6868
MyBoard_nRF52832.menu.reset.enabled.build.reset_flags=-DCONFIG_GPIO_AS_PINRESET
6969

7070

71-
# MyNRF5Board nRF51822
71+
# MyBoardNRF5 nRF51822
7272
# Board definition is expected in
7373
# MyBoard.cpp and MyBoard.h as part
7474
# of the sketch
7575
###################################
7676

77-
MyBoard_nRF51822.name=MyNRF5Board nRF51822
77+
MyBoard_nRF51822.name=MyBoardNRF5 nRF51822
7878
MyBoard_nRF51822.bootloader.tool=sandeepmistry:openocd
7979
MyBoard_nRF51822.upload.tool=sandeepmistry:openocd
8080
MyBoard_nRF51822.upload.target=nrf51
@@ -84,9 +84,9 @@ MyBoard_nRF51822.build.mcu=cortex-m0
8484
MyBoard_nRF51822.build.f_cpu=16000000
8585
MyBoard_nRF51822.build.board=GENERIC
8686
MyBoard_nRF51822.build.core=sandeepmistry:nRF5
87-
MyBoard_nRF51822.build.variant=MyNRF5Board
87+
MyBoard_nRF51822.build.variant=MyBoardNRF5
8888
MyBoard_nRF51822.build.variant_system_lib=
89-
# -I{build.path} and -DMYNRF5BOARD is only required by MyNRF5Board
89+
# -I{build.path} and -DMYNRF5BOARD is only required by MyBoardNRF5
9090
MyBoard_nRF51822.build.extra_flags=-DNRF51 -DMYNRF5BOARD -I{build.path}
9191
MyBoard_nRF51822.build.float_flags=
9292
MyBoard_nRF51822.build.ldscript=nrf51_{build.chip}.ld
File renamed without changes.
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
/*
2+
If you don't use an nRF5 board, you can ignore this file.
3+
4+
This file was part of the "My Sensors nRF5 Boards" board repository
5+
available at https://github.com/mysensors/ArduinoBoards If you have
6+
questions, please refer the documentation at
7+
https://github.com/mysensors/ArduinoHwNRF5 first.
8+
9+
This file is compatible with ArduinoHwNRF5 >= 0.2.0
10+
11+
This file allows you to change the relation between pins referenced in
12+
the Arduino IDE (0..31) and pins of the nRF5 MCU (P0.00..P0.31).
13+
14+
If you can live with addressing the GPIO pins by using the Arduino pins
15+
0..31 instead of a custom mapping, don't change this file. If you have
16+
a lot of Arduino code with fixed pin numbers and you need to map these
17+
pins to specific pins of the nRF5 MCU; you need to change this file.
18+
19+
If you fill the "g_APinDescription" Array with numbers between 0..31,
20+
the Arduino pins 0..31 are assigned to pins P0.00..P0.31 of the MCU.
21+
22+
As an example, if you need to change the pin mapping for Arduino pin 5
23+
to P0.12 of the MCU, you have to write the 12 after PORT0 into the sixth
24+
position in the "g_APinDescription" Array.
25+
26+
The extended attributes only affects the nRF5 variants provided with
27+
official Arduino boards. The arduino-nrf5 variant ignores the extended
28+
attributes.
29+
30+
The pin mapping effects commands like "pinMode()", "digitalWrite()",
31+
"analogRead()" and "analogWrite()".
32+
33+
If you change the pin mapping, you have to modify the pins in
34+
"MyBoardNRF5.h". Especially the analog pin mapping must be replaced with
35+
your pin numbers by replacing PIN_AIN0..7 with a number of your mapping
36+
array. You can use the constants PIN_AIN0..7 in the "g_APinDescription"
37+
Array if you want to reference analog ports MCU independent. You cannot
38+
use the pins P0.00 and P0.01 for GPIO, when the 32kHz crystal is connected.
39+
40+
41+
###########################################################################
42+
43+
Copyright (c) 2014-2015 Arduino LLC. All right reserved.
44+
Copyright (c) 2016 Arduino Srl. All right reserved.
45+
Copyright (c) 2017 Sensnology AB. All right reserved.
46+
47+
This library is free software; you can redistribute it and/or
48+
modify it under the terms of the GNU Lesser General Public
49+
License as published by the Free Software Foundation; either
50+
version 2.1 of the License, or (at your option) any later version.
51+
52+
This library is distributed in the hope that it will be useful,
53+
but WITHOUT ANY WARRANTY; without even the implied warranty of
54+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
55+
See the GNU Lesser General Public License for more details.
56+
57+
You should have received a copy of the GNU Lesser General Public
58+
License along with this library; if not, write to the Free Software
59+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
60+
*/
61+
62+
63+
64+
#ifdef MYNRF5BOARD
65+
#include <variant.h>
66+
67+
/*
68+
* Pins descriptions. Attributes are ignored by arduino-nrf5 variant.
69+
* Definition taken from Arduino Primo Core with ordered ports
70+
*/
71+
const PinDescription g_APinDescription[]=
72+
{
73+
{ NOT_A_PORT, 0, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // LFCLK
74+
{ NOT_A_PORT, 1, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // LFCLK
75+
{ PORT0, 2, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A0, PWM4, NOT_ON_TIMER},
76+
{ PORT0, 3, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A1, PWM5, NOT_ON_TIMER},
77+
{ PORT0, 4, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A2, PWM6, NOT_ON_TIMER},
78+
{ PORT0, 5, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A3, PWM7, NOT_ON_TIMER},
79+
{ PORT0, 6, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // INT3
80+
{ PORT0, 7, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // INT4
81+
{ PORT0, 8, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM10, NOT_ON_TIMER}, //USER_LED
82+
{ PORT0, 9, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // NFC1
83+
{ PORT0, 10, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // NFC2
84+
{ PORT0, 11, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // TX
85+
{ PORT0, 12, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // RX
86+
{ PORT0, 13, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // SDA
87+
{ PORT0, 14, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // SCL
88+
{ PORT0, 15, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // SDA1
89+
{ PORT0, 16, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // SCL1
90+
{ PORT0, 17, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // TP4
91+
{ PORT0, 18, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // TP5
92+
{ PORT0, 19, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // INT2
93+
{ PORT0, 20, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // INT1
94+
{ PORT0, 21, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // INT1
95+
{ PORT0, 22, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM9, NOT_ON_TIMER},
96+
{ PORT0, 23, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM8, NOT_ON_TIMER},
97+
{ PORT0, 24, PIO_DIGITAL, PIN_ATTR_DIGITAL, No_ADC_Channel, NOT_ON_PWM, NOT_ON_TIMER}, // INT
98+
{ PORT0, 25, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM11, NOT_ON_TIMER}, //RED_LED
99+
{ PORT0, 26, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM11, NOT_ON_TIMER}, //GREEN_LED
100+
{ PORT0, 27, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), No_ADC_Channel, PWM11, NOT_ON_TIMER}, //BLUE_LED
101+
{ PORT0, 28, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A4, PWM3, NOT_ON_TIMER},
102+
{ PORT0, 29, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A5, PWM2, NOT_ON_TIMER},
103+
{ PORT0, 30, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A6, PWM1, NOT_ON_TIMER},
104+
{ PORT0, 31, PIO_DIGITAL, (PIN_ATTR_DIGITAL|PIN_ATTR_PWM), ADC_A7, PWM0, NOT_ON_TIMER}
105+
};
106+
107+
#endif

libraries/MyNRF5Board/examples/MyNRF5Board/MyNRF5Board.h renamed to libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.h

Lines changed: 42 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
questions, please refer the documentation at
77
https://github.com/mysensors/ArduinoHwNRF5 first.
88
9-
This file is compatible with ArduinoHwNRF5 > 0.1.0
9+
This file is compatible with ArduinoHwNRF5 >= 0.2.0
1010
1111
This file allows you to change the pins of internal hardware, like the
1212
serial port, SPI bus or Wire bus.
1313
1414
All pins referenced here are mapped via the "g_ADigitalPinMap" Array
15-
defined in "MyNRF5Board.cpp" to pins of the MCU.
15+
defined in "MyBoardNRF5.cpp" to pins of the MCU.
1616
1717
As an example, if you have at the third position in "g_ADigitalPinMap" the
1818
12, then all ports referenced in Arduino with 2 are mapped to P0.12. If you
@@ -64,14 +64,19 @@ extern "C"
6464
* https://github.com/mysensors/MySensors/blob/development/drivers/NRF5/nrf5_wiring_constants.h
6565
*
6666
*/
67-
#define PIN_LED1 (13)
68-
// #define PIN_LED2 (9)
69-
// #define PIN_LED3 (10)
70-
// #define PIN_LED4 (11)
71-
// #define PIN_LED5 (12)
72-
// #define PIN_LED6 (14)
73-
// #define PIN_LED7 (15)
74-
// #define PIN_LED8 (16)
67+
#define PIN_LED1 (8)
68+
// #define PIN_LED2 (25)
69+
// #define PIN_LED3 (26)
70+
// #define PIN_LED4 (27)
71+
// #define PIN_LED5 (12)
72+
// #define PIN_LED6 (14)
73+
// #define PIN_LED7 (15)
74+
// #define PIN_LED8 (16)
75+
// #define USER_LED (PIN_LED2)
76+
// #define RED_LED (PIN_LED3)
77+
// #define GREEN_LED (PIN_LED4)
78+
// #define BLUE_LED (PIN_LED1)
79+
// #define BLE_LED BLUE_LED
7580
#define LED_BUILTIN PIN_LED1
7681

7782
/*
@@ -91,21 +96,21 @@ extern "C"
9196
/*
9297
* Analog ports
9398
*
94-
* If you change g_ADigitalPinMap, replace PIN_AIN0 with
95-
* port numbers mapped by the g_ADigitalPinMap Array.
96-
* You can add PIN_AIN0 to the g_ADigitalPinMap Array if
99+
* If you change g_APinDescription, replace PIN_AIN0 with
100+
* port numbers mapped by the g_APinDescription Array.
101+
* You can add PIN_AIN0 to the g_APinDescription Array if
97102
* you want provide analog ports MCU independed, you can add
98-
* PIN_AIN0..PIN_AIN7 to your custom g_ADigitalPinMap Array
99-
* defined in MyNRF5Board.cpp
103+
* PIN_AIN0..PIN_AIN7 to your custom g_APinDescription Array
104+
* defined in MyBoardNRF5.cpp
100105
*/
101-
static const uint8_t A0 = PIN_AIN0;
102-
static const uint8_t A1 = PIN_AIN1;
103-
static const uint8_t A2 = PIN_AIN2;
104-
static const uint8_t A3 = PIN_AIN3;
105-
static const uint8_t A4 = PIN_AIN4;
106-
static const uint8_t A5 = PIN_AIN5;
107-
static const uint8_t A6 = PIN_AIN6;
108-
static const uint8_t A7 = PIN_AIN7;
106+
static const uint8_t A0 = ADC_A0;
107+
static const uint8_t A1 = ADC_A1;
108+
static const uint8_t A2 = ADC_A2;
109+
static const uint8_t A3 = ADC_A3;
110+
static const uint8_t A4 = ADC_A4;
111+
static const uint8_t A5 = ADC_A5;
112+
static const uint8_t A6 = ADC_A6;
113+
static const uint8_t A7 = ADC_A7;
109114

110115
/*
111116
* Serial interfaces
@@ -114,10 +119,10 @@ static const uint8_t A7 = PIN_AIN7;
114119
* If you have no serial port, use unused pins
115120
* CTS and RTS are optional.
116121
*/
117-
#define PIN_SERIAL_RX (2)
118-
#define PIN_SERIAL_TX (3)
119-
// #define PIN_SERIAL_CTS (4)
120-
// #define PIN_SERIAL_RTS (5)
122+
#define PIN_SERIAL_RX (12)
123+
#define PIN_SERIAL_TX (11)
124+
// #define PIN_SERIAL_CTS (13)
125+
// #define PIN_SERIAL_RTS (14)
121126

122127
/*
123128
* SPI Interfaces
@@ -129,10 +134,10 @@ static const uint8_t A7 = PIN_AIN7;
129134
*/
130135
#define SPI_INTERFACES_COUNT 1
131136

132-
#define PIN_SPI_MISO (22)
133-
#define PIN_SPI_MOSI (23)
134-
#define PIN_SPI_SCK (24)
135-
#define PIN_SPI_SS (21)
137+
#define PIN_SPI_MISO (2)
138+
#define PIN_SPI_MOSI (3)
139+
#define PIN_SPI_SCK (4)
140+
#define PIN_SPI_SS (5)
136141

137142
static const uint8_t SS = PIN_SPI_SS;
138143
static const uint8_t MOSI = PIN_SPI_MOSI;
@@ -144,10 +149,13 @@ static const uint8_t SCK = PIN_SPI_SCK;
144149
*
145150
* This is optional
146151
*/
147-
#define WIRE_INTERFACES_COUNT 1
152+
#define WIRE_INTERFACES_COUNT 2
153+
154+
#define PIN_WIRE_SDA (13u)
155+
#define PIN_WIRE_SCL (14u)
148156

149-
#define PIN_WIRE_SDA (20u)
150-
#define PIN_WIRE_SCL (21u)
157+
#define PIN_WIRE_SDA1 (15u)
158+
#define PIN_WIRE_SCL1 (16u)
151159

152160
static const uint8_t SDA = PIN_WIRE_SDA;
153161
static const uint8_t SCL = PIN_WIRE_SCL;

libraries/MyNRF5Board/examples/MyNRF5Board/MyNRF5Board.ino renamed to libraries/MyBoardNRF5/examples/MyBoardNRF5/MyBoardNRF5.ino

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
* https://github.com/sandeepmistry/arduino-nRF5/
1414
* 2. Install the "My Sensors nRF5 Boards" with the board manager like
1515
* explained at https://github.com/mysensors/ArduinoBoards
16-
* 3. Copy the files "MyNRF5Board.cpp" and "MyNRF5Board.h" from
17-
* "MyNRF5Board" example into your sketch.
18-
* 4. Modify pin mappings in "MyNRF5Board.cpp" and "MyNRF5Board.h" to fit
16+
* 3. Copy the files "MyBoardNRF5.cpp" and "MyBoardNRF5.h" from
17+
* "MyBoardNRF5" example into your sketch.
18+
* 4. Modify pin mappings in "MyBoardNRF5.cpp" and "MyBoardNRF5.h" to fit
1919
* your requirements.
20-
* 5. Select "MyNRF5Board nrf52832" or "MyNRF5Board nrf52822" as your board.
20+
* 5. Select "MyBoardNRF5 nrf52832" or "MyBoardNRF5 nrf52822" as your board.
2121
* Choose the correct parameters and programmer in the Tools menu.
2222
*/
2323

0 commit comments

Comments
 (0)