mirror of
https://github.com/thegecko/web-bluetooth-dfu.git
synced 2025-12-12 20:18:13 +08:00
CRC is not required for mbed. Really shouldn't be seen by user.
This commit is contained in:
1
dist/crc16.js
vendored
1
dist/crc16.js
vendored
@@ -45,6 +45,7 @@
|
|||||||
/**
|
/**
|
||||||
* Copied from Nordic's command line tool nrf.exe.
|
* Copied from Nordic's command line tool nrf.exe.
|
||||||
* https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/crc16.py
|
* https://github.com/NordicSemiconductor/pc-nrfutil/blob/master/nordicsemi/dfu/crc16.py
|
||||||
|
* CRC-CCITT (0xFFFF).
|
||||||
*/
|
*/
|
||||||
return function (binaryData) {
|
return function (binaryData) {
|
||||||
var crc = 0xFFFF;
|
var crc = 0xFFFF;
|
||||||
|
|||||||
2
dist/dfu.js
vendored
2
dist/dfu.js
vendored
@@ -166,7 +166,7 @@
|
|||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
var versionChar = null;
|
var versionChar = null;
|
||||||
imageType = imageType || ImageType.Application;
|
imageType = imageType || ImageType.Application;
|
||||||
initPacket.crc = crc;
|
initPacket.crc = crc || 0xFFFF; // Not used in mbed/ older bootloader revisions.
|
||||||
|
|
||||||
connect(device)
|
connect(device)
|
||||||
.then(function(chars) {
|
.then(function(chars) {
|
||||||
|
|||||||
Reference in New Issue
Block a user