diff --git a/doc/api.js b/doc/api.js index a33b3f5a..eb225c70 100644 --- a/doc/api.js +++ b/doc/api.js @@ -135,23 +135,46 @@ * * @property {integer} deviceType * Type of device. Value will be equal to one of the following predefined constants:
+ * * nrfjprogjs.NRF51xxx_xxAA_REV1
* nrfjprogjs.NRF51xxx_xxAA_REV2
* nrfjprogjs.NRF51xxx_xxAA_REV3
* nrfjprogjs.NRF51xxx_xxAB_REV3
* nrfjprogjs.NRF51xxx_xxAC_REV3
* nrfjprogjs.NRF51802_xxAA_REV3
+ * nrfjprogjs.NRF51801_xxAB_REV3
+ * + * nrfjprogjs.NRF52805_xxAA_REV1
+ * nrfjprogjs.NRF52805_xxAA_FUTURE
+ * + * nrfjprogjs.NRF52810_xxAA_REV1
+ * nrfjprogjs.NRF52810_xxAA_REV2<<
+ * nrfjprogjs.NRF52810_xxAA_FUTURE
+ * + * nrfjprogjs.NRF52811_xxAA_REV1
+ * nrfjprogjs.NRF52811_xxAA_FUTURE
+ * * nrfjprogjs.NRF52832_xxAA_ENGA
* nrfjprogjs.NRF52832_xxAA_ENGB
* nrfjprogjs.NRF52832_xxAA_REV1
- * nrfjprogjs.NRF52840_xxAA_ENGA
+ * nrfjprogjs.NRF52832_xxAA_REV2
* nrfjprogjs.NRF52832_xxAA_FUTURE
- * nrfjprogjs.NRF52840_xxAA_FUTURE
- * nrfjprogjs.NRF52810_xxAA_REV1
- * nrfjprogjs.NRF52810_xxAA_FUTURE
+ * * nrfjprogjs.NRF52832_xxAB_REV1
+ * nrfjprogjs.NRF52832_xxAB_REV2
* nrfjprogjs.NRF52832_xxAB_FUTURE
- * nrfjprogjs.NRF51801_xxAB_REV3
+ * + * nrfjprogjs.NRF52833_xxAA_REV1
+ * nrfjprogjs.NRF52833_xxAA_FUTURE
+ * + * nrfjprogjs.NRF52840_xxAA_ENGA
+ * nrfjprogjs.NRF52840_xxAA_ENGB
+ * nrfjprogjs.NRF52840_xxAA_REV1
+ * nrfjprogjs.NRF52840_xxAA_REV2
+ * nrfjprogjs.NRF52840_xxAA_FUTURE
+ * + * nrfjprogjs.NRF9160_xxAA_REV1
+ * nrfjprogjs.NRF9160_xxAA_FUTURE
* * @property {integer} codeAddress Memory address for the start of the non-volatile (flash) memory block. * Typically 0x0000 0000. @@ -490,7 +513,7 @@ export function programDFU(serialNumber, filename, progressCallback, callback) { * It shall expect one parameter: ({@link module:pc-nrfjprog-js~Error|Error}). */ export function programMcuBootDFU(serialNumber, filename, uart, timeout, progressCallback, callback) {} - + /** * Async function to read memory from the device and write the results into a file. diff --git a/src/highlevel.cpp b/src/highlevel.cpp index 7dea084c..60d5da09 100644 --- a/src/highlevel.cpp +++ b/src/highlevel.cpp @@ -497,6 +497,7 @@ void HighLevel::init(v8::Local target) void HighLevel::initConsts(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) { + // nRF51 versions NODE_DEFINE_CONSTANT(target, NRF51xxx_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF51xxx_xxAA_REV2); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF51xxx_xxAA_REV3); // NOLINT(hicpp-signed-bitwise) @@ -504,11 +505,21 @@ void HighLevel::initConsts(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) NODE_DEFINE_CONSTANT(target, NRF51xxx_xxAC_REV3); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF51802_xxAA_REV3); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF51801_xxAB_REV3); // NOLINT(hicpp-signed-bitwise) + + // nRF52805 versions + NODE_DEFINE_CONSTANT(target, NRF52805_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) + NODE_DEFINE_CONSTANT(target, NRF52805_xxAA_FUTURE); // NOLINT(hicpp-signed-bitwise) + + // nRF52810 versions NODE_DEFINE_CONSTANT(target, NRF52810_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52810_xxAA_REV2); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52810_xxAA_FUTURE); // NOLINT(hicpp-signed-bitwise) + + // nRF52811 versions NODE_DEFINE_CONSTANT(target, NRF52811_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52811_xxAA_FUTURE); // NOLINT(hicpp-signed-bitwise) + + // nRF52832 versions NODE_DEFINE_CONSTANT(target, NRF52832_xxAA_ENGA); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52832_xxAA_ENGB); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52832_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) @@ -517,11 +528,19 @@ void HighLevel::initConsts(Nan::ADDON_REGISTER_FUNCTION_ARGS_TYPE target) NODE_DEFINE_CONSTANT(target, NRF52832_xxAB_REV1); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52832_xxAB_REV2); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52832_xxAB_FUTURE); // NOLINT(hicpp-signed-bitwise) + + // nRF52833 versions + NODE_DEFINE_CONSTANT(target, NRF52833_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) + NODE_DEFINE_CONSTANT(target, NRF52833_xxAA_FUTURE); // NOLINT(hicpp-signed-bitwise) + + // nRF52840 versions NODE_DEFINE_CONSTANT(target, NRF52840_xxAA_ENGA); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52840_xxAA_ENGB); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52840_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52840_xxAA_REV2); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF52840_xxAA_FUTURE); // NOLINT(hicpp-signed-bitwise) + + // nRF9160 versions NODE_DEFINE_CONSTANT(target, NRF9160_xxAA_REV1); // NOLINT(hicpp-signed-bitwise) NODE_DEFINE_CONSTANT(target, NRF9160_xxAA_FUTURE); // NOLINT(hicpp-signed-bitwise) diff --git a/src/highlevel_common.h b/src/highlevel_common.h index 59f9c874..ff946e1d 100644 --- a/src/highlevel_common.h +++ b/src/highlevel_common.h @@ -115,6 +115,7 @@ static name_map_t program_parameter_type_map = {NAME_MAP_ENTRY(INPUT_FORMAT_HEX_ NAME_MAP_ENTRY(INPUT_FORMAT_HEX_STRING)}; static name_map_t device_version_map = {NAME_MAP_ENTRY(UNKNOWN), + // nRF51 NAME_MAP_ENTRY(NRF51xxx_xxAA_REV1), NAME_MAP_ENTRY(NRF51xxx_xxAA_REV2), NAME_MAP_ENTRY(NRF51xxx_xxAA_REV3), @@ -122,11 +123,17 @@ static name_map_t device_version_map = {NAME_MAP_ENTRY(UNKNOWN), NAME_MAP_ENTRY(NRF51xxx_xxAC_REV3), NAME_MAP_ENTRY(NRF51802_xxAA_REV3), NAME_MAP_ENTRY(NRF51801_xxAB_REV3), + // nRF52805 + NAME_MAP_ENTRY(NRF52805_xxAA_REV1), + NAME_MAP_ENTRY(NRF52805_xxAA_FUTURE), + // nRF52810 NAME_MAP_ENTRY(NRF52810_xxAA_REV1), NAME_MAP_ENTRY(NRF52810_xxAA_REV2), NAME_MAP_ENTRY(NRF52810_xxAA_FUTURE), + // nRF52811 NAME_MAP_ENTRY(NRF52811_xxAA_REV1), NAME_MAP_ENTRY(NRF52811_xxAA_FUTURE), + // nRF52832 NAME_MAP_ENTRY(NRF52832_xxAA_ENGA), NAME_MAP_ENTRY(NRF52832_xxAA_ENGB), NAME_MAP_ENTRY(NRF52832_xxAA_REV1), @@ -135,11 +142,16 @@ static name_map_t device_version_map = {NAME_MAP_ENTRY(UNKNOWN), NAME_MAP_ENTRY(NRF52832_xxAB_REV1), NAME_MAP_ENTRY(NRF52832_xxAB_REV2), NAME_MAP_ENTRY(NRF52832_xxAB_FUTURE), + // nRF52833 + NAME_MAP_ENTRY(NRF52833_xxAA_REV1), + NAME_MAP_ENTRY(NRF52833_xxAA_FUTURE), + // nRF52840 NAME_MAP_ENTRY(NRF52840_xxAA_ENGA), NAME_MAP_ENTRY(NRF52840_xxAA_ENGB), NAME_MAP_ENTRY(NRF52840_xxAA_REV1), NAME_MAP_ENTRY(NRF52840_xxAA_REV2), NAME_MAP_ENTRY(NRF52840_xxAA_FUTURE), + // nRF9160 NAME_MAP_ENTRY(NRF9160_xxAA_REV1), NAME_MAP_ENTRY(NRF9160_xxAA_FUTURE)};