Methods
(static) getDeviceSetup(platformopt) → {Object}
Returns an object that can be passed to the nrf-device-setup npm library
for setting up the device. See https://www.npmjs.com/package/nrf-device-setup
for a description of the returned object format.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
platform |
String
|
<optional> |
Optional value that can be one of 'win32', 'linux', 'darwin'. Will use the detected platform if not provided. |
Returns:
- Type:
-
Object
Device setup object.
(static) getJlinkConnectivityFirmware(family, platformopt) → {Object}
Get connectivity firmware information for the given device family.
Returns an object on the form:
{
file: '/path/to/firmware.hex',
version: '1.2.2',
baudRate: 115200,
sdBleApiVersion: 2,
}
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
family |
String
|
The device family. One of 'nrf51' or 'nrf52'. | |
platform |
String
|
<optional> |
Optional value that can be one of 'win32', 'linux', 'darwin'. Will use the detected platform if not provided. |
Returns:
- Type:
-
Object
Firmware info object as described above.
(static) getNordicUsbConnectivityFirmware(platformopt) → {Object}
Get connectivity firmware information for Nordic USB devices.
Returns an object on the form:
{
files: {
application: '/path/to/application.hex',
softdevice: '/path/to/softdevice.hex',
},
version: 'connectivity 1.2.2+dfuMar-27-2018-12-41-04',
baudRate: 115200,
sdBleApiVersion: 3,
sdId: 0x8C,
}
The `sdId` is ID (also called FWID) of the SoftDevice that is required by
the connectivity. See https://github.com/NordicSemiconductor/pc-nrfutil
for a list of such IDs.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
platform |
String
|
<optional> |
Optional value that can be one of 'win32', 'linux', 'darwin'. Will use the detected platform if not provided. |
Returns:
- Type:
-
Object
Firmware info object as described above.
(static) parseVersionStruct(versionStruct) → {Object}
Parse the version info struct that can be found in the connectivity
firmware. See the connectivity firmware patch in pc-ble-driver/hex/sd_api_v*
for details.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
versionStruct |
Array.<Number>
|
Array of integers from the firmware. |
Returns:
- Type:
-
Object
Parsed version info struct as an object.