NINA-B1 series - System Integration Manual
UBX-15026175 - R06
Software
Page 20 of 48
Figure 5: Example of EVK-NINA-B1 target object
2.2.2.2.2
Pin mapping
Create a folder with the same name as the JSON object created in section 2.2.2.2.1. The folder should be
located in
“\mbed-os\targets\TARGET_NORDIC\TARGET_NRF5\TARGET_MCU_NRF52832\”
. For EVK-NINA-
B1, the folder will be called
TARGET_EVK_NINA_B1
.
In this new folder, there should be two files, device.h and PinNames.h.
1.
device.h:
This contains the
#include object.h
as shown in Figure 6.
Figure 6: Example code for device.h
2.
PinNames.h:
T
he PinNames.h file should declare and define a couple of enumerations to configure the
custom pin mapping. Figure 6 and Figure 7 show the contents of the PinNames.h file in the case of EVK-
NINA-B1.
#ifndef
MBED_DEVICE_H
#define
MBED_DEVICE_H
#include
"objects.h"
#endif
"EVK_NINA_B1": {
"supported_form_factors": ["ARDUINO"],
"inherits": ["MCU_NRF52"],
"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"],
"device_has": [
"ANALOGIN",
"ERROR_PATTERN",
"I2C",
"I2C_ASYNCH",
"INTERRUPTIN",
"LOWPOWERTIMER",
"PORTIN",
"PORTINOUT",
"PORTOUT",
"PWMOUT",
"RTC",
"SERIAL",
"SERIAL_ASYNCH",
"SLEEP",
"SPI",
"SPI_ASYNCH",
"SPISLAVE"],
"release_versions": ["2", "5"]
},