From 423fbf07a27f6a22b40b01eb44cd8a51a2267d5b Mon Sep 17 00:00:00 2001 From: Michael Dietz Date: Fri, 26 Feb 2016 11:42:42 +0100 Subject: [PATCH] CRC is not required for mbed. Really shouldn't be seen by user. --- dist/crc16.js | 1 + dist/dfu.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/dist/crc16.js b/dist/crc16.js index d1514b2..017627d 100644 --- a/dist/crc16.js +++ b/dist/crc16.js @@ -45,6 +45,7 @@ /** * Copied from Nordic's command line tool nrf.exe. * https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/crc16.py + * CRC-CCITT (0xFFFF). */ return function (binaryData) { var crc = 0xFFFF; diff --git a/dist/dfu.js b/dist/dfu.js index 45f827d..28ce01f 100644 --- a/dist/dfu.js +++ b/dist/dfu.js @@ -166,7 +166,7 @@ return new Promise(function(resolve, reject) { var versionChar = null; imageType = imageType || ImageType.Application; - initPacket.crc = crc; + initPacket.crc = crc || 0xFFFF; // Not used in mbed/ older bootloader revisions. connect(device) .then(function(chars) {