@mchp-mcc/scf-pic8-pwm-v2 4.2.10 → 4.2.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/output/creator.js CHANGED
@@ -505,10 +505,10 @@ var filterModeOptions = function filterModeOptions(options, component, masterCom
505
505
 
506
506
  var getProcessedHandle = function getProcessedHandle(handle, payload) {
507
507
  if (handle) {
508
- var _ref, _ref2, _ref3, _payload$customName;
508
+ var _ref, _ref2, _ref3, _handle$label, _handle;
509
509
 
510
510
  handle = _objectSpread(_objectSpread({}, handle), {}, {
511
- label: (_ref = (_ref2 = (_ref3 = (_payload$customName = payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _payload$customName !== void 0 ? _payload$customName : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _ref3 !== void 0 ? _ref3 : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _ref2 !== void 0 ? _ref2 : handle.label) !== null && _ref !== void 0 ? _ref : handle.providerId + " : " + handle.exportId
511
+ label: (_ref = (_ref2 = (_ref3 = (_handle$label = (_handle = handle) === null || _handle === void 0 ? void 0 : _handle.label) !== null && _handle$label !== void 0 ? _handle$label : payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _ref3 !== void 0 ? _ref3 : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _ref2 !== void 0 ? _ref2 : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _ref !== void 0 ? _ref : handle.providerId + " : " + handle.exportId
512
512
  });
513
513
  }
514
514
 
@@ -676,7 +676,7 @@ var getConfigBits = function getConfigBits(model) {
676
676
  var configBits = (_configModule$registe = configModule.registers) === null || _configModule$registe === void 0 ? void 0 : _configModule$registe[configName];
677
677
  templateConfigBits = _objectSpread(_objectSpread({}, templateConfigBits), {}, _defineProperty({}, configName, {}));
678
678
  configBits === null || configBits === void 0 ? void 0 : configBits.forEach(function (configBit) {
679
- var _model$getComponent5;
679
+ var _model$getComponent6;
680
680
 
681
681
  var register = registers === null || registers === void 0 ? void 0 : registers[configName];
682
682
  var value;
@@ -687,21 +687,21 @@ var getConfigBits = function getConfigBits(model) {
687
687
  //missing settings for register
688
688
  value = (_model$getComponent$v = (_model$getComponent = model.getComponent(configBit.name)) === null || _model$getComponent === void 0 ? void 0 : _model$getComponent.value) !== null && _model$getComponent$v !== void 0 ? _model$getComponent$v : "";
689
689
  } else {
690
- var _registers$configName, _registers$configName2, _find$name, _find, _setting$options;
690
+ var _registers$configName, _registers$configName2, _ref, _ref2, _find$name, _find, _setting$options, _model$getComponent5;
691
691
 
692
692
  var setting = registers === null || registers === void 0 ? void 0 : (_registers$configName = registers[configName]) === null || _registers$configName === void 0 ? void 0 : (_registers$configName2 = _registers$configName.settings) === null || _registers$configName2 === void 0 ? void 0 : _registers$configName2[configBit.setting];
693
- value = (_find$name = (_find = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0__["find"])((_setting$options = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _setting$options !== void 0 ? _setting$options : [], function (option) {
693
+ value = (_ref = (_ref2 = (_find$name = (_find = Object(_microchip_scf_device_lib_util_Arrays__WEBPACK_IMPORTED_MODULE_0__["find"])((_setting$options = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _setting$options !== void 0 ? _setting$options : [], function (option) {
694
694
  var _model$getComponent2, _model$getComponent3, _model$getComponent4;
695
695
 
696
696
  return option.description === ((_model$getComponent2 = model.getComponent(configBit.name)) === null || _model$getComponent2 === void 0 ? void 0 : _model$getComponent2.value) || option.alias === ((_model$getComponent3 = model.getComponent(configBit.name)) === null || _model$getComponent3 === void 0 ? void 0 : _model$getComponent3.value) || option.name === ((_model$getComponent4 = model.getComponent(configBit.name)) === null || _model$getComponent4 === void 0 ? void 0 : _model$getComponent4.value);
697
- })) === null || _find === void 0 ? void 0 : _find.name) !== null && _find$name !== void 0 ? _find$name : "";
697
+ })) === null || _find === void 0 ? void 0 : _find.name) !== null && _find$name !== void 0 ? _find$name : (_model$getComponent5 = model.getComponent(configBit.name)) === null || _model$getComponent5 === void 0 ? void 0 : _model$getComponent5.value) !== null && _ref2 !== void 0 ? _ref2 : setting === null || setting === void 0 ? void 0 : setting.defaultValue) !== null && _ref !== void 0 ? _ref : "";
698
698
  }
699
699
 
700
700
  templateConfigBits[configName][configBit.setting] = {
701
701
  name: configBit.setting,
702
702
  value: value,
703
703
  description: configBit.description,
704
- valueAsDescription: (_model$getComponent5 = model.getComponent(configBit.name)) === null || _model$getComponent5 === void 0 ? void 0 : _model$getComponent5.value
704
+ valueAsDescription: (_model$getComponent6 = model.getComponent(configBit.name)) === null || _model$getComponent6 === void 0 ? void 0 : _model$getComponent6.value
705
705
  };
706
706
  });
707
707
  });
@@ -907,52 +907,23 @@ var RowPrefix;
907
907
 
908
908
  /***/ }),
909
909
 
910
- /***/ "./node_modules/@microchip/pin-standard/lib/index.js":
911
- /*!***********************************************************!*\
912
- !*** ./node_modules/@microchip/pin-standard/lib/index.js ***!
913
- \***********************************************************/
914
- /*! no static exports found */
915
- /***/ (function(module, exports, __webpack_require__) {
916
-
917
- "use strict";
918
-
919
- Object.defineProperty(exports, "__esModule", { value: true });
920
- var pin_standard_1 = __webpack_require__(/*! ./pin-standard */ "./node_modules/@microchip/pin-standard/lib/pin-standard.js");
921
- exports.pin_standard = pin_standard_1.pin_standard;
922
- exports.pin_state = pin_standard_1.pin_state;
923
- exports.direction = pin_standard_1.direction;
924
- exports.behaviour = pin_standard_1.behaviour;
925
- exports.data_schema = pin_standard_1.data_schema;
926
- exports.pin_attribs_enum = pin_standard_1.pin_attribs_enum;
927
- exports.actiontype = pin_standard_1.actiontype;
928
- exports.QueryAdapterKey = pin_standard_1.QueryAdapterKey;
929
- //# sourceMappingURL=index.js.map
930
-
931
- /***/ }),
932
-
933
- /***/ "./node_modules/@microchip/pin-standard/lib/pin-standard.js":
934
- /*!******************************************************************!*\
935
- !*** ./node_modules/@microchip/pin-standard/lib/pin-standard.js ***!
936
- \******************************************************************/
910
+ /***/ "./node_modules/@microchip/pins-interface/lib/types.js":
911
+ /*!*************************************************************!*\
912
+ !*** ./node_modules/@microchip/pins-interface/lib/types.js ***!
913
+ \*************************************************************/
937
914
  /*! no static exports found */
938
915
  /***/ (function(module, exports, __webpack_require__) {
939
916
 
940
917
  "use strict";
941
918
 
942
919
  Object.defineProperty(exports, "__esModule", { value: true });
943
- exports.pin_standard = function () {
944
- return {
945
- interfaceId: {
946
- name: "pin-standard",
947
- version: "0.1.0",
948
- },
949
- };
950
- };
920
+ exports.data_schema = exports.PIN_ARCH = exports.behaviour = exports.direction = exports.actiontype = exports.pin_attribs_enum = exports.pin_interrupts_enum = exports.pin_state = exports.QueryAdapterKey = void 0;
951
921
  var QueryAdapterKey;
952
922
  (function (QueryAdapterKey) {
953
923
  QueryAdapterKey["ALLPINS"] = "allpins";
954
924
  QueryAdapterKey["ALLPINS_FOR_ATTRIBS"] = "allpins_for_attribs";
955
925
  QueryAdapterKey["PPS"] = "pps";
926
+ QueryAdapterKey["APFCON"] = "apfcon";
956
927
  QueryAdapterKey["PORTMUX"] = "portmux";
957
928
  QueryAdapterKey["HASPPS"] = "hasPPS";
958
929
  })(QueryAdapterKey = exports.QueryAdapterKey || (exports.QueryAdapterKey = {}));
@@ -1014,6 +985,13 @@ var behaviour;
1014
985
  behaviour["EXCLUSIVE_LOCK"] = "EXCLUSIVE_LOCK";
1015
986
  behaviour["LOCKED_DISABLED"] = "LOCKED_DISABLED";
1016
987
  })(behaviour = exports.behaviour || (exports.behaviour = {}));
988
+ var PIN_ARCH;
989
+ (function (PIN_ARCH) {
990
+ PIN_ARCH["PIC18F"] = "PIC18F";
991
+ PIN_ARCH["AVR8"] = "AVR8";
992
+ PIN_ARCH["PIC16F"] = "PIC16F";
993
+ PIN_ARCH["PIC24F"] = "PIC24F";
994
+ })(PIN_ARCH = exports.PIN_ARCH || (exports.PIN_ARCH = {}));
1017
995
  //------------------------------------ schema ------------------------------------//
1018
996
  exports.data_schema = {
1019
997
  $schema: "http://json-schema.org/draft-07/schema#",
@@ -1199,7 +1177,7 @@ exports.data_schema = {
1199
1177
  },
1200
1178
  },
1201
1179
  };
1202
- //# sourceMappingURL=pin-standard.js.map
1180
+ //# sourceMappingURL=types.js.map
1203
1181
 
1204
1182
  /***/ }),
1205
1183
 
@@ -1226,7 +1204,6 @@ var __assign = (this && this.__assign) || function () {
1226
1204
  Object.defineProperty(exports, "__esModule", { value: true });
1227
1205
  exports.logAnalytics = exports.getAnalyticsDefault = void 0;
1228
1206
  var getConfigData_1 = __webpack_require__(/*! ../autoModule/getConfigData */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js");
1229
- var autoModuleViewHelpers_1 = __webpack_require__(/*! ../autoModule/views/autoModuleViewHelpers */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/views/autoModuleViewHelpers.js");
1230
1207
  var getAnalyticsDefault = function (model) {
1231
1208
  var logAlwaysComps = [];
1232
1209
  var stateChangeComps = [];
@@ -1256,9 +1233,7 @@ var logAlwaysStaticAndDynamicData = function (model, moduleconfig, alwaysCompsDe
1256
1233
  var resultantAnalyticsKey = void 0;
1257
1234
  if (eachDesiredComp !== "*") {
1258
1235
  compObj = (_a = allComps[eachDesiredComp]) === null || _a === void 0 ? void 0 : _a.component;
1259
- if (compObj === undefined ||
1260
- !isCompCategoryAllowed(compObj) ||
1261
- (0, autoModuleViewHelpers_1.isComponentInvisible)(compObj, model))
1236
+ if (compObj === undefined || !isCompCategoryAllowed(compObj))
1262
1237
  continue;
1263
1238
  correctMapping = (_b = moduleconfig.analytics) === null || _b === void 0 ? void 0 : _b.compMapping[eachDesiredComp];
1264
1239
  resultantAnalyticsKey = !correctMapping
@@ -1275,8 +1250,7 @@ var logAlwaysStaticAndDynamicData = function (model, moduleconfig, alwaysCompsDe
1275
1250
  for (var eachCompName in allComps) {
1276
1251
  correctMapping = (_c = moduleconfig.analytics) === null || _c === void 0 ? void 0 : _c.compMapping[eachCompName];
1277
1252
  compObj = allComps[eachCompName].component;
1278
- if (!isCompCategoryAllowed(compObj) ||
1279
- (0, autoModuleViewHelpers_1.isComponentInvisible)(compObj, model))
1253
+ if (!isCompCategoryAllowed(compObj))
1280
1254
  continue;
1281
1255
  resultantAnalyticsKey = !correctMapping
1282
1256
  ? compObj.category === "hardware"
@@ -1326,9 +1300,7 @@ var logOnChangeStaticAndDynamicData = function (moduleconfig, model, moduleState
1326
1300
  var correctMapping = (_a = moduleconfig.analytics) === null || _a === void 0 ? void 0 : _a.compMapping[eachChangedCompKey];
1327
1301
  var allComps = model.getAutoModuleAppModel().getAllComponents();
1328
1302
  var compObj = (_b = allComps[eachChangedCompKey]) === null || _b === void 0 ? void 0 : _b.component;
1329
- if (compObj === undefined ||
1330
- !isCompCategoryAllowed(compObj) ||
1331
- (0, autoModuleViewHelpers_1.isComponentInvisible)(compObj, model))
1303
+ if (compObj === undefined || !isCompCategoryAllowed(compObj))
1332
1304
  continue;
1333
1305
  var resultantAnalyticsKey = !correctMapping
1334
1306
  ? compObj.category === "hardware"
@@ -1854,7 +1826,7 @@ var MyAutoModuleAppModel = /** @class */ (function () {
1854
1826
  this.getSoftwareComponentValue = function (tab, component) {
1855
1827
  var _a, _b, _c, _d, _e, _f, _g, _h;
1856
1828
  var overriddenValue = _this.model.getDerivedFunction(component.name);
1857
- if (overriddenValue != undefined && component.type === "time") {
1829
+ if (overriddenValue != undefined && (component.type === "time" || component.type === "frequency")) {
1858
1830
  if (overriddenValue.defaultValue) {
1859
1831
  return overriddenValue.defaultValue;
1860
1832
  }
@@ -2176,7 +2148,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
2176
2148
  return (mod && mod.__esModule) ? mod : { "default": mod };
2177
2149
  };
2178
2150
  Object.defineProperty(exports, "__esModule", { value: true });
2179
- exports.getFriendlyInterfaceId = exports.getModuleDefaultDescription = exports.DependencySelector = exports.populateLoadedFiles = exports.getProcessedHandle = exports.getSettingOptionsIfPresent = exports.getOverrideDefaultValue = exports.getSettingDefaultIfPresent = exports.getOptionValueByName = exports.getSettingFromComponent = exports.getSettingBits = exports.getRegisterValues = exports.hasConfigBits = exports.getComboOptions = exports.getDefaultValue = exports.castComponent = void 0;
2151
+ exports.getFriendlyInterfaceId = exports.getModuleDefaultDescription = exports.DependencySelector = exports.populateLoadedFiles = exports.getProcessedHandle = exports.filterModeOptions = exports.getSettingOptionsIfPresent = exports.getOverrideDefaultValue = exports.getSettingDefaultIfPresent = exports.getOptionValueByName = exports.getSettingFromComponent = exports.getSettingBits = exports.getRegisterValues = exports.hasConfigBits = exports.getComboOptions = exports.getDefaultValue = exports.castComponent = void 0;
2180
2152
  var CalculateRegisterValue_1 = __importDefault(__webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js"));
2181
2153
  var Setting_1 = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
2182
2154
  var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
@@ -2298,14 +2270,17 @@ var sortComments = function (comments, register) {
2298
2270
  return comments.join("");
2299
2271
  };
2300
2272
  var getSettingBits = function (register, setting, value, deviceType) {
2301
- var _a, _b;
2302
- var setValNumber = Number((_b = (_a = (0, Setting_1.getOptionByAlias)(value, setting)) === null || _a === void 0 ? void 0 : _a.value) !== null && _b !== void 0 ? _b : 0);
2273
+ var _a;
2274
+ var option = (0, Setting_1.getOptionByAlias)(value, setting);
2275
+ var setValNumber = Number((_a = option === null || option === void 0 ? void 0 : option.value) !== null && _a !== void 0 ? _a : 0);
2303
2276
  var settingValue = {
2304
2277
  alias: setting.alias,
2305
2278
  name: setting.name,
2306
2279
  value: setValNumber !== null && setValNumber !== void 0 ? setValNumber : 0,
2307
2280
  valueAsHex: "0x" + setValNumber.toString(16).toUpperCase(),
2308
2281
  valueAsDescription: value,
2282
+ type: setting.type,
2283
+ optionName: option === null || option === void 0 ? void 0 : option.name,
2309
2284
  bitName: deviceType === "PIC"
2310
2285
  ? "".concat(register.name, "bits.").concat(setting.name)
2311
2286
  : "".concat(register.name, ".").concat(setting.name),
@@ -2406,7 +2381,7 @@ var getSettingOptionsIfPresent = function (component, setting, masterComponentVa
2406
2381
  var options = [""];
2407
2382
  if (setting) {
2408
2383
  var filteredOptions = component.mode
2409
- ? filterModeOptions((_a = setting.options) !== null && _a !== void 0 ? _a : [], component, masterComponentValue)
2384
+ ? (0, exports.filterModeOptions)((_a = setting.options) !== null && _a !== void 0 ? _a : [], component, masterComponentValue)
2410
2385
  : setting.options;
2411
2386
  options = (0, Arrays_1.map)(filteredOptions !== null && filteredOptions !== void 0 ? filteredOptions : [], function (option) { var _a, _b; return (_b = option[(_a = component.displayOptionSetting) !== null && _a !== void 0 ? _a : "alias"]) !== null && _b !== void 0 ? _b : option.alias; });
2412
2387
  }
@@ -2426,6 +2401,10 @@ var filterModeOptions = function (options, component, masterComponentValue) {
2426
2401
  }
2427
2402
  return false;
2428
2403
  });
2404
+ // optionModes : when Key value are not same
2405
+ if (mode === undefined) {
2406
+ mode = masterComponentValue;
2407
+ }
2429
2408
  var filteredOptions = (0, Arrays_1.filter)(options !== null && options !== void 0 ? options : [], function (option) {
2430
2409
  var _a, _b, _c, _d;
2431
2410
  if (option.mode && mode) {
@@ -2438,10 +2417,11 @@ var filterModeOptions = function (options, component, masterComponentValue) {
2438
2417
  });
2439
2418
  return filteredOptions;
2440
2419
  };
2420
+ exports.filterModeOptions = filterModeOptions;
2441
2421
  var getProcessedHandle = function (handle, payload) {
2442
2422
  var _a, _b, _c, _d;
2443
2423
  if (handle) {
2444
- handle = __assign(__assign({}, handle), { label: (_d = (_c = (_b = (_a = payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _a !== void 0 ? _a : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _b !== void 0 ? _b : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _c !== void 0 ? _c : handle.label) !== null && _d !== void 0 ? _d : handle.providerId + " : " + handle.exportId });
2424
+ handle = __assign(__assign({}, handle), { label: (_d = (_c = (_b = (_a = handle === null || handle === void 0 ? void 0 : handle.label) !== null && _a !== void 0 ? _a : payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _b !== void 0 ? _b : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _c !== void 0 ? _c : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _d !== void 0 ? _d : handle.providerId + " : " + handle.exportId });
2445
2425
  }
2446
2426
  return handle;
2447
2427
  };
@@ -2666,7 +2646,7 @@ var getConfigBits = function (model) {
2666
2646
  var configBits = (_b = configModule.registers) === null || _b === void 0 ? void 0 : _b[configName];
2667
2647
  templateConfigBits_1 = __assign(__assign({}, templateConfigBits_1), (_a = {}, _a[configName] = {}, _a));
2668
2648
  configBits === null || configBits === void 0 ? void 0 : configBits.forEach(function (configBit) {
2669
- var _a, _b, _c, _d, _e, _f, _g, _h;
2649
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
2670
2650
  var register = registers_1 === null || registers_1 === void 0 ? void 0 : registers_1[configName];
2671
2651
  var value;
2672
2652
  if (register && !register.settings) {
@@ -2676,20 +2656,20 @@ var getConfigBits = function (model) {
2676
2656
  else {
2677
2657
  var setting = (_d = (_c = registers_1 === null || registers_1 === void 0 ? void 0 : registers_1[configName]) === null || _c === void 0 ? void 0 : _c.settings) === null || _d === void 0 ? void 0 : _d[configBit.setting];
2678
2658
  value =
2679
- (_g = (_f = (0, Arrays_1.find)((_e = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _e !== void 0 ? _e : [], function (option) {
2659
+ (_k = (_j = (_g = (_f = (0, Arrays_1.find)((_e = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _e !== void 0 ? _e : [], function (option) {
2680
2660
  var _a, _b, _c;
2681
2661
  return option.description ===
2682
2662
  ((_a = model.getComponent(configBit.name)) === null || _a === void 0 ? void 0 : _a.value) ||
2683
2663
  option.alias ===
2684
2664
  ((_b = model.getComponent(configBit.name)) === null || _b === void 0 ? void 0 : _b.value) ||
2685
2665
  option.name === ((_c = model.getComponent(configBit.name)) === null || _c === void 0 ? void 0 : _c.value);
2686
- })) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : "";
2666
+ })) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : (_h = model.getComponent(configBit.name)) === null || _h === void 0 ? void 0 : _h.value) !== null && _j !== void 0 ? _j : setting === null || setting === void 0 ? void 0 : setting.defaultValue) !== null && _k !== void 0 ? _k : "";
2687
2667
  }
2688
2668
  templateConfigBits_1[configName][configBit.setting] = {
2689
2669
  name: configBit.setting,
2690
2670
  value: value,
2691
2671
  description: configBit.description,
2692
- valueAsDescription: (_h = model.getComponent(configBit.name)) === null || _h === void 0 ? void 0 : _h.value,
2672
+ valueAsDescription: (_l = model.getComponent(configBit.name)) === null || _l === void 0 ? void 0 : _l.value,
2693
2673
  };
2694
2674
  });
2695
2675
  });
@@ -3485,7 +3465,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
3485
3465
  };
3486
3466
  Object.defineProperty(exports, "__esModule", { value: true });
3487
3467
  exports.createAutoViewPayloads = void 0;
3488
- var scf_register_view_helper_1 = __webpack_require__(/*! @microchip/scf-register-view-helper */ "./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js");
3468
+ var scf_register_view_helper_1 = __webpack_require__(/*! @microchip/scf-register-view-helper */ "./node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js");
3489
3469
  var Utils_1 = __webpack_require__(/*! ../../Utils */ "./node_modules/@microchip/scf-automodule-impl/lib/Utils.js");
3490
3470
  var AutoModuleHelper = __importStar(__webpack_require__(/*! ../AutoModuleHelpers */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js"));
3491
3471
  var getConfigData_1 = __webpack_require__(/*! ../getConfigData */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/getConfigData.js");
@@ -3946,7 +3926,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3946
3926
  return to.concat(ar || Array.prototype.slice.call(from));
3947
3927
  };
3948
3928
  Object.defineProperty(exports, "__esModule", { value: true });
3949
- exports.isInvalidTab = exports.createSchema = void 0;
3929
+ exports.getDependencyComponentSchema = exports.isInvalidTab = exports.createSchema = void 0;
3950
3930
  var tables_1 = __webpack_require__(/*! ../../tables/tables */ "./node_modules/@microchip/scf-automodule-impl/lib/tables/tables.js");
3951
3931
  var Utils_1 = __webpack_require__(/*! ../../Utils */ "./node_modules/@microchip/scf-automodule-impl/lib/Utils.js");
3952
3932
  var AutoModuleHelpers_1 = __webpack_require__(/*! ../AutoModuleHelpers */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/AutoModuleHelpers.js");
@@ -4093,15 +4073,18 @@ function getSoftwareComponentSchema(component, derivedFunctions) {
4093
4073
  return schema;
4094
4074
  }
4095
4075
  function getDependencyComponentSchema(component, viewModel) {
4096
- var _a, _b, _c, _d, _e;
4076
+ var _a, _b, _c, _d, _e, _f;
4097
4077
  var schema = {};
4078
+ if (((_a = component.uiBehavior) === null || _a === void 0 ? void 0 : _a["ui:widget"]) === "hidden") {
4079
+ return;
4080
+ }
4098
4081
  if (component.type === "ComboBox" && viewModel.model) {
4099
4082
  var dependencySelector = new AutoModuleHelpers_1.DependencySelector(viewModel.model, component);
4100
4083
  if (dependencySelector.getDropdownOptionNames().length <= 0) {
4101
4084
  return schema;
4102
4085
  }
4103
4086
  var dropdownOptions = dependencySelector.getDropdownOptionNames();
4104
- var assignedImport = (_b = (_a = viewModel.createProcessedImports) === null || _a === void 0 ? void 0 : _a.call(viewModel, "views")) === null || _b === void 0 ? void 0 : _b[component.importId];
4087
+ var assignedImport = (_c = (_b = viewModel.createProcessedImports) === null || _b === void 0 ? void 0 : _b.call(viewModel, "views")) === null || _c === void 0 ? void 0 : _c[component.importId];
4105
4088
  var NONE_1 = "None";
4106
4089
  var assignedName = NONE_1;
4107
4090
  var selectedDependency = viewModel.model.getComponentValue(component.name);
@@ -4118,13 +4101,14 @@ function getDependencyComponentSchema(component, viewModel) {
4118
4101
  dropdownOptions = __spreadArray([NONE_1], dropdownOptions.filter(function (item) { return item !== NONE_1; }), true);
4119
4102
  schema = {
4120
4103
  type: "string",
4121
- title: (_e = (_d = (_c = viewModel.getDerivedFunction).overrideTitle) === null || _d === void 0 ? void 0 : _d.call(_c, component.name)) !== null && _e !== void 0 ? _e : component.description,
4104
+ title: (_f = (_e = (_d = viewModel.getDerivedFunction).overrideTitle) === null || _e === void 0 ? void 0 : _e.call(_d, component.name)) !== null && _f !== void 0 ? _f : component.description,
4122
4105
  default: assignedName,
4123
4106
  enum: dropdownOptions,
4124
4107
  };
4125
4108
  }
4126
4109
  return schema;
4127
4110
  }
4111
+ exports.getDependencyComponentSchema = getDependencyComponentSchema;
4128
4112
  function getFileLoadComponentSchema(component, viewModel) {
4129
4113
  var _a, _b, _c;
4130
4114
  var schema = {};
@@ -4158,7 +4142,7 @@ function getHardwareComponentSchema(component, viewModel) {
4158
4142
  var setting = (0, AutoModuleHelpers_1.getSettingFromComponent)(model, component);
4159
4143
  schema = {
4160
4144
  type: "string",
4161
- title: (_c = (_b = (_a = viewModel.getDerivedFunction).overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,
4145
+ title: (_c = (_b = (_a = viewModel.viewModel.derivedFunctions) === null || _a === void 0 ? void 0 : _a.overrideTitle) === null || _b === void 0 ? void 0 : _b.call(_a, component.name)) !== null && _c !== void 0 ? _c : component.description,
4162
4146
  default: (0, AutoModuleHelpers_1.getSettingDefaultIfPresent)(component, setting, (_e = (_d = model
4163
4147
  .getDerivedFunctions()).overrideDefaultValues) === null || _e === void 0 ? void 0 : _e.call(_d, component.name)),
4164
4148
  enum: (0, AutoModuleHelpers_1.getSettingOptionsIfPresent)(component, setting, model.getComponentValue((_g = (_f = component.mode) === null || _f === void 0 ? void 0 : _f.masterComponent) !== null && _g !== void 0 ? _g : "")),
@@ -4167,7 +4151,7 @@ function getHardwareComponentSchema(component, viewModel) {
4167
4151
  else {
4168
4152
  schema = {
4169
4153
  type: component.type,
4170
- title: (_k = (_j = (_h = viewModel.getDerivedFunction).overrideTitle) === null || _j === void 0 ? void 0 : _j.call(_h, component.name)) !== null && _k !== void 0 ? _k : component.description,
4154
+ title: (_k = (_j = (_h = viewModel.viewModel.derivedFunctions) === null || _h === void 0 ? void 0 : _h.overrideTitle) === null || _j === void 0 ? void 0 : _j.call(_h, component.name)) !== null && _k !== void 0 ? _k : component.description,
4171
4155
  };
4172
4156
  }
4173
4157
  }
@@ -4517,12 +4501,18 @@ var createPrototypeImports = function (state, creatorFunctions, config) {
4517
4501
  });
4518
4502
  }
4519
4503
  (_c = (0, Arrays_1.getKeys)((_b = config === null || config === void 0 ? void 0 : config.imports) !== null && _b !== void 0 ? _b : {})) === null || _c === void 0 ? void 0 : _c.forEach(function (key) {
4520
- var _a;
4521
- var _b, _c, _d;
4522
- var imp = (_b = config === null || config === void 0 ? void 0 : config.imports) === null || _b === void 0 ? void 0 : _b[key];
4523
- var args = (_c = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.getCreatorImportArgs) === null || _c === void 0 ? void 0 : _c.call(creatorFunctions, key, state);
4524
- if (imp && ((_d = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.shouldImport) === null || _d === void 0 ? void 0 : _d.call(creatorFunctions, key, state)) != false) {
4525
- prototypeImports = __assign(__assign({}, prototypeImports), (_a = {}, _a[key] = __assign(__assign({}, imp.import), { args: args }), _a));
4504
+ var _a, _b;
4505
+ var _c, _d, _e, _f, _g;
4506
+ var imp = (_c = config === null || config === void 0 ? void 0 : config.imports) === null || _c === void 0 ? void 0 : _c[key];
4507
+ var args = (_d = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.getCreatorImportArgs) === null || _d === void 0 ? void 0 : _d.call(creatorFunctions, key, state);
4508
+ var shouldOrder = (_f = (_e = creatorFunctions.updateImportWithShouldAssignDescOrder) === null || _e === void 0 ? void 0 : _e.call(creatorFunctions, key)) !== null && _f !== void 0 ? _f : imp === null || imp === void 0 ? void 0 : imp.import.shouldAssignDescendantsInOrder;
4509
+ if (imp) {
4510
+ if (((_g = creatorFunctions === null || creatorFunctions === void 0 ? void 0 : creatorFunctions.shouldImport) === null || _g === void 0 ? void 0 : _g.call(creatorFunctions, key, state)) != false) {
4511
+ prototypeImports = __assign(__assign({}, prototypeImports), (_a = {}, _a[key] = __assign(__assign({}, imp.import), { args: args }), _a));
4512
+ }
4513
+ if (shouldOrder && shouldOrder.length > 0) {
4514
+ prototypeImports = __assign(__assign({}, prototypeImports), (_b = {}, _b[key] = __assign(__assign({}, imp.import), { args: args, shouldAssignDescendantsInOrder: shouldOrder }), _b));
4515
+ }
4526
4516
  }
4527
4517
  });
4528
4518
  return prototypeImports;
@@ -4719,13 +4709,14 @@ var MyImportInterfaces = /** @class */ (function () {
4719
4709
  var processedImports = _this.filterImports();
4720
4710
  (_a = (0, Utils_1.getKeys)(processedImports !== null && processedImports !== void 0 ? processedImports : {})) === null || _a === void 0 ? void 0 : _a.forEach(function (key) {
4721
4711
  var _a;
4722
- var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
4712
+ var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
4723
4713
  processedImports = __assign(__assign({}, processedImports), (_a = {}, _a[key] = __assign(__assign(__assign({}, processedImports[key]), { args: stage === "arguments"
4724
4714
  ? (_b = _this.model) === null || _b === void 0 ? void 0 : _b.getDerivedFunction(key + "_args")
4725
4715
  : (_c = processedImports[key]) === null || _c === void 0 ? void 0 : _c.args, results: stage === "results"
4726
4716
  ? _this.getResults(processedImports, key)
4727
- : (_d = processedImports[key]) === null || _d === void 0 ? void 0 : _d.results, name: (_e = _this.model.getDerivedFunction("importName", key)) !== null && _e !== void 0 ? _e : (_f = processedImports[key]) === null || _f === void 0 ? void 0 : _f.name, handle: (0, AutoModuleHelpers_1.getProcessedHandle)(processedImports[key].handle, processedImports[key].payload), options: (_j = _this.getProcessedImportOptions(key, (_h = (_g = processedImports[key]) === null || _g === void 0 ? void 0 : _g.options) !== null && _h !== void 0 ? _h : [])) !== null && _j !== void 0 ? _j : processedImports[key].options }), (_l = (_k = _this.model
4728
- .getDerivedFunctions()).overrideImport) === null || _l === void 0 ? void 0 : _l.call(_k, key, processedImports[key])), _a));
4717
+ : (_d = processedImports[key]) === null || _d === void 0 ? void 0 : _d.results, name: (_e = _this.model.getDerivedFunction("importName", key)) !== null && _e !== void 0 ? _e : (_f = processedImports[key]) === null || _f === void 0 ? void 0 : _f.name, handle: (0, AutoModuleHelpers_1.getProcessedHandle)(processedImports[key].handle, processedImports[key].payload), options: (_j = _this.getProcessedImportOptions(key, (_h = (_g = processedImports[key]) === null || _g === void 0 ? void 0 : _g.options) !== null && _h !== void 0 ? _h : [])) !== null && _j !== void 0 ? _j : processedImports[key].options, shouldAssignDescendantsInOrder: (_m = (_l = (_k = _this.model
4718
+ .getDerivedFunctions()).updateImportWithShouldAssignDescOrder) === null || _l === void 0 ? void 0 : _l.call(_k, key)) !== null && _m !== void 0 ? _m : processedImports[key].shouldAssignDescendantsInOrder }), (_p = (_o = _this.model
4719
+ .getDerivedFunctions()).overrideImport) === null || _p === void 0 ? void 0 : _p.call(_o, key, processedImports[key])), _a));
4729
4720
  });
4730
4721
  return processedImports;
4731
4722
  };
@@ -4744,7 +4735,7 @@ var MyImportInterfaces = /** @class */ (function () {
4744
4735
  return modifiedOptions;
4745
4736
  };
4746
4737
  this.getResults = function (imports, key) {
4747
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
4738
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
4748
4739
  var importResults = (_a = _this.model) === null || _a === void 0 ? void 0 : _a.getDerivedFunction(key + "_results");
4749
4740
  if (importResults)
4750
4741
  return importResults;
@@ -4764,11 +4755,14 @@ var MyImportInterfaces = /** @class */ (function () {
4764
4755
  else if (imp.interfaceId.name === "pin-standard") {
4765
4756
  return (_e = (_d = _this.model).getPCPHelper) === null || _e === void 0 ? void 0 : _e.call(_d).getData();
4766
4757
  }
4758
+ else if (imp.interfaceId.name === "pins-interface") {
4759
+ return (_g = (_f = _this.model).getPCPHelper) === null || _g === void 0 ? void 0 : _g.call(_f).getData();
4760
+ }
4767
4761
  else if (imp.interfaceId.name === "interrupt-standard") {
4768
4762
  var interrupts_1 = [];
4769
4763
  var actions_1 = {};
4770
- var isHighPriority_1 = (_h = (_g = (_f = _this.model) === null || _f === void 0 ? void 0 : _f.getImportValue("interrupt_standard")) === null || _g === void 0 ? void 0 : _g.isHighPriority) !== null && _h !== void 0 ? _h : {};
4771
- (_l = (0, Utils_1.values)((_k = (_j = _this.model.getHardware()) === null || _j === void 0 ? void 0 : _j.getPeripheral().interrupts) !== null && _k !== void 0 ? _k : {})) === null || _l === void 0 ? void 0 : _l.forEach(function (interrupt) {
4764
+ var isHighPriority_1 = (_k = (_j = (_h = _this.model) === null || _h === void 0 ? void 0 : _h.getImportValue("interrupt_standard")) === null || _j === void 0 ? void 0 : _j.isHighPriority) !== null && _k !== void 0 ? _k : {};
4765
+ (_o = (0, Utils_1.values)((_m = (_l = _this.model.getHardware()) === null || _l === void 0 ? void 0 : _l.getPeripheral().interrupts) !== null && _m !== void 0 ? _m : {})) === null || _o === void 0 ? void 0 : _o.forEach(function (interrupt) {
4772
4766
  var _a, _b;
4773
4767
  var _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z;
4774
4768
  if (!interrupt)
@@ -4804,13 +4798,13 @@ var MyImportInterfaces = /** @class */ (function () {
4804
4798
  return {
4805
4799
  interruptList: interrupts_1,
4806
4800
  interruptActions: actions_1,
4807
- moduleName: (_m = _this.model.getName()) !== null && _m !== void 0 ? _m : "",
4801
+ moduleName: (_p = _this.model.getName()) !== null && _p !== void 0 ? _p : "",
4808
4802
  };
4809
4803
  }
4810
4804
  else if (imp.interfaceId.name === "api-prefix-registration") {
4811
4805
  var apiPrefixResults = {
4812
- apiPrefix: (_q = (_p = (_o = _this.model) === null || _o === void 0 ? void 0 : _o.getDerivedFunctions()) === null || _p === void 0 ? void 0 : _p.apiPrefix) !== null && _q !== void 0 ? _q : (_r = _this.model) === null || _r === void 0 ? void 0 : _r.getComponentValue("componentName"),
4813
- moduleName: (_s = _this.model) === null || _s === void 0 ? void 0 : _s.getName(),
4806
+ apiPrefix: (_s = (_r = (_q = _this.model) === null || _q === void 0 ? void 0 : _q.getDerivedFunctions()) === null || _r === void 0 ? void 0 : _r.apiPrefix) !== null && _s !== void 0 ? _s : (_t = _this.model) === null || _t === void 0 ? void 0 : _t.getComponentValue("componentName"),
4807
+ moduleName: (_u = _this.model) === null || _u === void 0 ? void 0 : _u.getName(),
4814
4808
  };
4815
4809
  return apiPrefixResults;
4816
4810
  }
@@ -5111,7 +5105,7 @@ exports.PCPHelper = PCPHelper;
5111
5105
 
5112
5106
  Object.defineProperty(exports, "__esModule", { value: true });
5113
5107
  exports.PCPStateActionBuilder = void 0;
5114
- var pin_standard_1 = __webpack_require__(/*! @microchip/pin-standard */ "./node_modules/@microchip/pin-standard/lib/index.js");
5108
+ var types_1 = __webpack_require__(/*! @microchip/pins-interface/lib/types */ "./node_modules/@microchip/pins-interface/lib/types.js");
5115
5109
  var PCPStateActionBuilder = /** @class */ (function () {
5116
5110
  function PCPStateActionBuilder(pinRow) {
5117
5111
  this.actionDataArr = [];
@@ -5131,30 +5125,31 @@ var PCPStateActionBuilder = /** @class */ (function () {
5131
5125
  this.tabId = tabId;
5132
5126
  return this;
5133
5127
  };
5134
- PCPStateActionBuilder.prototype.addIfLockedSetValue = function (pinRegEx, value) {
5128
+ PCPStateActionBuilder.prototype.addIfLockedSetValue = function (pinRegEx, value, pinNameReEx) {
5135
5129
  this.actionDataArr.push({
5136
- pinstate: pin_standard_1.pin_state.LOCKED,
5130
+ pinstate: types_1.pin_state.LOCKED,
5137
5131
  validFor: pinRegEx,
5132
+ validForpinNameReEx: pinNameReEx,
5138
5133
  value: value,
5139
- actiontype: pin_standard_1.actiontype.SETACTION,
5134
+ actiontype: types_1.actiontype.SETACTION,
5140
5135
  });
5141
5136
  return this;
5142
5137
  };
5143
5138
  PCPStateActionBuilder.prototype.addIfLockedProvideAttribs = function (pinRegEx, attribs) {
5144
5139
  this.actionDataArr.push({
5145
- pinstate: pin_standard_1.pin_state.LOCKED,
5140
+ pinstate: types_1.pin_state.LOCKED,
5146
5141
  validFor: pinRegEx,
5147
5142
  value: this.formAttribs(attribs),
5148
- actiontype: pin_standard_1.actiontype.ATTRIBACTION,
5143
+ actiontype: types_1.actiontype.ATTRIBACTION,
5149
5144
  });
5150
5145
  return this;
5151
5146
  };
5152
5147
  PCPStateActionBuilder.prototype.addIfUnlockedProvideAttribs = function (pinRegEx, attribs) {
5153
5148
  this.actionDataArr.push({
5154
- pinstate: pin_standard_1.pin_state.UNLOCK,
5149
+ pinstate: types_1.pin_state.UNLOCK,
5155
5150
  validFor: pinRegEx,
5156
5151
  value: this.formAttribs(attribs),
5157
- actiontype: pin_standard_1.actiontype.ATTRIBACTION,
5152
+ actiontype: types_1.actiontype.ATTRIBACTION,
5158
5153
  });
5159
5154
  return this;
5160
5155
  };
@@ -5165,10 +5160,10 @@ var PCPStateActionBuilder = /** @class */ (function () {
5165
5160
  };
5166
5161
  PCPStateActionBuilder.prototype.addIfUnLockedSetValue = function (pinRegEx, value) {
5167
5162
  this.actionDataArr.push({
5168
- pinstate: pin_standard_1.pin_state.UNLOCK,
5163
+ pinstate: types_1.pin_state.UNLOCK,
5169
5164
  validFor: pinRegEx,
5170
5165
  value: value,
5171
- actiontype: pin_standard_1.actiontype.SETACTION,
5166
+ actiontype: types_1.actiontype.SETACTION,
5172
5167
  });
5173
5168
  return this;
5174
5169
  };
@@ -5183,7 +5178,7 @@ var PCPStateActionBuilder = /** @class */ (function () {
5183
5178
  this.actionDataArr.forEach(function (eachData) {
5184
5179
  var _a;
5185
5180
  var _b;
5186
- actionArr.push({
5181
+ var actionObj = {
5187
5182
  validFor: eachData.validFor,
5188
5183
  state: (_a = {},
5189
5184
  _a[eachData.pinstate] = {
@@ -5196,7 +5191,11 @@ var PCPStateActionBuilder = /** @class */ (function () {
5196
5191
  },
5197
5192
  _a),
5198
5193
  actiontype: (_b = eachData.actiontype) !== null && _b !== void 0 ? _b : "",
5199
- });
5194
+ };
5195
+ if (eachData.validForpinNameReEx !== undefined) {
5196
+ actionObj.validForpinNameReEx = eachData.validForpinNameReEx;
5197
+ }
5198
+ actionArr.push(actionObj);
5200
5199
  });
5201
5200
  }
5202
5201
  return actionArr;
@@ -5433,7 +5432,7 @@ function getTableComponentSchema(component, viewModel) {
5433
5432
  }
5434
5433
  return {
5435
5434
  type: "array",
5436
- title: (_d = (_c = (_b = viewModel.getDerivedFunction).overrideTitle) === null || _c === void 0 ? void 0 : _c.call(_b, component.name)) !== null && _d !== void 0 ? _d : component.description,
5435
+ title: (_d = (_c = (_b = viewModel.viewModel.derivedFunctions) === null || _b === void 0 ? void 0 : _b.overrideTitle) === null || _c === void 0 ? void 0 : _c.call(_b, component.name)) !== null && _d !== void 0 ? _d : component.description,
5437
5436
  items: {
5438
5437
  type: "object",
5439
5438
  properties: __assign({}, tableColumns),
@@ -5796,7 +5795,7 @@ function getTableUiSchema(table, columns) {
5796
5795
  var tableUi = {
5797
5796
  tableCols: columns,
5798
5797
  search: table["isSearchable"],
5799
- striped: true,
5798
+ striped: false,
5800
5799
  bordered: false,
5801
5800
  };
5802
5801
  if (table["canRemoveRows"]) {
@@ -5943,845 +5942,286 @@ function createRowUid(prefix, postfix) {
5943
5942
 
5944
5943
  /***/ }),
5945
5944
 
5946
- /***/ "./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js":
5947
- /*!********************************************************************************************************************************!*\
5948
- !*** ./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js ***!
5949
- \********************************************************************************************************************************/
5945
+ /***/ "./node_modules/@microchip/scf-common/lib/Processor.js":
5946
+ /*!*************************************************************!*\
5947
+ !*** ./node_modules/@microchip/scf-common/lib/Processor.js ***!
5948
+ \*************************************************************/
5950
5949
  /*! no static exports found */
5951
5950
  /***/ (function(module, exports, __webpack_require__) {
5952
5951
 
5953
5952
  "use strict";
5954
5953
 
5955
- var __importDefault = (this && this.__importDefault) || function (mod) {
5956
- return (mod && mod.__esModule) ? mod : { "default": mod };
5954
+ var __assign = (this && this.__assign) || function () {
5955
+ __assign = Object.assign || function(t) {
5956
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5957
+ s = arguments[i];
5958
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
5959
+ t[p] = s[p];
5960
+ }
5961
+ return t;
5962
+ };
5963
+ return __assign.apply(this, arguments);
5957
5964
  };
5958
5965
  Object.defineProperty(exports, "__esModule", { value: true });
5959
- exports.CreateRegisterView = void 0;
5960
- var Setting_1 = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
5961
- var CalculateRegisterValue_1 = __importDefault(__webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js"));
5962
- var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
5963
- var ViewSchemaBuilder_1 = __webpack_require__(/*! ./ViewSchemaBuilder */ "./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js");
5964
- var Model_1 = __webpack_require__(/*! ./Model */ "./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/Model.js");
5965
- var throwError = function (message) {
5966
- throw new Error(message);
5966
+ exports.mapOptionLabels = exports.filterOptions = exports.isSingleton = exports.isUnassigned = exports.isAssigned = exports.hasOptions = exports.AlertTypes = void 0;
5967
+ var AlertTypes;
5968
+ (function (AlertTypes) {
5969
+ AlertTypes["Error"] = "error";
5970
+ AlertTypes["Warning"] = "warning";
5971
+ AlertTypes["Hint"] = "hint";
5972
+ })(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));
5973
+ /**
5974
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
5975
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
5976
+ */
5977
+ function hasOptions(dep) {
5978
+ return dep.options !== undefined;
5979
+ }
5980
+ exports.hasOptions = hasOptions;
5981
+ /**
5982
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
5983
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
5984
+ */
5985
+ function isAssigned(dep) {
5986
+ return typeof dep.handle !== "undefined";
5987
+ }
5988
+ exports.isAssigned = isAssigned;
5989
+ /**
5990
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
5991
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
5992
+ */
5993
+ function isUnassigned(dep) {
5994
+ return typeof dep.handle === "undefined";
5995
+ }
5996
+ exports.isUnassigned = isUnassigned;
5997
+ /**
5998
+ * Type guard function for SingletonExport
5999
+ * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
6000
+ * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
6001
+ * @param resource the export to check on being a singleton
6002
+ * @deprecated No longer used. Replaced with dynamic singleton identification
6003
+ * at runtime.
6004
+ */
6005
+ function isSingleton(resource) {
6006
+ return typeof resource.isSingleton !== "undefined" && resource.isSingleton;
6007
+ }
6008
+ exports.isSingleton = isSingleton;
6009
+ /**
6010
+ * Returns a copy of `populatedImport` with all options removed which
6011
+ * cause `optionFilter` to return false.
6012
+ */
6013
+ function filterOptions(populatedImport, optionFilter) {
6014
+ if (populatedImport.options) {
6015
+ return __assign(__assign({}, populatedImport), { options: populatedImport.options.filter(optionFilter) });
6016
+ }
6017
+ return populatedImport;
6018
+ }
6019
+ exports.filterOptions = filterOptions;
6020
+ /**
6021
+ * Returns a copy of `populatedImport` with the options' handle labels
6022
+ * mapped according to `labelFactory`.
6023
+ */
6024
+ function mapOptionLabels(populatedImport, labelFactory) {
6025
+ if (populatedImport.options) {
6026
+ return __assign(__assign({}, populatedImport), { options: populatedImport.options.map(function (option) {
6027
+ return __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: labelFactory(option) }) });
6028
+ }) });
6029
+ }
6030
+ return populatedImport;
6031
+ }
6032
+ exports.mapOptionLabels = mapOptionLabels;
6033
+
6034
+
6035
+ /***/ }),
6036
+
6037
+ /***/ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js":
6038
+ /*!**************************************************************************!*\
6039
+ !*** ./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js ***!
6040
+ \**************************************************************************/
6041
+ /*! no static exports found */
6042
+ /***/ (function(module, exports, __webpack_require__) {
6043
+
6044
+ "use strict";
6045
+
6046
+ var __extends = (this && this.__extends) || (function () {
6047
+ var extendStatics = function (d, b) {
6048
+ extendStatics = Object.setPrototypeOf ||
6049
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6050
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6051
+ return extendStatics(d, b);
6052
+ };
6053
+ return function (d, b) {
6054
+ if (typeof b !== "function" && b !== null)
6055
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
6056
+ extendStatics(d, b);
6057
+ function __() { this.constructor = d; }
6058
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6059
+ };
6060
+ })();
6061
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6062
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6063
+ if (ar || !(i in from)) {
6064
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6065
+ ar[i] = from[i];
6066
+ }
6067
+ }
6068
+ return to.concat(ar || Array.prototype.slice.call(from));
5967
6069
  };
5968
- var CreateRegisterView = /** @class */ (function () {
5969
- function CreateRegisterView(module) {
6070
+ Object.defineProperty(exports, "__esModule", { value: true });
6071
+ var Setting_1 = __webpack_require__(/*! ./Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
6072
+ var Register_1 = __webpack_require__(/*! ./Register */ "./node_modules/@microchip/scf-device/lib/Register.js");
6073
+ var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6074
+ /** Builder pattern */
6075
+ var CalculateRegisterValue = /** @class */ (function () {
6076
+ function CalculateRegisterValue(register) {
5970
6077
  var _this = this;
5971
- this.registers = [];
5972
- this.interrupts = [];
5973
- /** Create a register view */
5974
- this.create = function () {
5975
- var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()
5976
- .withSchema({
5977
- title: "Register Settings",
5978
- type: "object",
5979
- })
5980
- .withTabName("Register Initialization")
5981
- .withExpandedDefault(false);
5982
- _this.registers.forEach(function (reg) {
5983
- schemaBuilder.addChildComponent(reg.getRegister().name, _this.createRegisterView(reg));
5984
- });
5985
- schemaBuilder.addChildComponent("interrupts", _this.createInterruptView());
5986
- return schemaBuilder.build();
5987
- };
5988
- /** Assign a numerical value to the given register. */
5989
- this.withRegisterValue = function (register, value) {
5990
- _this.getSafeRegisterViewModel(register).setValue(value);
5991
- return _this;
5992
- };
5993
- /** Assign a string value to the given interrupt. */
5994
- this.withInterruptValue = function (interrupt, value) {
5995
- _this.getSafeInterruptViewModel(interrupt).setValue(value);
5996
- return _this;
5997
- };
5998
- /** Assign the interrupt combobox options. */
5999
- this.withInterruptOptions = function (interrupt, options) {
6000
- _this.getSafeInterruptViewModel(interrupt).setOptions(options);
6078
+ this.modifiedSettings = [];
6079
+ /** Assign a numerical value to the given `Setting`. */
6080
+ this.withNumberValue = function (setting, value) {
6081
+ if (setting === undefined) {
6082
+ throw new Error("Cannot assign number value to setting, setting is undefined.");
6083
+ }
6084
+ if (!_this.getSetting(setting)) {
6085
+ throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
6086
+ }
6087
+ _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
6088
+ new NumberSettingValue(setting, value),
6089
+ ], false);
6001
6090
  return _this;
6002
6091
  };
6003
- /** Make all settings in all registers editable */
6004
- this.withAllEditable = function () {
6005
- _this.registers.forEach(function (register) {
6006
- return _this.withEditableRegister(register.getRegister());
6007
- });
6008
- _this.interrupts.forEach(function (interrupt) {
6009
- _this.withEditableInterrupt(interrupt.getInterrupt());
6010
- });
6092
+ /** Assign the given `Option` to the given `Setting`. */
6093
+ this.withOption = function (setting, option) {
6094
+ if (setting === undefined) {
6095
+ throw new Error("Cannot assign option to setting, setting is undefined.");
6096
+ }
6097
+ if (!_this.getSetting(setting)) {
6098
+ throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
6099
+ }
6100
+ if (!option || !_this.getOption(setting, option)) {
6101
+ throw new Error("Option ".concat(option === null || option === void 0 ? void 0 : option.name, " is not present in Setting ").concat(setting.name));
6102
+ }
6103
+ _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
6104
+ new OptionSettingValue(setting, option),
6105
+ ], false);
6011
6106
  return _this;
6012
6107
  };
6013
- /** Make settings in the given register editable based on setting type*/
6014
- this.withEditableRegister = function (register) {
6015
- var _a, _b;
6016
- _this.getSafeRegisterViewModel(register).setReadonly(false);
6017
- if (register) {
6018
- (_b = (0, Arrays_1.values)((_a = register === null || register === void 0 ? void 0 : register.settings) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (setting) {
6019
- if ((setting === null || setting === void 0 ? void 0 : setting.type) === "R") {
6020
- _this.getSafeSettingViewModel(register, setting).setReadonly(true);
6021
- }
6022
- });
6108
+ /** Assign the `Option` matching the given alias to the given `Setting`. */
6109
+ this.withOptionAlias = function (setting, optionAlias) {
6110
+ if (setting === undefined) {
6111
+ throw new Error("Cannot assign option alias to setting, setting is undefined.");
6023
6112
  }
6024
- return _this;
6113
+ var option = (0, Setting_1.getOptionByAlias)(optionAlias, setting);
6114
+ if (option === undefined) {
6115
+ throw new Error("Option Alias: \"".concat(optionAlias, "\" not present in Setting: \"").concat(setting.name, "\"."));
6116
+ }
6117
+ return _this.withOption(setting, option);
6025
6118
  };
6026
- /** Make a given setting in register editable */
6027
- this.withEditableSetting = function (register, setting) {
6028
- _this.getSafeSettingViewModel(register, setting).setReadonly(false);
6029
- return _this;
6030
- };
6031
- /** Make a given interrupt editable */
6032
- this.withEditableInterrupt = function (interrupt) {
6033
- _this.getSafeInterruptViewModel(interrupt).setReadonly(false);
6034
- return _this;
6035
- };
6036
- this.getSafeRegisterViewModel = function (register) {
6037
- var _a;
6038
- return (_a = _this.getRegisterViewModel(register !== null && register !== void 0 ? register : throwError("Invalid register parameter."))) !== null && _a !== void 0 ? _a : throwError("Cannot get register view model for '".concat(register.name, "'. Not found in this module."));
6039
- };
6040
- this.getSafeInterruptViewModel = function (interrupt) {
6041
- var _a;
6042
- return (_a = _this.getInterruptViewModel(interrupt !== null && interrupt !== void 0 ? interrupt : throwError("Invalid interrupt parameter."))) !== null && _a !== void 0 ? _a : throwError("Cannot get interrupt view model for '".concat(interrupt.name, "'. Not found in this module."));
6119
+ /** Assign the `Option` matching the given name to the given `Setting`. */
6120
+ this.withOptionName = function (setting, optionName) {
6121
+ if (setting === undefined) {
6122
+ throw new Error("Cannot assign option name to setting, setting is undefined.");
6123
+ }
6124
+ var option = (0, Setting_1.getOptionByName)(optionName, setting);
6125
+ if (option === undefined) {
6126
+ throw new Error("Option Name: \"".concat(optionName, "\" not present in Setting: \"").concat(setting.name, "\"."));
6127
+ }
6128
+ return _this.withOption(setting, option);
6043
6129
  };
6044
- this.getSafeSettingViewModel = function (register, setting) {
6045
- var _a;
6046
- return (_a = _this.getSafeRegisterViewModel(register).getSettingViewModel(setting !== null && setting !== void 0 ? setting : throwError("Invalid setting parameter."))) !== null && _a !== void 0 ? _a : throwError("Cannot get setting view model for '".concat(setting.name, "'. Not found in this module."));
6130
+ /** Assign the `Option` matching the given description to the given `Setting`. */
6131
+ this.withOptionDescription = function (setting, optionDescription) {
6132
+ if (setting === undefined) {
6133
+ throw new Error("Cannot assign option description to setting, setting is undefined.");
6134
+ }
6135
+ var option = (0, Setting_1.getOptionByDescription)(optionDescription, setting);
6136
+ if (option === undefined) {
6137
+ throw new Error("Option Description: \"".concat(optionDescription, "\" not present in Setting: \"").concat(setting.name, "\"."));
6138
+ }
6139
+ return _this.withOption(setting, option);
6047
6140
  };
6048
- this.getRegisterViewModel = function (register) {
6049
- var name = register.name;
6050
- return (0, Arrays_1.find)(_this.registers, function (rv) { return rv.getRegister().name === name; });
6141
+ this.getSetting = function (setting) {
6142
+ return (0, Register_1.getSettingByAlias)(setting.alias, _this.register);
6051
6143
  };
6052
- this.getInterruptViewModel = function (interrupt) {
6053
- var name = interrupt.name;
6054
- return (0, Arrays_1.find)(_this.interrupts, function (rv) { return rv.getInterrupt().name === name; });
6144
+ this.getOption = function (setting, option) {
6145
+ return (option === null || option === void 0 ? void 0 : option.name) ? (0, Setting_1.getOptionByName)(option.name, setting) : undefined;
6055
6146
  };
6056
- this.createRegisterView = function (register) {
6057
- var registerValue = register.getValue() || 0;
6058
- var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()
6059
- .withSchema({
6060
- type: "object",
6061
- title: register.getName() +
6062
- " : " +
6063
- CalculateRegisterValue_1.default.toHexString(registerValue),
6064
- description: register.getDescription(),
6065
- properties: {},
6066
- })
6067
- .withUiSchema({})
6068
- .withFormData({});
6069
- register.forEachSetting(function (setting) {
6070
- schemaBuilder.addChildComponent(setting.getName(), _this.createSettingView(setting));
6147
+ this.calculate = function () {
6148
+ var registerValue = 0;
6149
+ _this.modifiedSettings.forEach(function (modifiedSetting) {
6150
+ registerValue = _this.setValue(modifiedSetting, registerValue);
6071
6151
  });
6072
- return schemaBuilder.build();
6152
+ var unmodifiedSettings = _this.getUnmodifiedSettings();
6153
+ unmodifiedSettings.forEach(function (unmodifiedSetting) {
6154
+ registerValue = _this.setValue(SettingValue.defaultValue(unmodifiedSetting), registerValue);
6155
+ });
6156
+ return Number(registerValue);
6073
6157
  };
6074
- this.createSettingView = function (setting) {
6075
- return setting.hasOptions()
6076
- ? _this.createHasOptionsViewSchema(setting)
6077
- : _this.getNoOptionsViewSchema(setting);
6158
+ this.setValue = function (setting, registerValue) {
6159
+ var value = registerValue;
6160
+ value &= ~setting.getMask(); // Clear bits
6161
+ value |= setting.getShiftedValue(); // Set bits
6162
+ return value >>> 0;
6078
6163
  };
6079
- this.createInterruptView = function () {
6080
- var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()
6081
- .withSchema({
6082
- type: "object",
6083
- title: "Interrupts",
6084
- properties: {},
6085
- })
6086
- .withUiSchema({})
6087
- .withFormData({});
6088
- _this.interrupts.forEach(function (int) {
6089
- schemaBuilder.addChildComponent(int.getInterrupt().name, _this.createInterruptViewSchema(int));
6164
+ this.getUnmodifiedSettings = function () {
6165
+ var _a, _b;
6166
+ var modifiedSettingNames = (0, Arrays_1.map)(_this.modifiedSettings, function (setting) {
6167
+ return setting.getName();
6090
6168
  });
6091
- return schemaBuilder.build();
6092
- };
6093
- this.module = module;
6094
- this.registers = this.createRegisterViewModelForEachRegister(module);
6095
- this.interrupts = this.createInterruptViewModelForEachInterrupt(module);
6096
- }
6097
- CreateRegisterView.prototype.createRegisterViewModelForEachRegister = function (module) {
6098
- var _a;
6099
- var models = [];
6100
- var registers = (_a = module.registers) !== null && _a !== void 0 ? _a : {};
6101
- Object.keys(registers).forEach(function (registerKey) {
6102
- models.push(new Model_1.RegisterViewModel(registers[registerKey]));
6103
- });
6104
- return models;
6105
- };
6106
- CreateRegisterView.prototype.createInterruptViewModelForEachInterrupt = function (module) {
6107
- var _a;
6108
- var models = [];
6109
- var interrupts = (_a = module.interrupts) !== null && _a !== void 0 ? _a : {};
6110
- Object.keys(interrupts).forEach(function (interruptKey) {
6111
- models.push(new Model_1.InterruptViewModel(interrupts[interruptKey]));
6112
- });
6113
- return models;
6114
- };
6115
- CreateRegisterView.prototype.getNoOptionsViewSchema = function (setting) {
6116
- var _a;
6117
- var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()
6118
- .withReadonlyValue(setting.getIsReadonly())
6119
- .withUiHelp("".concat(setting.getName(), ": ") + ((_a = setting.getDescription()) !== null && _a !== void 0 ? _a : ""));
6120
- return {
6121
- schema: this.createSettingViewSchema(setting),
6122
- uiSchema: setting.getMaxValue() > 1
6123
- ? uiSchemaBuilder.build()
6124
- : this.getBinarySettingUiSchema(setting),
6125
- formData: setting.mapToOptionNameIfExists(setting.getValue()),
6169
+ return (0, Arrays_1.filter)((_b = (0, Arrays_1.values)((_a = _this.register.settings) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], function (setting) { return modifiedSettingNames.indexOf(setting.name) < 0; });
6126
6170
  };
6127
- };
6128
- CreateRegisterView.prototype.createHasOptionsViewSchema = function (setting) {
6129
- var _a, _b;
6130
- var schemaBuilder = new ViewSchemaBuilder_1.SchemaBuilder("string", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : "")
6131
- .withEnum(setting.getOptionNames())
6132
- .withDefault(setting.mapToOptionNameIfExists(setting.getValue()));
6133
- var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()
6134
- .withReadonlyValue(setting.getIsReadonly())
6135
- .withUiHelp("".concat(setting.getName(), ": ") + ((_b = setting.getDescription()) !== null && _b !== void 0 ? _b : ""));
6136
- return {
6137
- schema: schemaBuilder.build(),
6138
- uiSchema: uiSchemaBuilder.build(),
6139
- formData: setting.mapToOptionNameIfExists(setting.getValue()),
6171
+ /** Calculate and print the register's value as a hex string. */
6172
+ this.asHexString = function () { return CalculateRegisterValue.toHexString(_this.calculate()); };
6173
+ /** Calculate and print the register's value as a binary string. */
6174
+ this.asBinaryString = function () {
6175
+ return CalculateRegisterValue.toBinaryString(_this.calculate());
6140
6176
  };
6141
- };
6142
- CreateRegisterView.prototype.createSettingViewSchema = function (setting) {
6143
- var _a;
6144
- var schema = new ViewSchemaBuilder_1.SchemaBuilder("integer", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : "").withDefault(setting.mapToOptionNameIfExists(setting.getPORDefault()));
6145
- setting.getMaxValue() > 1
6146
- ? schema.withMaximum(setting.getMaxValue()).withMinimum(0)
6147
- : schema.withEnum([0, 1]);
6148
- return schema.build();
6149
- };
6150
- CreateRegisterView.prototype.createInterruptViewSchema = function (interrupt) {
6151
- var _a;
6152
- var schema = new ViewSchemaBuilder_1.SchemaBuilder("string", interrupt.getInterrupt().name)
6153
- .withEnum(interrupt.getOptions())
6154
- .withDefault(interrupt.getValue());
6155
- var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder().withReadonlyValue(interrupt.getIsReadonly());
6156
- return {
6157
- schema: schema.build(),
6158
- uiSchema: uiSchemaBuilder.build(),
6159
- formData: (_a = interrupt.getValue()) !== null && _a !== void 0 ? _a : {},
6177
+ /** Calculate and print the register's value as a decimal string. */
6178
+ this.asDecimalString = function () {
6179
+ return CalculateRegisterValue.toDecimalString(_this.calculate());
6160
6180
  };
6181
+ /** Calculate and return the register's value as a number. */
6182
+ this.asNumber = function () { return _this.calculate(); };
6183
+ this.register = register;
6184
+ }
6185
+ /** Creates a register value calculation object for the given register. */
6186
+ CalculateRegisterValue.for = function (register) {
6187
+ return new CalculateRegisterValue(register);
6161
6188
  };
6162
- CreateRegisterView.prototype.getBinarySettingUiSchema = function (setting) {
6163
- return new ViewSchemaBuilder_1.UiSchemaBuilder()
6164
- .withReadonlyValue(setting.getIsReadonly())
6165
- .withWidget("radio")
6166
- .withOptions({ inline: true })
6167
- .build();
6189
+ /** Format the given number as a hex string value. */
6190
+ CalculateRegisterValue.toHexString = function (value) {
6191
+ if (value == null) {
6192
+ throw new Error("CalculateRegisterValue.toHexString() illegal argument exception. Value must not be null.");
6193
+ }
6194
+ return "0x" + value.toString(16);
6168
6195
  };
6169
- /** Creates Register View Builder for the given module. */
6170
- CreateRegisterView.for = function (moduleDescription) {
6171
- if (!moduleDescription) {
6172
- throwError("Creation failed. Invalid module parameter.");
6196
+ /** Format the given number as a binary string value. */
6197
+ CalculateRegisterValue.toBinaryString = function (value) {
6198
+ if (value == null) {
6199
+ throw new Error("CalculateRegisterValue.toBinaryString() illegal argument exception. Value must not be null.");
6173
6200
  }
6174
- if (!moduleDescription.registers && !moduleDescription.interrupts) {
6175
- throwError("Creation failed for ".concat(moduleDescription.name, ". Input module contains no registers or interrupts."));
6201
+ return "0b" + value.toString(2);
6202
+ };
6203
+ /** Format the given number as a decimal string value. */
6204
+ CalculateRegisterValue.toDecimalString = function (value) {
6205
+ if (value == null) {
6206
+ throw new Error("CalculateRegisterValue.toDecimalString() illegal argument exception. Value must not be null.");
6176
6207
  }
6177
- return new CreateRegisterView(moduleDescription);
6208
+ return value.toString();
6178
6209
  };
6179
- return CreateRegisterView;
6210
+ return CalculateRegisterValue;
6180
6211
  }());
6181
- exports.CreateRegisterView = CreateRegisterView;
6182
- //# sourceMappingURL=CreateRegisterView.js.map
6183
-
6184
- /***/ }),
6185
-
6186
- /***/ "./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/Model.js":
6187
- /*!*******************************************************************************************************************!*\
6188
- !*** ./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/Model.js ***!
6189
- \*******************************************************************************************************************/
6190
- /*! no static exports found */
6191
- /***/ (function(module, exports, __webpack_require__) {
6192
-
6193
- "use strict";
6194
-
6195
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6196
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6197
- if (ar || !(i in from)) {
6198
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6199
- ar[i] = from[i];
6200
- }
6201
- }
6202
- return to.concat(ar || Array.prototype.slice.call(from));
6203
- };
6204
- var __importDefault = (this && this.__importDefault) || function (mod) {
6205
- return (mod && mod.__esModule) ? mod : { "default": mod };
6206
- };
6207
- Object.defineProperty(exports, "__esModule", { value: true });
6208
- exports.SettingViewModel = exports.RegisterViewModel = exports.InterruptViewModel = void 0;
6209
- var CalculateRegisterValue_1 = __importDefault(__webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js"));
6210
- var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6211
- var Setting_1 = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
6212
- var InterruptViewModel = /** @class */ (function () {
6213
- function InterruptViewModel(interrupt) {
6212
+ exports.default = CalculateRegisterValue;
6213
+ var SettingValue = /** @class */ (function () {
6214
+ function SettingValue(setting) {
6214
6215
  var _this = this;
6215
- this.isReadOnly = true;
6216
- this.getInterrupt = function () { return _this.interrupt; };
6217
- this.setValue = function (value) {
6218
- _this.value = value;
6219
- };
6220
- this.getValue = function () { return _this.value; };
6221
- this.setOptions = function (options) {
6222
- _this.options = options;
6223
- };
6224
- this.getOptions = function () { var _a; return (_a = _this.options) !== null && _a !== void 0 ? _a : []; };
6225
- this.getIsReadonly = function () { return _this.isReadOnly; };
6226
- this.setReadonly = function (isReadOnly) {
6227
- _this.isReadOnly = isReadOnly;
6228
- };
6229
- if (!interrupt) {
6230
- throw new Error("IllegalInputArgument for 'interrupt' in InterruptValue");
6231
- }
6232
- this.interrupt = interrupt;
6233
- }
6234
- return InterruptViewModel;
6235
- }());
6236
- exports.InterruptViewModel = InterruptViewModel;
6237
- var RegisterViewModel = /** @class */ (function () {
6238
- function RegisterViewModel(register) {
6239
- var _this = this;
6240
- this.settings = [];
6241
- this.getSettings = function () { return _this.settings; };
6242
- this.getSettingViewModel = function (setting) {
6243
- var name = setting.name;
6244
- return (0, Arrays_1.find)(_this.settings, function (rv) { return rv.getSetting().name === name; });
6245
- };
6246
- this.forEachSetting = function (doThis) {
6247
- _this.settings.forEach(doThis);
6248
- };
6249
- this.getRegister = function () { return _this.register; };
6250
- this.getName = function () { return _this.register.name; };
6251
- this.getDescription = function () { return _this.register.desc; };
6252
- this.getValue = function () { return _this.value; };
6253
- this.setValue = function (value) {
6254
- _this.value = value;
6255
- };
6256
- this.setReadonly = function (value) {
6257
- if (value === void 0) { value = true; }
6258
- _this.forEachSetting(function (setting) { return setting.setReadonly(value); });
6259
- };
6260
- this.getDefaultValue = function () { return CalculateRegisterValue_1.default.for(_this.register).asNumber(); };
6261
- this.getValueOrDefault = function () {
6262
- var value = _this.getValue();
6263
- return value !== null && value !== void 0 ? value : _this.getDefaultValue();
6264
- };
6265
- if (!register) {
6266
- throw new Error("IllegalInputArgument for 'register' in RegisterValue");
6267
- }
6268
- this.register = register;
6269
- if (register.settings) {
6270
- this.settings = this.createSettingViewModels(register);
6271
- }
6272
- }
6273
- RegisterViewModel.prototype.createSettingViewModels = function (register) {
6274
- var _this = this;
6275
- var _a;
6276
- var models = [];
6277
- var settings = (_a = register.settings) !== null && _a !== void 0 ? _a : {};
6278
- Object.keys(settings).forEach(function (settingKey) {
6279
- models.push(new SettingViewModel(settings[settingKey], _this.getValueOrDefault));
6280
- });
6281
- return RegisterViewModel.sortSettingsDescending(models);
6282
- };
6283
- /** Sorts the settings in descending order based on bit positions. */
6284
- RegisterViewModel.sortSettingsDescending = function (settings) {
6285
- var result = __spreadArray([], settings, true);
6286
- result.sort(function (settingOne, settingTwo) {
6287
- var _a, _b, _c, _d;
6288
- var bitRangeOne = (_b = (_a = (0, Setting_1.getBitRange)(settingOne.getSetting())) === null || _a === void 0 ? void 0 : _a.high) !== null && _b !== void 0 ? _b : -1;
6289
- var bitRangeTwo = (_d = (_c = (0, Setting_1.getBitRange)(settingTwo.getSetting())) === null || _c === void 0 ? void 0 : _c.high) !== null && _d !== void 0 ? _d : -1;
6290
- return bitRangeTwo - bitRangeOne;
6291
- });
6292
- return result;
6293
- };
6294
- return RegisterViewModel;
6295
- }());
6296
- exports.RegisterViewModel = RegisterViewModel;
6297
- var SettingViewModel = /** @class */ (function () {
6298
- function SettingViewModel(setting, getRegisterValue) {
6299
- var _this = this;
6300
- this.isReadonly = true;
6301
- this.setReadonly = function (value) {
6302
- if (value === void 0) { value = true; }
6303
- _this.isReadonly = value;
6304
- };
6305
- this.getIsReadonly = function () { return _this.isReadonly; };
6306
- this.getSetting = function () { return _this.setting; };
6307
- this.getName = function () { return _this.setting.name; };
6308
- this.getDescription = function () { return _this.setting.description; };
6309
- this.getPORDefault = function () { return Number(_this.setting.porDefault); };
6310
- this.getMask = function () { return Number(_this.setting.mask); };
6311
- this.hasOptions = function () {
6312
- return !!_this.setting.options;
6313
- };
6314
- this.getOptionNames = function () {
6315
- return (0, Arrays_1.map)(nullSafe(_this.setting.options), function (option) { return option.name; });
6316
- };
6317
- this.mapToOptionNameIfExists = function (value) {
6318
- var option = _this.getOptionForValue(value);
6319
- return option !== undefined ? option.name : value;
6320
- };
6321
- this.getOptionForValue = function (value) {
6322
- return (0, Arrays_1.find)(nullSafe(_this.setting.options), function (option) {
6323
- var optionValue = option.value;
6324
- return optionValue != undefined ? parseInt(optionValue) === value : false;
6325
- });
6326
- };
6327
- this.getValue = function () {
6328
- var value = _this.getRegisterValue();
6329
- value &= _this.getMask();
6330
- return value >> _this.getShift();
6331
- };
6332
- this.getShift = function () {
6333
- var mask = _this.getMask();
6334
- var shiftIndex = 0;
6335
- while (!(mask & 0x1)) {
6336
- mask = mask >> 1;
6337
- shiftIndex++;
6338
- }
6339
- return shiftIndex;
6340
- };
6341
- this.getMaxValue = function () {
6342
- var mask = _this.getMask();
6343
- while (!(mask & 0x1)) {
6344
- mask = mask >> 1;
6345
- }
6346
- return mask;
6347
- };
6348
- if (!setting) {
6349
- throw new Error("SettingViewModel: Invalid input argument");
6350
- }
6351
- this.setting = setting;
6352
- this.getRegisterValue = getRegisterValue;
6353
- }
6354
- return SettingViewModel;
6355
- }());
6356
- exports.SettingViewModel = SettingViewModel;
6357
- var nullSafe = function (array) { return array !== null && array !== void 0 ? array : []; };
6358
- //# sourceMappingURL=Model.js.map
6359
-
6360
- /***/ }),
6361
-
6362
- /***/ "./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js":
6363
- /*!*******************************************************************************************************************************!*\
6364
- !*** ./node_modules/@microchip/scf-automodule-impl/node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js ***!
6365
- \*******************************************************************************************************************************/
6366
- /*! no static exports found */
6367
- /***/ (function(module, exports, __webpack_require__) {
6368
-
6369
- "use strict";
6370
-
6371
- var __assign = (this && this.__assign) || function () {
6372
- __assign = Object.assign || function(t) {
6373
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6374
- s = arguments[i];
6375
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6376
- t[p] = s[p];
6377
- }
6378
- return t;
6379
- };
6380
- return __assign.apply(this, arguments);
6381
- };
6382
- Object.defineProperty(exports, "__esModule", { value: true });
6383
- exports.UiSchemaBuilder = exports.SchemaBuilder = exports.ViewSchemaBuilder = void 0;
6384
- var ViewSchemaBuilder = /** @class */ (function () {
6385
- function ViewSchemaBuilder() {
6386
- this.schema = {};
6387
- this.uiSchema = {};
6388
- this.formData = {};
6389
- this.tabName = "main";
6390
- this.expandGroupsByDefault = true;
6391
- }
6392
- ViewSchemaBuilder.prototype.withSchema = function (schema) {
6393
- this.schema = schema;
6394
- return this;
6395
- };
6396
- ViewSchemaBuilder.prototype.withUiSchema = function (uiSchema) {
6397
- this.uiSchema = uiSchema;
6398
- return this;
6399
- };
6400
- ViewSchemaBuilder.prototype.withFormData = function (formData) {
6401
- this.formData = formData;
6402
- return this;
6403
- };
6404
- ViewSchemaBuilder.prototype.withTabName = function (name) {
6405
- this.tabName = name;
6406
- return this;
6407
- };
6408
- ViewSchemaBuilder.prototype.withExpandedDefault = function (expandGroupsByDefault) {
6409
- this.expandGroupsByDefault = expandGroupsByDefault;
6410
- return this;
6411
- };
6412
- ViewSchemaBuilder.prototype.addChildComponent = function (childName, child) {
6413
- var _a, _b, _c;
6414
- this.schema = __assign(__assign({}, this.schema), { properties: __assign(__assign({}, this.schema.properties), (_a = {}, _a[childName] = child.schema, _a)) });
6415
- this.uiSchema = __assign(__assign({}, this.uiSchema), (_b = {}, _b[childName] = child.uiSchema, _b));
6416
- if (this.formData instanceof Object) {
6417
- this.formData = __assign(__assign({}, this.formData), (_c = {}, _c[childName] = child.formData, _c));
6418
- }
6419
- };
6420
- ViewSchemaBuilder.prototype.build = function () {
6421
- return {
6422
- schema: this.schema,
6423
- uiSchema: this.uiSchema,
6424
- formData: this.formData,
6425
- name: this.tabName,
6426
- expandGroupsByDefault: this.expandGroupsByDefault,
6427
- };
6428
- };
6429
- return ViewSchemaBuilder;
6430
- }());
6431
- exports.ViewSchemaBuilder = ViewSchemaBuilder;
6432
- var SchemaBuilder = /** @class */ (function () {
6433
- function SchemaBuilder(type, title) {
6434
- this.title = title;
6435
- this.type = type;
6436
- }
6437
- SchemaBuilder.prototype.withProperties = function (properties) {
6438
- this.properties = properties;
6439
- return this;
6440
- };
6441
- SchemaBuilder.prototype.withDefault = function (defaultValue) {
6442
- this.default = defaultValue;
6443
- return this;
6444
- };
6445
- SchemaBuilder.prototype.withMaximum = function (maximum) {
6446
- this.maximum = maximum;
6447
- return this;
6448
- };
6449
- SchemaBuilder.prototype.withMinimum = function (minimum) {
6450
- this.minimum = minimum;
6451
- return this;
6452
- };
6453
- SchemaBuilder.prototype.withEnum = function (vals) {
6454
- this.enum = vals;
6455
- return this;
6456
- };
6457
- SchemaBuilder.prototype.build = function () {
6458
- return {
6459
- type: this.type,
6460
- title: this.title,
6461
- properties: this.properties,
6462
- default: this.default,
6463
- maximum: this.maximum,
6464
- minimum: this.minimum,
6465
- enum: this.enum,
6466
- };
6467
- };
6468
- return SchemaBuilder;
6469
- }());
6470
- exports.SchemaBuilder = SchemaBuilder;
6471
- var UiSchemaBuilder = /** @class */ (function () {
6472
- function UiSchemaBuilder() {
6473
- }
6474
- UiSchemaBuilder.prototype.withReadonlyValue = function (isReadonly) {
6475
- this.isReadOnly = isReadonly;
6476
- return this;
6477
- };
6478
- UiSchemaBuilder.prototype.withWidget = function (widgetName) {
6479
- this.widget = widgetName;
6480
- return this;
6481
- };
6482
- UiSchemaBuilder.prototype.withOptions = function (options) {
6483
- this.options = options;
6484
- return this;
6485
- };
6486
- UiSchemaBuilder.prototype.withUiHelp = function (uiHelp) {
6487
- this.uiHelp = uiHelp;
6488
- return this;
6489
- };
6490
- UiSchemaBuilder.prototype.build = function () {
6491
- return {
6492
- "ui:readonly": this.isReadOnly,
6493
- "ui:widget": this.widget,
6494
- "ui:options": this.options,
6495
- "ui:help": this.uiHelp,
6496
- };
6497
- };
6498
- return UiSchemaBuilder;
6499
- }());
6500
- exports.UiSchemaBuilder = UiSchemaBuilder;
6501
- //# sourceMappingURL=ViewSchemaBuilder.js.map
6502
-
6503
- /***/ }),
6504
-
6505
- /***/ "./node_modules/@microchip/scf-common/lib/Processor.js":
6506
- /*!*************************************************************!*\
6507
- !*** ./node_modules/@microchip/scf-common/lib/Processor.js ***!
6508
- \*************************************************************/
6509
- /*! no static exports found */
6510
- /***/ (function(module, exports, __webpack_require__) {
6511
-
6512
- "use strict";
6513
-
6514
- var __assign = (this && this.__assign) || function () {
6515
- __assign = Object.assign || function(t) {
6516
- for (var s, i = 1, n = arguments.length; i < n; i++) {
6517
- s = arguments[i];
6518
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6519
- t[p] = s[p];
6520
- }
6521
- return t;
6522
- };
6523
- return __assign.apply(this, arguments);
6524
- };
6525
- Object.defineProperty(exports, "__esModule", { value: true });
6526
- exports.mapOptionLabels = exports.filterOptions = exports.isSingleton = exports.isUnassigned = exports.isAssigned = exports.hasOptions = exports.AlertTypes = void 0;
6527
- var AlertTypes;
6528
- (function (AlertTypes) {
6529
- AlertTypes["Error"] = "error";
6530
- AlertTypes["Warning"] = "warning";
6531
- AlertTypes["Hint"] = "hint";
6532
- })(AlertTypes = exports.AlertTypes || (exports.AlertTypes = {}));
6533
- /**
6534
- * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
6535
- * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
6536
- */
6537
- function hasOptions(dep) {
6538
- return dep.options !== undefined;
6539
- }
6540
- exports.hasOptions = hasOptions;
6541
- /**
6542
- * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
6543
- * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
6544
- */
6545
- function isAssigned(dep) {
6546
- return typeof dep.handle !== "undefined";
6547
- }
6548
- exports.isAssigned = isAssigned;
6549
- /**
6550
- * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
6551
- * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
6552
- */
6553
- function isUnassigned(dep) {
6554
- return typeof dep.handle === "undefined";
6555
- }
6556
- exports.isUnassigned = isUnassigned;
6557
- /**
6558
- * Type guard function for SingletonExport
6559
- * See User-Defined Type Guards in the Typescript Handbook on Advanced Types
6560
- * @see https://www.typescriptlang.org/docs/handbook/advanced-types.html
6561
- * @param resource the export to check on being a singleton
6562
- * @deprecated No longer used. Replaced with dynamic singleton identification
6563
- * at runtime.
6564
- */
6565
- function isSingleton(resource) {
6566
- return typeof resource.isSingleton !== "undefined" && resource.isSingleton;
6567
- }
6568
- exports.isSingleton = isSingleton;
6569
- /**
6570
- * Returns a copy of `populatedImport` with all options removed which
6571
- * cause `optionFilter` to return false.
6572
- */
6573
- function filterOptions(populatedImport, optionFilter) {
6574
- if (populatedImport.options) {
6575
- return __assign(__assign({}, populatedImport), { options: populatedImport.options.filter(optionFilter) });
6576
- }
6577
- return populatedImport;
6578
- }
6579
- exports.filterOptions = filterOptions;
6580
- /**
6581
- * Returns a copy of `populatedImport` with the options' handle labels
6582
- * mapped according to `labelFactory`.
6583
- */
6584
- function mapOptionLabels(populatedImport, labelFactory) {
6585
- if (populatedImport.options) {
6586
- return __assign(__assign({}, populatedImport), { options: populatedImport.options.map(function (option) {
6587
- return __assign(__assign({}, option), { handle: __assign(__assign({}, option.handle), { label: labelFactory(option) }) });
6588
- }) });
6589
- }
6590
- return populatedImport;
6591
- }
6592
- exports.mapOptionLabels = mapOptionLabels;
6593
- //# sourceMappingURL=Processor.js.map
6594
-
6595
- /***/ }),
6596
-
6597
- /***/ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js":
6598
- /*!**************************************************************************!*\
6599
- !*** ./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js ***!
6600
- \**************************************************************************/
6601
- /*! no static exports found */
6602
- /***/ (function(module, exports, __webpack_require__) {
6603
-
6604
- "use strict";
6605
-
6606
- var __extends = (this && this.__extends) || (function () {
6607
- var extendStatics = function (d, b) {
6608
- extendStatics = Object.setPrototypeOf ||
6609
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6610
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6611
- return extendStatics(d, b);
6612
- };
6613
- return function (d, b) {
6614
- if (typeof b !== "function" && b !== null)
6615
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
6616
- extendStatics(d, b);
6617
- function __() { this.constructor = d; }
6618
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
6619
- };
6620
- })();
6621
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6622
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6623
- if (ar || !(i in from)) {
6624
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6625
- ar[i] = from[i];
6626
- }
6627
- }
6628
- return to.concat(ar || Array.prototype.slice.call(from));
6629
- };
6630
- Object.defineProperty(exports, "__esModule", { value: true });
6631
- var Setting_1 = __webpack_require__(/*! ./Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
6632
- var Register_1 = __webpack_require__(/*! ./Register */ "./node_modules/@microchip/scf-device/lib/Register.js");
6633
- var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6634
- /** Builder pattern */
6635
- var CalculateRegisterValue = /** @class */ (function () {
6636
- function CalculateRegisterValue(register) {
6637
- var _this = this;
6638
- this.modifiedSettings = [];
6639
- /** Assign a numerical value to the given `Setting`. */
6640
- this.withNumberValue = function (setting, value) {
6641
- if (setting === undefined) {
6642
- throw new Error("Cannot assign number value to setting, setting is undefined.");
6643
- }
6644
- if (!_this.getSetting(setting)) {
6645
- throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
6646
- }
6647
- _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
6648
- new NumberSettingValue(setting, value),
6649
- ], false);
6650
- return _this;
6651
- };
6652
- /** Assign the given `Option` to the given `Setting`. */
6653
- this.withOption = function (setting, option) {
6654
- if (setting === undefined) {
6655
- throw new Error("Cannot assign option to setting, setting is undefined.");
6656
- }
6657
- if (!_this.getSetting(setting)) {
6658
- throw new Error("Setting ".concat(setting.alias, " is not present in Register ").concat(_this.register.name));
6659
- }
6660
- if (!option || !_this.getOption(setting, option)) {
6661
- throw new Error("Option ".concat(option === null || option === void 0 ? void 0 : option.name, " is not present in Setting ").concat(setting.name));
6662
- }
6663
- _this.modifiedSettings = __spreadArray(__spreadArray([], _this.modifiedSettings, true), [
6664
- new OptionSettingValue(setting, option),
6665
- ], false);
6666
- return _this;
6667
- };
6668
- /** Assign the `Option` matching the given alias to the given `Setting`. */
6669
- this.withOptionAlias = function (setting, optionAlias) {
6670
- if (setting === undefined) {
6671
- throw new Error("Cannot assign option alias to setting, setting is undefined.");
6672
- }
6673
- var option = (0, Setting_1.getOptionByAlias)(optionAlias, setting);
6674
- if (option === undefined) {
6675
- throw new Error("Option Alias: \"".concat(optionAlias, "\" not present in Setting: \"").concat(setting.name, "\"."));
6676
- }
6677
- return _this.withOption(setting, option);
6678
- };
6679
- /** Assign the `Option` matching the given name to the given `Setting`. */
6680
- this.withOptionName = function (setting, optionName) {
6681
- if (setting === undefined) {
6682
- throw new Error("Cannot assign option name to setting, setting is undefined.");
6683
- }
6684
- var option = (0, Setting_1.getOptionByName)(optionName, setting);
6685
- if (option === undefined) {
6686
- throw new Error("Option Name: \"".concat(optionName, "\" not present in Setting: \"").concat(setting.name, "\"."));
6687
- }
6688
- return _this.withOption(setting, option);
6689
- };
6690
- /** Assign the `Option` matching the given description to the given `Setting`. */
6691
- this.withOptionDescription = function (setting, optionDescription) {
6692
- if (setting === undefined) {
6693
- throw new Error("Cannot assign option description to setting, setting is undefined.");
6694
- }
6695
- var option = (0, Setting_1.getOptionByDescription)(optionDescription, setting);
6696
- if (option === undefined) {
6697
- throw new Error("Option Description: \"".concat(optionDescription, "\" not present in Setting: \"").concat(setting.name, "\"."));
6698
- }
6699
- return _this.withOption(setting, option);
6700
- };
6701
- this.getSetting = function (setting) {
6702
- return (0, Register_1.getSettingByAlias)(setting.alias, _this.register);
6703
- };
6704
- this.getOption = function (setting, option) {
6705
- return (option === null || option === void 0 ? void 0 : option.name) ? (0, Setting_1.getOptionByName)(option.name, setting) : undefined;
6706
- };
6707
- this.calculate = function () {
6708
- var registerValue = 0;
6709
- _this.modifiedSettings.forEach(function (modifiedSetting) {
6710
- registerValue = _this.setValue(modifiedSetting, registerValue);
6711
- });
6712
- var unmodifiedSettings = _this.getUnmodifiedSettings();
6713
- unmodifiedSettings.forEach(function (unmodifiedSetting) {
6714
- registerValue = _this.setValue(SettingValue.defaultValue(unmodifiedSetting), registerValue);
6715
- });
6716
- return Number(registerValue);
6717
- };
6718
- this.setValue = function (setting, registerValue) {
6719
- var value = registerValue;
6720
- value &= ~setting.getMask(); // Clear bits
6721
- value |= setting.getShiftedValue(); // Set bits
6722
- return value;
6723
- };
6724
- this.getUnmodifiedSettings = function () {
6725
- var _a, _b;
6726
- var modifiedSettingNames = (0, Arrays_1.map)(_this.modifiedSettings, function (setting) {
6727
- return setting.getName();
6728
- });
6729
- return (0, Arrays_1.filter)((_b = (0, Arrays_1.values)((_a = _this.register.settings) !== null && _a !== void 0 ? _a : {})) !== null && _b !== void 0 ? _b : [], function (setting) { return modifiedSettingNames.indexOf(setting.name) < 0; });
6730
- };
6731
- /** Calculate and print the register's value as a hex string. */
6732
- this.asHexString = function () { return CalculateRegisterValue.toHexString(_this.calculate()); };
6733
- /** Calculate and print the register's value as a binary string. */
6734
- this.asBinaryString = function () {
6735
- return CalculateRegisterValue.toBinaryString(_this.calculate());
6736
- };
6737
- /** Calculate and print the register's value as a decimal string. */
6738
- this.asDecimalString = function () {
6739
- return CalculateRegisterValue.toDecimalString(_this.calculate());
6740
- };
6741
- /** Calculate and return the register's value as a number. */
6742
- this.asNumber = function () { return _this.calculate(); };
6743
- this.register = register;
6744
- }
6745
- /** Creates a register value calculation object for the given register. */
6746
- CalculateRegisterValue.for = function (register) {
6747
- return new CalculateRegisterValue(register);
6748
- };
6749
- /** Format the given number as a hex string value. */
6750
- CalculateRegisterValue.toHexString = function (value) {
6751
- if (value == null) {
6752
- throw new Error("CalculateRegisterValue.toHexString() illegal argument exception. Value must not be null.");
6753
- }
6754
- return "0x" + value.toString(16);
6755
- };
6756
- /** Format the given number as a binary string value. */
6757
- CalculateRegisterValue.toBinaryString = function (value) {
6758
- if (value == null) {
6759
- throw new Error("CalculateRegisterValue.toBinaryString() illegal argument exception. Value must not be null.");
6760
- }
6761
- return "0b" + value.toString(2);
6762
- };
6763
- /** Format the given number as a decimal string value. */
6764
- CalculateRegisterValue.toDecimalString = function (value) {
6765
- if (value == null) {
6766
- throw new Error("CalculateRegisterValue.toDecimalString() illegal argument exception. Value must not be null.");
6767
- }
6768
- return value.toString();
6769
- };
6770
- return CalculateRegisterValue;
6771
- }());
6772
- exports.default = CalculateRegisterValue;
6773
- var SettingValue = /** @class */ (function () {
6774
- function SettingValue(setting) {
6775
- var _this = this;
6776
- this.getMask = function () { return Number(_this.setting.mask); };
6777
- this.getShift = function () {
6778
- var mask = _this.getMask();
6779
- var shiftIndex = 0;
6780
- while (!(mask & 0x1)) {
6781
- mask = mask >> 1;
6782
- shiftIndex++;
6783
- }
6784
- return shiftIndex;
6216
+ this.getMask = function () { return Number(_this.setting.mask); };
6217
+ this.getShift = function () {
6218
+ var mask = _this.getMask();
6219
+ var shiftIndex = 0;
6220
+ while (!(mask & 0x1)) {
6221
+ mask = mask >> 1;
6222
+ shiftIndex++;
6223
+ }
6224
+ return shiftIndex;
6785
6225
  };
6786
6226
  this.getShiftedValue = function () { return _this.getValue() << _this.getShift(); };
6787
6227
  this.getName = function () { return _this.setting.name; };
@@ -6822,13 +6262,257 @@ var OptionSettingValue = /** @class */ (function (_super) {
6822
6262
  };
6823
6263
  return OptionSettingValue;
6824
6264
  }(SettingValue));
6825
- //# sourceMappingURL=CalculateRegisterValue.js.map
6265
+
6266
+
6267
+ /***/ }),
6268
+
6269
+ /***/ "./node_modules/@microchip/scf-device/lib/Register.js":
6270
+ /*!************************************************************!*\
6271
+ !*** ./node_modules/@microchip/scf-device/lib/Register.js ***!
6272
+ \************************************************************/
6273
+ /*! no static exports found */
6274
+ /***/ (function(module, exports, __webpack_require__) {
6275
+
6276
+ "use strict";
6277
+
6278
+ Object.defineProperty(exports, "__esModule", { value: true });
6279
+ exports.getSettingByAlias = void 0;
6280
+ var getSettingByAlias = function (alias, register) {
6281
+ var _a;
6282
+ return (_a = register.settings) === null || _a === void 0 ? void 0 : _a[alias];
6283
+ };
6284
+ exports.getSettingByAlias = getSettingByAlias;
6285
+
6286
+
6287
+ /***/ }),
6288
+
6289
+ /***/ "./node_modules/@microchip/scf-device/lib/Setting.js":
6290
+ /*!***********************************************************!*\
6291
+ !*** ./node_modules/@microchip/scf-device/lib/Setting.js ***!
6292
+ \***********************************************************/
6293
+ /*! no static exports found */
6294
+ /***/ (function(module, exports, __webpack_require__) {
6295
+
6296
+ "use strict";
6297
+
6298
+ Object.defineProperty(exports, "__esModule", { value: true });
6299
+ exports.getOptionDescriptions = exports.getOptionNames = exports.getOptionByDescription = exports.getOptionByName = exports.getOptionByAlias = exports.getBitRange = exports.getBitLabel = void 0;
6300
+ var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6301
+ /**
6302
+ * Converts a hexadecimal string to binary.
6303
+ * Any leading zeros are removed from the returned string.
6304
+ */
6305
+ var hexToBinary = function (hex) {
6306
+ return parseInt(hex, 16).toString(2);
6307
+ };
6308
+ /**
6309
+ * Returns a string of the corresponding bit position(s).
6310
+ */
6311
+ var getBitLabel = function (setting) {
6312
+ if (setting.mask === undefined) {
6313
+ return undefined;
6314
+ }
6315
+ var bitRange = (0, exports.getBitRange)(setting);
6316
+ if (!bitRange)
6317
+ return undefined;
6318
+ if (bitRange.high === bitRange.low) {
6319
+ return "bit ".concat(bitRange.high);
6320
+ }
6321
+ return "bit ".concat(bitRange.high, "-").concat(bitRange.low);
6322
+ };
6323
+ exports.getBitLabel = getBitLabel;
6324
+ /**
6325
+ * Converts the hexadecimal mask provided within the register setting
6326
+ * and returns an interface containing the corresponding low and high bit positions.
6327
+ */
6328
+ var getBitRange = function (setting) {
6329
+ if (!setting.mask)
6330
+ return undefined;
6331
+ var processedHex = hexToBinary(setting.mask);
6332
+ return {
6333
+ high: processedHex.length - 1,
6334
+ low: getBitRangeLow(processedHex),
6335
+ };
6336
+ };
6337
+ exports.getBitRange = getBitRange;
6338
+ var getOptionByAlias = function (alias, setting) {
6339
+ var _a, _b;
6340
+ var result = (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.alias == alias; });
6341
+ if (!result) {
6342
+ result = (0, Arrays_1.find)((_b = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _b !== void 0 ? _b : [], function (option) { return option.description == alias; });
6343
+ }
6344
+ return result;
6345
+ };
6346
+ exports.getOptionByAlias = getOptionByAlias;
6347
+ var getOptionByName = function (name, setting) {
6348
+ var _a;
6349
+ return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name == name; });
6350
+ };
6351
+ exports.getOptionByName = getOptionByName;
6352
+ var getOptionByDescription = function (description, setting) {
6353
+ var _a;
6354
+ return (0, Arrays_1.find)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description == description; });
6355
+ };
6356
+ exports.getOptionByDescription = getOptionByDescription;
6357
+ var getOptionNames = function (setting) {
6358
+ var _a;
6359
+ return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name; });
6360
+ };
6361
+ exports.getOptionNames = getOptionNames;
6362
+ var getOptionDescriptions = function (setting) {
6363
+ var _a;
6364
+ return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description; });
6365
+ };
6366
+ exports.getOptionDescriptions = getOptionDescriptions;
6367
+ function getBitRangeLow(processedHex) {
6368
+ if (processedHex.charAt(1) === "1") {
6369
+ var index = 1;
6370
+ while (processedHex.charAt(index) === "1") {
6371
+ index++;
6372
+ }
6373
+ return processedHex.length - index;
6374
+ }
6375
+ else {
6376
+ return processedHex.length - 1;
6377
+ }
6378
+ }
6379
+
6380
+
6381
+ /***/ }),
6382
+
6383
+ /***/ "./node_modules/@microchip/scf-device/lib/util/Arrays.js":
6384
+ /*!***************************************************************!*\
6385
+ !*** ./node_modules/@microchip/scf-device/lib/util/Arrays.js ***!
6386
+ \***************************************************************/
6387
+ /*! no static exports found */
6388
+ /***/ (function(module, exports, __webpack_require__) {
6389
+
6390
+ "use strict";
6391
+
6392
+ Object.defineProperty(exports, "__esModule", { value: true });
6393
+ exports.values = exports.getKeys = exports.find = exports.filter = exports.map = void 0;
6394
+ var map = function (arr, callback) {
6395
+ var result = [];
6396
+ arr.forEach(function (value, index) {
6397
+ result[index] = callback(value);
6398
+ });
6399
+ return result;
6400
+ };
6401
+ exports.map = map;
6402
+ var filter = function (arr, callback) {
6403
+ var result = [];
6404
+ arr.forEach(function (value) {
6405
+ if (callback(value)) {
6406
+ result.push(value);
6407
+ }
6408
+ });
6409
+ return result;
6410
+ };
6411
+ exports.filter = filter;
6412
+ /**
6413
+ * Iterates over elements of the array, returning the first element that the predicate returns truthy for.
6414
+ */
6415
+ var find = function (arr, callback) {
6416
+ for (var i = 0; i < arr.length; i++) {
6417
+ if (callback(arr[i])) {
6418
+ return arr[i];
6419
+ }
6420
+ }
6421
+ return undefined;
6422
+ };
6423
+ exports.find = find;
6424
+ /** @returns the non-prototype keys of the given object */
6425
+ var getKeys = function (obj) {
6426
+ if (!obj)
6427
+ return undefined;
6428
+ return Object.getOwnPropertyNames(obj);
6429
+ };
6430
+ exports.getKeys = getKeys;
6431
+ var values = function (obj) {
6432
+ var _a;
6433
+ if (!obj)
6434
+ return undefined;
6435
+ return (_a = (0, exports.getKeys)(obj)) === null || _a === void 0 ? void 0 : _a.map(function (key) { return obj[key]; });
6436
+ };
6437
+ exports.values = values;
6438
+
6439
+
6440
+ /***/ }),
6441
+
6442
+ /***/ "./node_modules/@microchip/scf-interface/lib/c-function-types.js":
6443
+ /*!***********************************************************************!*\
6444
+ !*** ./node_modules/@microchip/scf-interface/lib/c-function-types.js ***!
6445
+ \***********************************************************************/
6446
+ /*! no static exports found */
6447
+ /***/ (function(module, exports, __webpack_require__) {
6448
+
6449
+ "use strict";
6450
+
6451
+ Object.defineProperty(exports, "__esModule", { value: true });
6452
+ exports.buildSimpleApi = function (functions) {
6453
+ var api = {};
6454
+ for (var key in functions) {
6455
+ api[key] = buildFunction(functions[key]);
6456
+ }
6457
+ return api;
6458
+ };
6459
+ var buildFunction = function (cFunction) {
6460
+ return cFunction.returns + " " + cFunction.name + "(" + buildArguments(cFunction.arguments) + ")";
6461
+ };
6462
+ var buildArguments = function (args) {
6463
+ if (args) {
6464
+ return args.map(function (arg) { return arg.type + " " + arg.name; }).join(", ");
6465
+ }
6466
+ else {
6467
+ return "void";
6468
+ }
6469
+ };
6470
+
6471
+
6472
+ /***/ }),
6473
+
6474
+ /***/ "./node_modules/@microchip/scf-interface/lib/helpers.js":
6475
+ /*!**************************************************************!*\
6476
+ !*** ./node_modules/@microchip/scf-interface/lib/helpers.js ***!
6477
+ \**************************************************************/
6478
+ /*! no static exports found */
6479
+ /***/ (function(module, exports, __webpack_require__) {
6480
+
6481
+ "use strict";
6482
+
6483
+ Object.defineProperty(exports, "__esModule", { value: true });
6484
+ exports.getInterfaceName = function (pkgJson) {
6485
+ var strReplace = "@microchip/";
6486
+ var interfaceName;
6487
+ if (pkgJson) {
6488
+ interfaceName = pkgJson["name"];
6489
+ if (interfaceName) {
6490
+ interfaceName = interfaceName.replace(strReplace, "");
6491
+ }
6492
+ }
6493
+ if (!interfaceName) {
6494
+ throw new Error("Invalid Interface Name...!");
6495
+ }
6496
+ return interfaceName;
6497
+ };
6498
+ exports.getInterfaceVersion = function (pkgJson) {
6499
+ var versionRegex = new RegExp("\\d+.\\d+.\\d+");
6500
+ var version;
6501
+ if (pkgJson) {
6502
+ version = pkgJson["version"];
6503
+ }
6504
+ if (!version && !versionRegex.test(version)) {
6505
+ throw new Error("Invalid Interface Version...!");
6506
+ }
6507
+ return version;
6508
+ };
6509
+
6826
6510
 
6827
6511
  /***/ }),
6828
6512
 
6829
- /***/ "./node_modules/@microchip/scf-device/lib/Register.js":
6513
+ /***/ "./node_modules/@microchip/scf-interface/lib/index.js":
6830
6514
  /*!************************************************************!*\
6831
- !*** ./node_modules/@microchip/scf-device/lib/Register.js ***!
6515
+ !*** ./node_modules/@microchip/scf-interface/lib/index.js ***!
6832
6516
  \************************************************************/
6833
6517
  /*! no static exports found */
6834
6518
  /***/ (function(module, exports, __webpack_require__) {
@@ -6836,252 +6520,571 @@ var OptionSettingValue = /** @class */ (function (_super) {
6836
6520
  "use strict";
6837
6521
 
6838
6522
  Object.defineProperty(exports, "__esModule", { value: true });
6839
- exports.getSettingByAlias = void 0;
6840
- var getSettingByAlias = function (alias, register) {
6841
- var _a;
6842
- return (_a = register.settings) === null || _a === void 0 ? void 0 : _a[alias];
6843
- };
6844
- exports.getSettingByAlias = getSettingByAlias;
6845
- //# sourceMappingURL=Register.js.map
6523
+ var c_function_types_1 = __webpack_require__(/*! ./c-function-types */ "./node_modules/@microchip/scf-interface/lib/c-function-types.js");
6524
+ exports.buildSimpleApi = c_function_types_1.buildSimpleApi;
6525
+ var helpers_1 = __webpack_require__(/*! ./helpers */ "./node_modules/@microchip/scf-interface/lib/helpers.js");
6526
+ exports.getInterfaceName = helpers_1.getInterfaceName;
6527
+ exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
6528
+
6846
6529
 
6847
6530
  /***/ }),
6848
6531
 
6849
- /***/ "./node_modules/@microchip/scf-device/lib/Setting.js":
6850
- /*!***********************************************************!*\
6851
- !*** ./node_modules/@microchip/scf-device/lib/Setting.js ***!
6852
- \***********************************************************/
6532
+ /***/ "./node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js":
6533
+ /*!************************************************************************************!*\
6534
+ !*** ./node_modules/@microchip/scf-register-view-helper/lib/CreateRegisterView.js ***!
6535
+ \************************************************************************************/
6853
6536
  /*! no static exports found */
6854
6537
  /***/ (function(module, exports, __webpack_require__) {
6855
6538
 
6856
6539
  "use strict";
6857
6540
 
6541
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6542
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6543
+ };
6858
6544
  Object.defineProperty(exports, "__esModule", { value: true });
6859
- exports.getOptionDescriptions = exports.getOptionNames = exports.getOptionByDescription = exports.getOptionByName = exports.getOptionByAlias = exports.getBitRange = exports.getBitLabel = void 0;
6860
- var Arrays_1 = __webpack_require__(/*! ./util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6861
- /**
6862
- * Converts a hexadecimal string to binary.
6863
- * Any leading zeros are removed from the returned string.
6864
- */
6865
- var hexToBinary = function (hex) {
6866
- return parseInt(hex, 16).toString(2);
6545
+ exports.CreateRegisterView = void 0;
6546
+ var Setting_1 = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
6547
+ var CalculateRegisterValue_1 = __importDefault(__webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js"));
6548
+ var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6549
+ var ViewSchemaBuilder_1 = __webpack_require__(/*! ./ViewSchemaBuilder */ "./node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js");
6550
+ var Model_1 = __webpack_require__(/*! ./Model */ "./node_modules/@microchip/scf-register-view-helper/lib/Model.js");
6551
+ var throwError = function (message) {
6552
+ throw new Error(message);
6867
6553
  };
6868
- /**
6869
- * Returns a string of the corresponding bit position(s).
6870
- */
6871
- var getBitLabel = function (setting) {
6872
- if (setting.mask === undefined) {
6873
- return undefined;
6874
- }
6875
- var bitRange = (0, exports.getBitRange)(setting);
6876
- if (!bitRange)
6877
- return undefined;
6878
- if (bitRange.high === bitRange.low) {
6879
- return "bit ".concat(bitRange.high);
6554
+ var CreateRegisterView = /** @class */ (function () {
6555
+ function CreateRegisterView(module) {
6556
+ var _this = this;
6557
+ this.registers = [];
6558
+ this.interrupts = [];
6559
+ /** Create a register view */
6560
+ this.create = function () {
6561
+ var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()
6562
+ .withSchema({
6563
+ title: "Register Settings",
6564
+ type: "object",
6565
+ })
6566
+ .withTabName("Register Initialization")
6567
+ .withExpandedDefault(false);
6568
+ _this.registers.forEach(function (reg) {
6569
+ schemaBuilder.addChildComponent(reg.getRegister().name, _this.createRegisterView(reg));
6570
+ });
6571
+ schemaBuilder.addChildComponent("interrupts", _this.createInterruptView());
6572
+ return schemaBuilder.build();
6573
+ };
6574
+ /** Assign a numerical value to the given register. */
6575
+ this.withRegisterValue = function (register, value) {
6576
+ _this.getSafeRegisterViewModel(register).setValue(value);
6577
+ return _this;
6578
+ };
6579
+ /** Assign a string value to the given interrupt. */
6580
+ this.withInterruptValue = function (interrupt, value) {
6581
+ _this.getSafeInterruptViewModel(interrupt).setValue(value);
6582
+ return _this;
6583
+ };
6584
+ /** Assign the interrupt combobox options. */
6585
+ this.withInterruptOptions = function (interrupt, options) {
6586
+ _this.getSafeInterruptViewModel(interrupt).setOptions(options);
6587
+ return _this;
6588
+ };
6589
+ /** Make all settings in all registers editable */
6590
+ this.withAllEditable = function () {
6591
+ _this.registers.forEach(function (register) {
6592
+ return _this.withEditableRegister(register.getRegister());
6593
+ });
6594
+ _this.interrupts.forEach(function (interrupt) {
6595
+ _this.withEditableInterrupt(interrupt.getInterrupt());
6596
+ });
6597
+ return _this;
6598
+ };
6599
+ /** Make settings in the given register editable based on setting type*/
6600
+ this.withEditableRegister = function (register) {
6601
+ var _a, _b;
6602
+ _this.getSafeRegisterViewModel(register).setReadonly(false);
6603
+ if (register) {
6604
+ (_b = (0, Arrays_1.values)((_a = register === null || register === void 0 ? void 0 : register.settings) !== null && _a !== void 0 ? _a : {})) === null || _b === void 0 ? void 0 : _b.forEach(function (setting) {
6605
+ if ((setting === null || setting === void 0 ? void 0 : setting.type) === "R") {
6606
+ _this.getSafeSettingViewModel(register, setting).setReadonly(true);
6607
+ }
6608
+ });
6609
+ }
6610
+ return _this;
6611
+ };
6612
+ /** Make a given setting in register editable */
6613
+ this.withEditableSetting = function (register, setting) {
6614
+ _this.getSafeSettingViewModel(register, setting).setReadonly(false);
6615
+ return _this;
6616
+ };
6617
+ /** Make a given interrupt editable */
6618
+ this.withEditableInterrupt = function (interrupt) {
6619
+ _this.getSafeInterruptViewModel(interrupt).setReadonly(false);
6620
+ return _this;
6621
+ };
6622
+ this.getSafeRegisterViewModel = function (register) {
6623
+ var _a;
6624
+ return (_a = _this.getRegisterViewModel(register !== null && register !== void 0 ? register : throwError("Invalid register parameter."))) !== null && _a !== void 0 ? _a : throwError("Cannot get register view model for '".concat(register.name, "'. Not found in this module."));
6625
+ };
6626
+ this.getSafeInterruptViewModel = function (interrupt) {
6627
+ var _a;
6628
+ return (_a = _this.getInterruptViewModel(interrupt !== null && interrupt !== void 0 ? interrupt : throwError("Invalid interrupt parameter."))) !== null && _a !== void 0 ? _a : throwError("Cannot get interrupt view model for '".concat(interrupt.name, "'. Not found in this module."));
6629
+ };
6630
+ this.getSafeSettingViewModel = function (register, setting) {
6631
+ var _a;
6632
+ return (_a = _this.getSafeRegisterViewModel(register).getSettingViewModel(setting !== null && setting !== void 0 ? setting : throwError("Invalid setting parameter."))) !== null && _a !== void 0 ? _a : throwError("Cannot get setting view model for '".concat(setting.name, "'. Not found in this module."));
6633
+ };
6634
+ this.getRegisterViewModel = function (register) {
6635
+ var name = register.name;
6636
+ return (0, Arrays_1.find)(_this.registers, function (rv) { return rv.getRegister().name === name; });
6637
+ };
6638
+ this.getInterruptViewModel = function (interrupt) {
6639
+ var name = interrupt.name;
6640
+ return (0, Arrays_1.find)(_this.interrupts, function (rv) { return rv.getInterrupt().name === name; });
6641
+ };
6642
+ this.createRegisterView = function (register) {
6643
+ var registerValue = register.getValue() || 0;
6644
+ var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()
6645
+ .withSchema({
6646
+ type: "object",
6647
+ title: register.getName() +
6648
+ " : " +
6649
+ CalculateRegisterValue_1.default.toHexString(registerValue),
6650
+ description: register.getDescription(),
6651
+ properties: {},
6652
+ })
6653
+ .withUiSchema({})
6654
+ .withFormData({});
6655
+ register.forEachSetting(function (setting) {
6656
+ schemaBuilder.addChildComponent(setting.getName(), _this.createSettingView(setting));
6657
+ });
6658
+ return schemaBuilder.build();
6659
+ };
6660
+ this.createSettingView = function (setting) {
6661
+ return setting.hasOptions()
6662
+ ? _this.createHasOptionsViewSchema(setting)
6663
+ : _this.getNoOptionsViewSchema(setting);
6664
+ };
6665
+ this.createInterruptView = function () {
6666
+ var schemaBuilder = new ViewSchemaBuilder_1.ViewSchemaBuilder()
6667
+ .withSchema({
6668
+ type: "object",
6669
+ title: "Interrupts",
6670
+ properties: {},
6671
+ })
6672
+ .withUiSchema({})
6673
+ .withFormData({});
6674
+ _this.interrupts.forEach(function (int) {
6675
+ schemaBuilder.addChildComponent(int.getInterrupt().name, _this.createInterruptViewSchema(int));
6676
+ });
6677
+ return schemaBuilder.build();
6678
+ };
6679
+ this.module = module;
6680
+ this.registers = this.createRegisterViewModelForEachRegister(module);
6681
+ this.interrupts = this.createInterruptViewModelForEachInterrupt(module);
6880
6682
  }
6881
- return "bit ".concat(bitRange.high, "-").concat(bitRange.low);
6882
- };
6883
- exports.getBitLabel = getBitLabel;
6884
- /**
6885
- * Converts the hexadecimal mask provided within the register setting
6886
- * and returns an interface containing the corresponding low and high bit positions.
6887
- */
6888
- var getBitRange = function (setting) {
6889
- if (!setting.mask)
6890
- return undefined;
6891
- var processedHex = hexToBinary(setting.mask);
6892
- return {
6893
- high: processedHex.length - 1,
6894
- low: getBitRangeLow(processedHex),
6683
+ CreateRegisterView.prototype.createRegisterViewModelForEachRegister = function (module) {
6684
+ var _a;
6685
+ var models = [];
6686
+ var registers = (_a = module.registers) !== null && _a !== void 0 ? _a : {};
6687
+ Object.keys(registers).forEach(function (registerKey) {
6688
+ models.push(new Model_1.RegisterViewModel(registers[registerKey]));
6689
+ });
6690
+ return models;
6691
+ };
6692
+ CreateRegisterView.prototype.createInterruptViewModelForEachInterrupt = function (module) {
6693
+ var _a;
6694
+ var models = [];
6695
+ var interrupts = (_a = module.interrupts) !== null && _a !== void 0 ? _a : {};
6696
+ Object.keys(interrupts).forEach(function (interruptKey) {
6697
+ models.push(new Model_1.InterruptViewModel(interrupts[interruptKey]));
6698
+ });
6699
+ return models;
6700
+ };
6701
+ CreateRegisterView.prototype.getNoOptionsViewSchema = function (setting) {
6702
+ var _a;
6703
+ var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()
6704
+ .withReadonlyValue(setting.getIsReadonly())
6705
+ .withUiHelp("".concat(setting.getName(), ": ") + ((_a = setting.getDescription()) !== null && _a !== void 0 ? _a : ""));
6706
+ return {
6707
+ schema: this.createSettingViewSchema(setting),
6708
+ uiSchema: setting.getMaxValue() > 1
6709
+ ? uiSchemaBuilder.build()
6710
+ : this.getBinarySettingUiSchema(setting),
6711
+ formData: setting.mapToOptionNameIfExists(setting.getValue()),
6712
+ };
6713
+ };
6714
+ CreateRegisterView.prototype.createHasOptionsViewSchema = function (setting) {
6715
+ var _a, _b;
6716
+ var schemaBuilder = new ViewSchemaBuilder_1.SchemaBuilder("string", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : "")
6717
+ .withEnum(setting.getOptionNames())
6718
+ .withDefault(setting.mapToOptionNameIfExists(setting.getValue()));
6719
+ var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder()
6720
+ .withReadonlyValue(setting.getIsReadonly())
6721
+ .withUiHelp("".concat(setting.getName(), ": ") + ((_b = setting.getDescription()) !== null && _b !== void 0 ? _b : ""));
6722
+ return {
6723
+ schema: schemaBuilder.build(),
6724
+ uiSchema: uiSchemaBuilder.build(),
6725
+ formData: setting.mapToOptionNameIfExists(setting.getValue()),
6726
+ };
6727
+ };
6728
+ CreateRegisterView.prototype.createSettingViewSchema = function (setting) {
6729
+ var _a;
6730
+ var schema = new ViewSchemaBuilder_1.SchemaBuilder("integer", (_a = (0, Setting_1.getBitLabel)(setting.getSetting())) !== null && _a !== void 0 ? _a : "").withDefault(setting.mapToOptionNameIfExists(setting.getPORDefault()));
6731
+ setting.getMaxValue() > 1
6732
+ ? schema.withMaximum(setting.getMaxValue()).withMinimum(0)
6733
+ : schema.withEnum([0, 1]);
6734
+ return schema.build();
6735
+ };
6736
+ CreateRegisterView.prototype.createInterruptViewSchema = function (interrupt) {
6737
+ var _a;
6738
+ var schema = new ViewSchemaBuilder_1.SchemaBuilder("string", interrupt.getInterrupt().name)
6739
+ .withEnum(interrupt.getOptions())
6740
+ .withDefault(interrupt.getValue());
6741
+ var uiSchemaBuilder = new ViewSchemaBuilder_1.UiSchemaBuilder().withReadonlyValue(interrupt.getIsReadonly());
6742
+ return {
6743
+ schema: schema.build(),
6744
+ uiSchema: uiSchemaBuilder.build(),
6745
+ formData: (_a = interrupt.getValue()) !== null && _a !== void 0 ? _a : {},
6746
+ };
6895
6747
  };
6896
- };
6897
- exports.getBitRange = getBitRange;
6898
- var getOptionByAlias = function (alias, setting) {
6899
- var _a;
6900
- return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.alias == alias; });
6901
- };
6902
- exports.getOptionByAlias = getOptionByAlias;
6903
- var getOptionByName = function (name, setting) {
6904
- var _a;
6905
- return (0, Arrays_1.find)((_a = setting === null || setting === void 0 ? void 0 : setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name == name; });
6906
- };
6907
- exports.getOptionByName = getOptionByName;
6908
- var getOptionByDescription = function (description, setting) {
6909
- var _a;
6910
- return (0, Arrays_1.find)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description == description; });
6911
- };
6912
- exports.getOptionByDescription = getOptionByDescription;
6913
- var getOptionNames = function (setting) {
6914
- var _a;
6915
- return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.name; });
6916
- };
6917
- exports.getOptionNames = getOptionNames;
6918
- var getOptionDescriptions = function (setting) {
6919
- var _a;
6920
- return (0, Arrays_1.map)((_a = setting.options) !== null && _a !== void 0 ? _a : [], function (option) { return option.description; });
6921
- };
6922
- exports.getOptionDescriptions = getOptionDescriptions;
6923
- function getBitRangeLow(processedHex) {
6924
- if (processedHex.charAt(1) === "1") {
6925
- var index = 1;
6926
- while (processedHex.charAt(index) === "1") {
6927
- index++;
6928
- }
6929
- return processedHex.length - index;
6930
- }
6931
- else {
6932
- return processedHex.length - 1;
6933
- }
6934
- }
6935
- //# sourceMappingURL=Setting.js.map
6936
-
6937
- /***/ }),
6938
-
6939
- /***/ "./node_modules/@microchip/scf-device/lib/util/Arrays.js":
6940
- /*!***************************************************************!*\
6941
- !*** ./node_modules/@microchip/scf-device/lib/util/Arrays.js ***!
6942
- \***************************************************************/
6943
- /*! no static exports found */
6944
- /***/ (function(module, exports, __webpack_require__) {
6945
-
6946
- "use strict";
6947
-
6948
- Object.defineProperty(exports, "__esModule", { value: true });
6949
- exports.values = exports.getKeys = exports.find = exports.filter = exports.map = void 0;
6950
- var map = function (arr, callback) {
6951
- var result = [];
6952
- arr.forEach(function (value, index) {
6953
- result[index] = callback(value);
6954
- });
6955
- return result;
6956
- };
6957
- exports.map = map;
6958
- var filter = function (arr, callback) {
6959
- var result = [];
6960
- arr.forEach(function (value) {
6961
- if (callback(value)) {
6962
- result.push(value);
6748
+ CreateRegisterView.prototype.getBinarySettingUiSchema = function (setting) {
6749
+ return new ViewSchemaBuilder_1.UiSchemaBuilder()
6750
+ .withReadonlyValue(setting.getIsReadonly())
6751
+ .withWidget("radio")
6752
+ .withOptions({ inline: true })
6753
+ .build();
6754
+ };
6755
+ /** Creates Register View Builder for the given module. */
6756
+ CreateRegisterView.for = function (moduleDescription) {
6757
+ if (!moduleDescription) {
6758
+ throwError("Creation failed. Invalid module parameter.");
6963
6759
  }
6964
- });
6965
- return result;
6966
- };
6967
- exports.filter = filter;
6968
- /**
6969
- * Iterates over elements of the array, returning the first element that the predicate returns truthy for.
6970
- */
6971
- var find = function (arr, callback) {
6972
- for (var i = 0; i < arr.length; i++) {
6973
- if (callback(arr[i])) {
6974
- return arr[i];
6760
+ if (!moduleDescription.registers && !moduleDescription.interrupts) {
6761
+ throwError("Creation failed for ".concat(moduleDescription.name, ". Input module contains no registers or interrupts."));
6975
6762
  }
6976
- }
6977
- return undefined;
6978
- };
6979
- exports.find = find;
6980
- /** @returns the non-prototype keys of the given object */
6981
- var getKeys = function (obj) {
6982
- if (!obj)
6983
- return undefined;
6984
- return Object.getOwnPropertyNames(obj);
6985
- };
6986
- exports.getKeys = getKeys;
6987
- var values = function (obj) {
6988
- var _a;
6989
- if (!obj)
6990
- return undefined;
6991
- return (_a = (0, exports.getKeys)(obj)) === null || _a === void 0 ? void 0 : _a.map(function (key) { return obj[key]; });
6992
- };
6993
- exports.values = values;
6994
- //# sourceMappingURL=Arrays.js.map
6763
+ return new CreateRegisterView(moduleDescription);
6764
+ };
6765
+ return CreateRegisterView;
6766
+ }());
6767
+ exports.CreateRegisterView = CreateRegisterView;
6768
+ //# sourceMappingURL=CreateRegisterView.js.map
6995
6769
 
6996
6770
  /***/ }),
6997
6771
 
6998
- /***/ "./node_modules/@microchip/scf-interface/lib/c-function-types.js":
6772
+ /***/ "./node_modules/@microchip/scf-register-view-helper/lib/Model.js":
6999
6773
  /*!***********************************************************************!*\
7000
- !*** ./node_modules/@microchip/scf-interface/lib/c-function-types.js ***!
6774
+ !*** ./node_modules/@microchip/scf-register-view-helper/lib/Model.js ***!
7001
6775
  \***********************************************************************/
7002
6776
  /*! no static exports found */
7003
6777
  /***/ (function(module, exports, __webpack_require__) {
7004
6778
 
7005
6779
  "use strict";
7006
6780
 
7007
- Object.defineProperty(exports, "__esModule", { value: true });
7008
- exports.buildSimpleApi = function (functions) {
7009
- var api = {};
7010
- for (var key in functions) {
7011
- api[key] = buildFunction(functions[key]);
6781
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
6782
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
6783
+ if (ar || !(i in from)) {
6784
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6785
+ ar[i] = from[i];
6786
+ }
7012
6787
  }
7013
- return api;
6788
+ return to.concat(ar || Array.prototype.slice.call(from));
7014
6789
  };
7015
- var buildFunction = function (cFunction) {
7016
- return cFunction.returns + " " + cFunction.name + "(" + buildArguments(cFunction.arguments) + ")";
6790
+ var __importDefault = (this && this.__importDefault) || function (mod) {
6791
+ return (mod && mod.__esModule) ? mod : { "default": mod };
7017
6792
  };
7018
- var buildArguments = function (args) {
7019
- if (args) {
7020
- return args.map(function (arg) { return arg.type + " " + arg.name; }).join(", ");
6793
+ Object.defineProperty(exports, "__esModule", { value: true });
6794
+ exports.SettingViewModel = exports.RegisterViewModel = exports.InterruptViewModel = void 0;
6795
+ var CalculateRegisterValue_1 = __importDefault(__webpack_require__(/*! @microchip/scf-device/lib/CalculateRegisterValue */ "./node_modules/@microchip/scf-device/lib/CalculateRegisterValue.js"));
6796
+ var Arrays_1 = __webpack_require__(/*! @microchip/scf-device/lib/util/Arrays */ "./node_modules/@microchip/scf-device/lib/util/Arrays.js");
6797
+ var Setting_1 = __webpack_require__(/*! @microchip/scf-device/lib/Setting */ "./node_modules/@microchip/scf-device/lib/Setting.js");
6798
+ var InterruptViewModel = /** @class */ (function () {
6799
+ function InterruptViewModel(interrupt) {
6800
+ var _this = this;
6801
+ this.isReadOnly = true;
6802
+ this.getInterrupt = function () { return _this.interrupt; };
6803
+ this.setValue = function (value) {
6804
+ _this.value = value;
6805
+ };
6806
+ this.getValue = function () { return _this.value; };
6807
+ this.setOptions = function (options) {
6808
+ _this.options = options;
6809
+ };
6810
+ this.getOptions = function () { var _a; return (_a = _this.options) !== null && _a !== void 0 ? _a : []; };
6811
+ this.getIsReadonly = function () { return _this.isReadOnly; };
6812
+ this.setReadonly = function (isReadOnly) {
6813
+ _this.isReadOnly = isReadOnly;
6814
+ };
6815
+ if (!interrupt) {
6816
+ throw new Error("IllegalInputArgument for 'interrupt' in InterruptValue");
6817
+ }
6818
+ this.interrupt = interrupt;
7021
6819
  }
7022
- else {
7023
- return "void";
6820
+ return InterruptViewModel;
6821
+ }());
6822
+ exports.InterruptViewModel = InterruptViewModel;
6823
+ var RegisterViewModel = /** @class */ (function () {
6824
+ function RegisterViewModel(register) {
6825
+ var _this = this;
6826
+ this.settings = [];
6827
+ this.getSettings = function () { return _this.settings; };
6828
+ this.getSettingViewModel = function (setting) {
6829
+ var name = setting.name;
6830
+ return (0, Arrays_1.find)(_this.settings, function (rv) { return rv.getSetting().name === name; });
6831
+ };
6832
+ this.forEachSetting = function (doThis) {
6833
+ _this.settings.forEach(doThis);
6834
+ };
6835
+ this.getRegister = function () { return _this.register; };
6836
+ this.getName = function () { return _this.register.name; };
6837
+ this.getDescription = function () { return _this.register.desc; };
6838
+ this.getValue = function () { return _this.value; };
6839
+ this.setValue = function (value) {
6840
+ _this.value = value;
6841
+ };
6842
+ this.setReadonly = function (value) {
6843
+ if (value === void 0) { value = true; }
6844
+ _this.forEachSetting(function (setting) { return setting.setReadonly(value); });
6845
+ };
6846
+ this.getDefaultValue = function () { return CalculateRegisterValue_1.default.for(_this.register).asNumber(); };
6847
+ this.getValueOrDefault = function () {
6848
+ var value = _this.getValue();
6849
+ return value !== null && value !== void 0 ? value : _this.getDefaultValue();
6850
+ };
6851
+ if (!register) {
6852
+ throw new Error("IllegalInputArgument for 'register' in RegisterValue");
6853
+ }
6854
+ this.register = register;
6855
+ if (register.settings) {
6856
+ this.settings = this.createSettingViewModels(register);
6857
+ }
6858
+ }
6859
+ RegisterViewModel.prototype.createSettingViewModels = function (register) {
6860
+ var _this = this;
6861
+ var _a;
6862
+ var models = [];
6863
+ var settings = (_a = register.settings) !== null && _a !== void 0 ? _a : {};
6864
+ Object.keys(settings).forEach(function (settingKey) {
6865
+ models.push(new SettingViewModel(settings[settingKey], _this.getValueOrDefault));
6866
+ });
6867
+ return RegisterViewModel.sortSettingsDescending(models);
6868
+ };
6869
+ /** Sorts the settings in descending order based on bit positions. */
6870
+ RegisterViewModel.sortSettingsDescending = function (settings) {
6871
+ var result = __spreadArray([], settings, true);
6872
+ result.sort(function (settingOne, settingTwo) {
6873
+ var _a, _b, _c, _d;
6874
+ var bitRangeOne = (_b = (_a = (0, Setting_1.getBitRange)(settingOne.getSetting())) === null || _a === void 0 ? void 0 : _a.high) !== null && _b !== void 0 ? _b : -1;
6875
+ var bitRangeTwo = (_d = (_c = (0, Setting_1.getBitRange)(settingTwo.getSetting())) === null || _c === void 0 ? void 0 : _c.high) !== null && _d !== void 0 ? _d : -1;
6876
+ return bitRangeTwo - bitRangeOne;
6877
+ });
6878
+ return result;
6879
+ };
6880
+ return RegisterViewModel;
6881
+ }());
6882
+ exports.RegisterViewModel = RegisterViewModel;
6883
+ var SettingViewModel = /** @class */ (function () {
6884
+ function SettingViewModel(setting, getRegisterValue) {
6885
+ var _this = this;
6886
+ this.isReadonly = true;
6887
+ this.setReadonly = function (value) {
6888
+ if (value === void 0) { value = true; }
6889
+ _this.isReadonly = value;
6890
+ };
6891
+ this.getIsReadonly = function () { return _this.isReadonly; };
6892
+ this.getSetting = function () { return _this.setting; };
6893
+ this.getName = function () { return _this.setting.name; };
6894
+ this.getDescription = function () { return _this.setting.description; };
6895
+ this.getPORDefault = function () { return Number(_this.setting.porDefault); };
6896
+ this.getMask = function () { return Number(_this.setting.mask); };
6897
+ this.hasOptions = function () {
6898
+ return !!_this.setting.options;
6899
+ };
6900
+ this.getOptionNames = function () {
6901
+ return (0, Arrays_1.map)(nullSafe(_this.setting.options), function (option) { return option.name; });
6902
+ };
6903
+ this.mapToOptionNameIfExists = function (value) {
6904
+ var option = _this.getOptionForValue(value);
6905
+ return option !== undefined ? option.name : value;
6906
+ };
6907
+ this.getOptionForValue = function (value) {
6908
+ return (0, Arrays_1.find)(nullSafe(_this.setting.options), function (option) {
6909
+ var optionValue = option.value;
6910
+ return optionValue != undefined ? parseInt(optionValue) === value : false;
6911
+ });
6912
+ };
6913
+ this.getValue = function () {
6914
+ var value = _this.getRegisterValue();
6915
+ value &= _this.getMask();
6916
+ return (value >> _this.getShift()) >>> 0;
6917
+ };
6918
+ this.getShift = function () {
6919
+ var mask = _this.getMask();
6920
+ var shiftIndex = 0;
6921
+ while (!(mask & 0x1)) {
6922
+ mask = mask >> 1;
6923
+ shiftIndex++;
6924
+ }
6925
+ return shiftIndex;
6926
+ };
6927
+ this.getMaxValue = function () {
6928
+ var mask = _this.getMask();
6929
+ while (!(mask & 0x1)) {
6930
+ mask = mask >> 1;
6931
+ }
6932
+ return mask;
6933
+ };
6934
+ if (!setting) {
6935
+ throw new Error("SettingViewModel: Invalid input argument");
6936
+ }
6937
+ this.setting = setting;
6938
+ this.getRegisterValue = getRegisterValue;
7024
6939
  }
7025
- };
7026
-
6940
+ return SettingViewModel;
6941
+ }());
6942
+ exports.SettingViewModel = SettingViewModel;
6943
+ var nullSafe = function (array) { return array !== null && array !== void 0 ? array : []; };
6944
+ //# sourceMappingURL=Model.js.map
7027
6945
 
7028
6946
  /***/ }),
7029
6947
 
7030
- /***/ "./node_modules/@microchip/scf-interface/lib/helpers.js":
7031
- /*!**************************************************************!*\
7032
- !*** ./node_modules/@microchip/scf-interface/lib/helpers.js ***!
7033
- \**************************************************************/
6948
+ /***/ "./node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js":
6949
+ /*!***********************************************************************************!*\
6950
+ !*** ./node_modules/@microchip/scf-register-view-helper/lib/ViewSchemaBuilder.js ***!
6951
+ \***********************************************************************************/
7034
6952
  /*! no static exports found */
7035
6953
  /***/ (function(module, exports, __webpack_require__) {
7036
6954
 
7037
6955
  "use strict";
7038
6956
 
7039
- Object.defineProperty(exports, "__esModule", { value: true });
7040
- exports.getInterfaceName = function (pkgJson) {
7041
- var strReplace = "@microchip/";
7042
- var interfaceName;
7043
- if (pkgJson) {
7044
- interfaceName = pkgJson["name"];
7045
- if (interfaceName) {
7046
- interfaceName = interfaceName.replace(strReplace, "");
6957
+ var __assign = (this && this.__assign) || function () {
6958
+ __assign = Object.assign || function(t) {
6959
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6960
+ s = arguments[i];
6961
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6962
+ t[p] = s[p];
7047
6963
  }
7048
- }
7049
- if (!interfaceName) {
7050
- throw new Error("Invalid Interface Name...!");
7051
- }
7052
- return interfaceName;
6964
+ return t;
6965
+ };
6966
+ return __assign.apply(this, arguments);
7053
6967
  };
7054
- exports.getInterfaceVersion = function (pkgJson) {
7055
- var versionRegex = new RegExp("\\d+.\\d+.\\d+");
7056
- var version;
7057
- if (pkgJson) {
7058
- version = pkgJson["version"];
6968
+ Object.defineProperty(exports, "__esModule", { value: true });
6969
+ exports.UiSchemaBuilder = exports.SchemaBuilder = exports.ViewSchemaBuilder = void 0;
6970
+ var ViewSchemaBuilder = /** @class */ (function () {
6971
+ function ViewSchemaBuilder() {
6972
+ this.schema = {};
6973
+ this.uiSchema = {};
6974
+ this.formData = {};
6975
+ this.tabName = "main";
6976
+ this.expandGroupsByDefault = true;
7059
6977
  }
7060
- if (!version && !versionRegex.test(version)) {
7061
- throw new Error("Invalid Interface Version...!");
6978
+ ViewSchemaBuilder.prototype.withSchema = function (schema) {
6979
+ this.schema = schema;
6980
+ return this;
6981
+ };
6982
+ ViewSchemaBuilder.prototype.withUiSchema = function (uiSchema) {
6983
+ this.uiSchema = uiSchema;
6984
+ return this;
6985
+ };
6986
+ ViewSchemaBuilder.prototype.withFormData = function (formData) {
6987
+ this.formData = formData;
6988
+ return this;
6989
+ };
6990
+ ViewSchemaBuilder.prototype.withTabName = function (name) {
6991
+ this.tabName = name;
6992
+ return this;
6993
+ };
6994
+ ViewSchemaBuilder.prototype.withExpandedDefault = function (expandGroupsByDefault) {
6995
+ this.expandGroupsByDefault = expandGroupsByDefault;
6996
+ return this;
6997
+ };
6998
+ ViewSchemaBuilder.prototype.addChildComponent = function (childName, child) {
6999
+ var _a, _b, _c;
7000
+ this.schema = __assign(__assign({}, this.schema), { properties: __assign(__assign({}, this.schema.properties), (_a = {}, _a[childName] = child.schema, _a)) });
7001
+ this.uiSchema = __assign(__assign({}, this.uiSchema), (_b = {}, _b[childName] = child.uiSchema, _b));
7002
+ if (this.formData instanceof Object) {
7003
+ this.formData = __assign(__assign({}, this.formData), (_c = {}, _c[childName] = child.formData, _c));
7004
+ }
7005
+ };
7006
+ ViewSchemaBuilder.prototype.build = function () {
7007
+ return {
7008
+ schema: this.schema,
7009
+ uiSchema: this.uiSchema,
7010
+ formData: this.formData,
7011
+ name: this.tabName,
7012
+ expandGroupsByDefault: this.expandGroupsByDefault,
7013
+ };
7014
+ };
7015
+ return ViewSchemaBuilder;
7016
+ }());
7017
+ exports.ViewSchemaBuilder = ViewSchemaBuilder;
7018
+ var SchemaBuilder = /** @class */ (function () {
7019
+ function SchemaBuilder(type, title) {
7020
+ this.title = title;
7021
+ this.type = type;
7062
7022
  }
7063
- return version;
7064
- };
7065
-
7066
-
7067
- /***/ }),
7068
-
7069
- /***/ "./node_modules/@microchip/scf-interface/lib/index.js":
7070
- /*!************************************************************!*\
7071
- !*** ./node_modules/@microchip/scf-interface/lib/index.js ***!
7072
- \************************************************************/
7073
- /*! no static exports found */
7074
- /***/ (function(module, exports, __webpack_require__) {
7075
-
7076
- "use strict";
7077
-
7078
- Object.defineProperty(exports, "__esModule", { value: true });
7079
- var c_function_types_1 = __webpack_require__(/*! ./c-function-types */ "./node_modules/@microchip/scf-interface/lib/c-function-types.js");
7080
- exports.buildSimpleApi = c_function_types_1.buildSimpleApi;
7081
- var helpers_1 = __webpack_require__(/*! ./helpers */ "./node_modules/@microchip/scf-interface/lib/helpers.js");
7082
- exports.getInterfaceName = helpers_1.getInterfaceName;
7083
- exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
7084
-
7023
+ SchemaBuilder.prototype.withProperties = function (properties) {
7024
+ this.properties = properties;
7025
+ return this;
7026
+ };
7027
+ SchemaBuilder.prototype.withDefault = function (defaultValue) {
7028
+ this.default = defaultValue;
7029
+ return this;
7030
+ };
7031
+ SchemaBuilder.prototype.withMaximum = function (maximum) {
7032
+ this.maximum = maximum;
7033
+ return this;
7034
+ };
7035
+ SchemaBuilder.prototype.withMinimum = function (minimum) {
7036
+ this.minimum = minimum;
7037
+ return this;
7038
+ };
7039
+ SchemaBuilder.prototype.withEnum = function (vals) {
7040
+ this.enum = vals;
7041
+ return this;
7042
+ };
7043
+ SchemaBuilder.prototype.build = function () {
7044
+ return {
7045
+ type: this.type,
7046
+ title: this.title,
7047
+ properties: this.properties,
7048
+ default: this.default,
7049
+ maximum: this.maximum,
7050
+ minimum: this.minimum,
7051
+ enum: this.enum,
7052
+ };
7053
+ };
7054
+ return SchemaBuilder;
7055
+ }());
7056
+ exports.SchemaBuilder = SchemaBuilder;
7057
+ var UiSchemaBuilder = /** @class */ (function () {
7058
+ function UiSchemaBuilder() {
7059
+ }
7060
+ UiSchemaBuilder.prototype.withReadonlyValue = function (isReadonly) {
7061
+ this.isReadOnly = isReadonly;
7062
+ return this;
7063
+ };
7064
+ UiSchemaBuilder.prototype.withWidget = function (widgetName) {
7065
+ this.widget = widgetName;
7066
+ return this;
7067
+ };
7068
+ UiSchemaBuilder.prototype.withOptions = function (options) {
7069
+ this.options = options;
7070
+ return this;
7071
+ };
7072
+ UiSchemaBuilder.prototype.withUiHelp = function (uiHelp) {
7073
+ this.uiHelp = uiHelp;
7074
+ return this;
7075
+ };
7076
+ UiSchemaBuilder.prototype.build = function () {
7077
+ return {
7078
+ "ui:readonly": this.isReadOnly,
7079
+ "ui:widget": this.widget,
7080
+ "ui:options": this.options,
7081
+ "ui:help": this.uiHelp,
7082
+ };
7083
+ };
7084
+ return UiSchemaBuilder;
7085
+ }());
7086
+ exports.UiSchemaBuilder = UiSchemaBuilder;
7087
+ //# sourceMappingURL=ViewSchemaBuilder.js.map
7085
7088
 
7086
7089
  /***/ }),
7087
7090
 
@@ -8314,8 +8317,8 @@ __webpack_require__.r(__webpack_exports__);
8314
8317
  /* harmony import */ var _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../generated_module/src/pins/PCPHelper */ "./generated_module/src/pins/PCPHelper.ts");
8315
8318
  /* harmony import */ var _microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @microchip/scf-validators/lib */ "./node_modules/@microchip/scf-validators/lib/index.js");
8316
8319
  /* harmony import */ var _microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__);
8317
- /* harmony import */ var _microchip_pin_standard_lib_pin_standard__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @microchip/pin-standard/lib/pin-standard */ "./node_modules/@microchip/pin-standard/lib/pin-standard.js");
8318
- /* harmony import */ var _microchip_pin_standard_lib_pin_standard__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_microchip_pin_standard_lib_pin_standard__WEBPACK_IMPORTED_MODULE_7__);
8320
+ /* harmony import */ var _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @microchip/pins-interface/lib/types */ "./node_modules/@microchip/pins-interface/lib/types.js");
8321
+ /* harmony import */ var _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_7__);
8319
8322
  function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
8320
8323
 
8321
8324
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -8421,7 +8424,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
8421
8424
  importName: _this.friendlyImportName,
8422
8425
  componentNameValidator: _this.componentNameValidator,
8423
8426
  getCustomUiErrors: _this.getCustomUiErrors,
8424
- pin_standard_args: _this.getPinstandardArgs
8427
+ pins_interface_args: _this.getPinsinterfaceArgs
8425
8428
  };
8426
8429
  });
8427
8430
 
@@ -8429,7 +8432,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
8429
8432
  if (importKey === "scf_pic8_pwm_v2") return "PWM Hardware";
8430
8433
  if (importKey === "osc_clocks") return "Oscillator Clock";
8431
8434
  if (importKey === "initializer_system") return "system.c Initialize()";
8432
- if (importKey === "pin_standard") return "Pins";
8435
+ if (importKey === "pins_interface") return "Pins";
8433
8436
  return importKey;
8434
8437
  });
8435
8438
 
@@ -8464,10 +8467,9 @@ var MyDerivedData = function MyDerivedData(dataModel) {
8464
8467
  }
8465
8468
  });
8466
8469
 
8467
- _defineProperty(this, "getPinstandardArgs", function () {
8470
+ _defineProperty(this, "getPinsinterfaceArgs", function () {
8468
8471
  var args = {
8469
- queryAdapters: ["pps", "apfcon"],
8470
- queryAdapterMap: _defineProperty({}, _microchip_pin_standard_lib_pin_standard__WEBPACK_IMPORTED_MODULE_7__["QueryAdapterKey"].ALLPINS, "^PWM[0-9]{0,1}$")
8472
+ queryAdapters: [_microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_7__["QueryAdapterKey"].PPS, _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_7__["QueryAdapterKey"].APFCON]
8471
8473
  };
8472
8474
  return args;
8473
8475
  });
@@ -8579,14 +8581,12 @@ var MyDerivedData = function MyDerivedData(dataModel) {
8579
8581
  });
8580
8582
 
8581
8583
  _defineProperty(this, "getMyAlerts", function () {
8582
- var _this$dataModel$getCo2, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
8584
+ var _this$dataModel$getCo2, _this$dataModel$getAs;
8583
8585
 
8584
8586
  var alerts = [];
8585
8587
  var timerSelection = (_this$dataModel$getCo2 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "";
8586
- var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
8587
- var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
8588
8588
 
8589
- if (_this.dataModel.getAssignedImport("Timer") == undefined || ((_this$dataModel$getAs = _this.dataModel.getAssignedImport("Timer")) === null || _this$dataModel$getAs === void 0 ? void 0 : (_this$dataModel$getAs2 = _this$dataModel$getAs.handle) === null || _this$dataModel$getAs2 === void 0 ? void 0 : _this$dataModel$getAs2.label) !== "TMR" + timersuffix) {
8589
+ if (_this.dataModel.getAssignedImport("Timer") === undefined || ((_this$dataModel$getAs = _this.dataModel.getAssignedImport("Timer")) === null || _this$dataModel$getAs === void 0 ? void 0 : _this$dataModel$getAs.options) !== undefined) {
8590
8590
  alerts.push({
8591
8591
  text: "Please select ".concat(timerSelection, " as the Timer Dependency."),
8592
8592
  type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Warning
@@ -8674,10 +8674,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
8674
8674
  });
8675
8675
 
8676
8676
  _defineProperty(this, "ctselTimerSetting", function () {
8677
- var _this$dataModel$getCo4, _timerSelection$match2;
8677
+ var _this$dataModel$getCo4, _timerSelection$match;
8678
8678
 
8679
8679
  var timerSelection = (_this$dataModel$getCo4 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo4 !== void 0 ? _this$dataModel$getCo4 : "";
8680
- var groupmatch = (_timerSelection$match2 = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match2 !== void 0 ? _timerSelection$match2 : "";
8680
+ var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
8681
8681
 
8682
8682
  if (groupmatch.length > 1) {
8683
8683
  var _this$dataModel$getHa3;
@@ -8729,7 +8729,6 @@ __webpack_require__.r(__webpack_exports__);
8729
8729
  /* harmony import */ var _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interfaces/pwm_general_parameters */ "./src/interfaces/pwm_general_parameters.tsx");
8730
8730
  /* harmony import */ var _generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../generated_module/src/autoModule/AutoModuleHelpers */ "./generated_module/src/autoModule/AutoModuleHelpers.ts");
8731
8731
  /* harmony import */ var _generated_module_src_autoModule_AutoModuleTemplates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../generated_module/src/autoModule/AutoModuleTemplates */ "./generated_module/src/autoModule/AutoModuleTemplates.ts");
8732
- /* harmony import */ var _generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../generated_module/src/Utils */ "./generated_module/src/Utils.ts");
8733
8732
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
8734
8733
 
8735
8734
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -8739,38 +8738,29 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
8739
8738
 
8740
8739
 
8741
8740
 
8742
-
8743
8741
  var getGeneratorModel = function getGeneratorModel(model) {
8744
- var _model$getComponentVa, _model$getPeripheralD, _model$getPeripheralD2, _model$getPeripheralD3, _model$getPeripheralD4, _model$getName, _model$getName2, _pwmInterface$headerF, _model$getImportValue, _templateSettings$reg, _templateSettings$reg2, _templateSettings$reg3, _templateSettings$reg4, _templateSettings$reg5, _templateSettings$reg6, _templateSettings$reg7, _ctsel$options$length, _ctsel$options;
8742
+ var _model$getComponentVa, _ref, _model$getPeripheralD, _model$getPeripheralD2, _model$getPeripheralD3, _model$getPeripheralD4, _model$getPeripheralD5, _model$getPeripheralD6, _model$getPeripheralD7, _model$getPeripheralD8, _model$getPeripheralD9, _model$getPeripheralD10, _model$getPeripheralD11, _model$getPeripheralD12, _model$getPeripheralD13, _ref2, _getOptionValueByName, _model$getName, _model$getName2, _pwmInterface$headerF, _model$getImportValue, _ctsel$options$length, _ctsel$options;
8745
8743
 
8746
8744
  if (!model.getHardware()) return {};
8745
+ var hardwareSettings = model.getPeripheralDescription();
8747
8746
  var pwmInterface = _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi((_model$getComponentVa = model.getComponentValue("componentName")) !== null && _model$getComponentVa !== void 0 ? _model$getComponentVa : "", getHeaderFiles(model));
8748
8747
  var templateSettings = Object(_generated_module_src_autoModule_AutoModuleTemplates__WEBPACK_IMPORTED_MODULE_2__["getTemplateSettings"])(model);
8749
8748
  var registerValues = templateSettings === null || templateSettings === void 0 ? void 0 : templateSettings.registers;
8750
- var initRegisters = Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_3__["values"])(registerValues !== null && registerValues !== void 0 ? registerValues : {});
8751
- var ctsel = (_model$getPeripheralD = model.getPeripheralDescription()) === null || _model$getPeripheralD === void 0 ? void 0 : (_model$getPeripheralD2 = _model$getPeripheralD.registers) === null || _model$getPeripheralD2 === void 0 ? void 0 : (_model$getPeripheralD3 = _model$getPeripheralD2.CCPTMRS1) === null || _model$getPeripheralD3 === void 0 ? void 0 : (_model$getPeripheralD4 = _model$getPeripheralD3.settings) === null || _model$getPeripheralD4 === void 0 ? void 0 : _model$getPeripheralD4.CTSEL;
8752
- var CTSELvalue = ctsel ? Object(_generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__["getOptionValueByName"])(ctsel, model.getDerivedFunction("ctselCcptmrs1")) : 1;
8749
+ var ctsel = (_ref = (_model$getPeripheralD = (_model$getPeripheralD2 = model.getPeripheralDescription()) === null || _model$getPeripheralD2 === void 0 ? void 0 : (_model$getPeripheralD3 = _model$getPeripheralD2.registers) === null || _model$getPeripheralD3 === void 0 ? void 0 : (_model$getPeripheralD4 = _model$getPeripheralD3.CCPTMRS1) === null || _model$getPeripheralD4 === void 0 ? void 0 : (_model$getPeripheralD5 = _model$getPeripheralD4.settings) === null || _model$getPeripheralD5 === void 0 ? void 0 : _model$getPeripheralD5.CTSEL) !== null && _model$getPeripheralD !== void 0 ? _model$getPeripheralD : (_model$getPeripheralD6 = model.getPeripheralDescription()) === null || _model$getPeripheralD6 === void 0 ? void 0 : (_model$getPeripheralD7 = _model$getPeripheralD6.registers) === null || _model$getPeripheralD7 === void 0 ? void 0 : (_model$getPeripheralD8 = _model$getPeripheralD7.CCPTMRS) === null || _model$getPeripheralD8 === void 0 ? void 0 : (_model$getPeripheralD9 = _model$getPeripheralD8.settings) === null || _model$getPeripheralD9 === void 0 ? void 0 : _model$getPeripheralD9.CTSEL) !== null && _ref !== void 0 ? _ref : (_model$getPeripheralD10 = model.getPeripheralDescription()) === null || _model$getPeripheralD10 === void 0 ? void 0 : (_model$getPeripheralD11 = _model$getPeripheralD10.registers) === null || _model$getPeripheralD11 === void 0 ? void 0 : (_model$getPeripheralD12 = _model$getPeripheralD11.PWMTMRS) === null || _model$getPeripheralD12 === void 0 ? void 0 : (_model$getPeripheralD13 = _model$getPeripheralD12.settings) === null || _model$getPeripheralD13 === void 0 ? void 0 : _model$getPeripheralD13.CTSEL;
8750
+ var CTSELvalue = ctsel ? (_ref2 = (_getOptionValueByName = Object(_generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__["getOptionValueByName"])(ctsel, model.getDerivedFunction("ctselCcptmrs1"))) !== null && _getOptionValueByName !== void 0 ? _getOptionValueByName : Object(_generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__["getOptionValueByName"])(ctsel, model.getDerivedFunction("ctselCcptmrs"))) !== null && _ref2 !== void 0 ? _ref2 : Object(_generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__["getOptionValueByName"])(ctsel, model.getDerivedFunction("ctselPwmtmrs")) : 1;
8751
+ var CTSELvaluenum = Number(CTSELvalue);
8753
8752
  return _objectSpread({
8754
8753
  moduleNameLowerCase: (_model$getName = model.getName()) === null || _model$getName === void 0 ? void 0 : _model$getName.toLowerCase(),
8755
8754
  moduleNameUpperCase: (_model$getName2 = model.getName()) === null || _model$getName2 === void 0 ? void 0 : _model$getName2.toUpperCase(),
8755
+ moduleInstance: hardwareSettings === null || hardwareSettings === void 0 ? void 0 : hardwareSettings.instance,
8756
8756
  header: (_pwmInterface$headerF = pwmInterface.headerFiles) === null || _pwmInterface$headerF === void 0 ? void 0 : _pwmInterface$headerF[0],
8757
8757
  api: pwmInterface.api,
8758
8758
  simpleApi: pwmInterface.simpleApi,
8759
- productName: "",
8760
- productVersion: "",
8761
- selectedDevice: "PIC18F47Q10",
8762
- compiler: "XC8 v2.20",
8763
- tool: "MPLABX v5.40",
8764
8759
  //From System Manager
8765
8760
  useWatchdog: (_model$getImportValue = model.getImportValue("wdtEnable")) !== null && _model$getImportValue !== void 0 ? _model$getImportValue : false,
8766
8761
  //TODO
8767
8762
  //Registers and Settings
8768
- initRegisters: initRegisters,
8769
- // PWMDCH: templateSettings?.registers?.PWMDCH.name ?? "",
8770
- // PWMDCL: templateSettings?.registers?.PWMDCL?.name ?? "",
8771
- CCPTMRSregname: (_templateSettings$reg = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg2 = templateSettings.registers) === null || _templateSettings$reg2 === void 0 ? void 0 : (_templateSettings$reg3 = _templateSettings$reg2.CCPTMRS1) === null || _templateSettings$reg3 === void 0 ? void 0 : _templateSettings$reg3.name) !== null && _templateSettings$reg !== void 0 ? _templateSettings$reg : "",
8772
- CTSELsettingname: (_templateSettings$reg4 = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg5 = templateSettings.registers) === null || _templateSettings$reg5 === void 0 ? void 0 : (_templateSettings$reg6 = _templateSettings$reg5.CCPTMRS1) === null || _templateSettings$reg6 === void 0 ? void 0 : (_templateSettings$reg7 = _templateSettings$reg6.settings) === null || _templateSettings$reg7 === void 0 ? void 0 : _templateSettings$reg7.CTSEL.name) !== null && _templateSettings$reg4 !== void 0 ? _templateSettings$reg4 : "",
8773
- CTSELvalue: CTSELvalue,
8763
+ CTSELvalue: CTSELvaluenum.toString(16),
8774
8764
  timerselpresence: ((_ctsel$options$length = ctsel === null || ctsel === void 0 ? void 0 : (_ctsel$options = ctsel.options) === null || _ctsel$options === void 0 ? void 0 : _ctsel$options.length) !== null && _ctsel$options$length !== void 0 ? _ctsel$options$length : 0) > 0 ? "timerselpresent" : "timerselabsent",
8775
8765
  pwmdcValue: model.getComponentValue("pwmdcValue")
8776
8766
  }, registerValues);
@@ -8795,8 +8785,8 @@ var getHeaderFiles = function getHeaderFiles(model) {
8795
8785
  __webpack_require__.r(__webpack_exports__);
8796
8786
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getCompletePinData", function() { return getCompletePinData; });
8797
8787
  /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getRowData", function() { return getRowData; });
8798
- /* harmony import */ var _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/pin-standard */ "./node_modules/@microchip/pin-standard/lib/index.js");
8799
- /* harmony import */ var _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__);
8788
+ /* harmony import */ var _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @microchip/pins-interface/lib/types */ "./node_modules/@microchip/pins-interface/lib/types.js");
8789
+ /* harmony import */ var _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__);
8800
8790
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
8801
8791
 
8802
8792
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
@@ -8811,19 +8801,11 @@ var getCompletePinData = function getCompletePinData(appModel) {
8811
8801
  }; // overrides pin data for a particular row based on model.
8812
8802
 
8813
8803
  function getRowData(appModel, rowData) {
8814
- var _appModel$getName, _appModel$getImportVa, _appModel$getComponen, _appModel$getComponen2, _appModel$getComponen3, _appModel$getComponen4;
8804
+ var _appModel$getName, _appModel$getImportVa, _appModel$getImportVa2, _appModel$getImportVa3, _appModel$getImportVa4, _appModel$getImportVa5, _appModel$getImportVa6, _appModel$getComponen, _appModel$getComponen2, _appModel$getComponen3, _appModel$getComponen4, _appModel$getComponen5;
8815
8805
 
8816
8806
  var moduleName = (_appModel$getName = appModel.getName()) !== null && _appModel$getName !== void 0 ? _appModel$getName : "PWM";
8817
- var allPinsData = (_appModel$getImportVa = appModel.getImportValue("pin_standard")) === null || _appModel$getImportVa === void 0 ? void 0 : _appModel$getImportVa.allpins;
8818
- var modulePins = getModulePins(allPinsData, moduleName);
8819
- var pinName = getPinName(modulePins, rowData.filter.aliasReEx);
8820
- var pinBehaviour = getpinBehaviour(allPinsData, moduleName, pinName);
8821
- var isPPS = pinBehaviour === "pps";
8822
- var isAPFCON = pinBehaviour === "apfcon";
8823
-
8824
- if (pinName === "") {
8825
- return undefined;
8826
- }
8807
+ var ppsData = (_appModel$getImportVa = appModel.getImportValue("pins_interface")) === null || _appModel$getImportVa === void 0 ? void 0 : (_appModel$getImportVa2 = _appModel$getImportVa["pps"]) === null || _appModel$getImportVa2 === void 0 ? void 0 : (_appModel$getImportVa3 = _appModel$getImportVa2["data"]) === null || _appModel$getImportVa3 === void 0 ? void 0 : _appModel$getImportVa3[moduleName];
8808
+ var apfconData = (_appModel$getImportVa4 = appModel.getImportValue("pins_interface")) === null || _appModel$getImportVa4 === void 0 ? void 0 : (_appModel$getImportVa5 = _appModel$getImportVa4["apfcon"]) === null || _appModel$getImportVa5 === void 0 ? void 0 : (_appModel$getImportVa6 = _appModel$getImportVa5["data"]) === null || _appModel$getImportVa6 === void 0 ? void 0 : _appModel$getImportVa6[moduleName];
8827
8809
 
8828
8810
  if (rowData.name === "out") {
8829
8811
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
@@ -8833,10 +8815,10 @@ function getRowData(appModel, rowData) {
8833
8815
  module: moduleName,
8834
8816
  aliasReEx: "^".concat(moduleName, "(OUT){0,1}$")
8835
8817
  },
8836
- behaviour: isPPS ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS : isAPFCON ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].APFCON : _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK
8818
+ behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx)
8837
8819
  });
8838
8820
 
8839
- if (appModel.isComponentValue("pwmoePwmcon") === true) {
8821
+ if (appModel.isComponentValue("pwmoePwmcon") === true && getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx) === _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK) {
8840
8822
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
8841
8823
  behaviourMeta: {
8842
8824
  lockPinRegEx: "^".concat(moduleName, "(OUT){0,1}$")
@@ -8844,13 +8826,17 @@ function getRowData(appModel, rowData) {
8844
8826
  });
8845
8827
  }
8846
8828
  } else if (rowData.name === "pwmx0") {
8829
+ if (appModel.getComponentValue("pwmoe0Pwmaoe") === undefined) {
8830
+ return undefined;
8831
+ }
8832
+
8847
8833
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
8848
8834
  module: moduleName,
8849
8835
  "function": moduleName + "0OUT",
8850
8836
  filter: _objectSpread(_objectSpread({}, rowData.filter), {}, {
8851
8837
  module: moduleName
8852
8838
  }),
8853
- behaviour: isPPS ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS : isAPFCON ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].APFCON : _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK
8839
+ behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx)
8854
8840
  });
8855
8841
 
8856
8842
  if (appModel.isComponentValue("pwmoe0Pwmaoe") === true) {
@@ -8861,13 +8847,17 @@ function getRowData(appModel, rowData) {
8861
8847
  });
8862
8848
  }
8863
8849
  } else if (rowData.name === "pwmx1") {
8850
+ if (appModel.getComponentValue("pwmoe1Pwmaoe") === undefined) {
8851
+ return undefined;
8852
+ }
8853
+
8864
8854
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
8865
8855
  module: moduleName,
8866
8856
  "function": moduleName + "1OUT",
8867
8857
  filter: _objectSpread(_objectSpread({}, rowData.filter), {}, {
8868
8858
  module: moduleName
8869
8859
  }),
8870
- behaviour: isPPS ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS : isAPFCON ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].APFCON : _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK
8860
+ behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx)
8871
8861
  });
8872
8862
 
8873
8863
  if (appModel.isComponentValue("pwmoe1Pwmaoe") === true) {
@@ -8878,13 +8868,17 @@ function getRowData(appModel, rowData) {
8878
8868
  });
8879
8869
  }
8880
8870
  } else if (rowData.name === "pwmx2") {
8871
+ if (appModel.getComponentValue("pwmoe2Pwmaoe") === undefined) {
8872
+ return undefined;
8873
+ }
8874
+
8881
8875
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
8882
8876
  module: moduleName,
8883
8877
  "function": moduleName + "2OUT",
8884
8878
  filter: _objectSpread(_objectSpread({}, rowData.filter), {}, {
8885
8879
  module: moduleName
8886
8880
  }),
8887
- behaviour: isPPS ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS : isAPFCON ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].APFCON : _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK
8881
+ behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx)
8888
8882
  });
8889
8883
 
8890
8884
  if (appModel.isComponentValue("pwmoe2Pwmaoe") === true) {
@@ -8895,13 +8889,17 @@ function getRowData(appModel, rowData) {
8895
8889
  });
8896
8890
  }
8897
8891
  } else if (rowData.name === "pwmx3") {
8892
+ if (appModel.getComponentValue("pwmoe3Pwmaoe") === undefined) {
8893
+ return undefined;
8894
+ }
8895
+
8898
8896
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
8899
8897
  module: moduleName,
8900
8898
  "function": moduleName + "3OUT",
8901
8899
  filter: _objectSpread(_objectSpread({}, rowData.filter), {}, {
8902
8900
  module: moduleName
8903
8901
  }),
8904
- behaviour: isPPS ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS : isAPFCON ? _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].APFCON : _microchip_pin_standard__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK
8902
+ behaviour: getPinBehaviour(ppsData, apfconData, rowData.filter.aliasReEx)
8905
8903
  });
8906
8904
 
8907
8905
  if (appModel.isComponentValue("pwmoe3Pwmaoe") === true) {
@@ -8914,33 +8912,40 @@ function getRowData(appModel, rowData) {
8914
8912
  }
8915
8913
 
8916
8914
  var rowActions = [];
8917
- var pwmx0Regcomponent = (_appModel$getComponen = appModel.getComponent("pwmoe0Pwmaoe")) === null || _appModel$getComponen === void 0 ? void 0 : _appModel$getComponen.component;
8918
- var pwmx1Regcomponent = (_appModel$getComponen2 = appModel.getComponent("pwmoe1Pwmaoe")) === null || _appModel$getComponen2 === void 0 ? void 0 : _appModel$getComponen2.component;
8919
- var pwmx2Regcomponent = (_appModel$getComponen3 = appModel.getComponent("pwmoe2Pwmaoe")) === null || _appModel$getComponen3 === void 0 ? void 0 : _appModel$getComponen3.component;
8920
- var pwmx3Regcomponent = (_appModel$getComponen4 = appModel.getComponent("pwmoe3Pwmaoe")) === null || _appModel$getComponen4 === void 0 ? void 0 : _appModel$getComponen4.component;
8915
+ var pwmxRegcomponent = (_appModel$getComponen = appModel.getComponent("pwmoePwmcon")) === null || _appModel$getComponen === void 0 ? void 0 : _appModel$getComponen.component;
8916
+ var pwmx0Regcomponent = (_appModel$getComponen2 = appModel.getComponent("pwmoe0Pwmaoe")) === null || _appModel$getComponen2 === void 0 ? void 0 : _appModel$getComponen2.component;
8917
+ var pwmx1Regcomponent = (_appModel$getComponen3 = appModel.getComponent("pwmoe1Pwmaoe")) === null || _appModel$getComponen3 === void 0 ? void 0 : _appModel$getComponen3.component;
8918
+ var pwmx2Regcomponent = (_appModel$getComponen4 = appModel.getComponent("pwmoe2Pwmaoe")) === null || _appModel$getComponen4 === void 0 ? void 0 : _appModel$getComponen4.component;
8919
+ var pwmx3Regcomponent = (_appModel$getComponen5 = appModel.getComponent("pwmoe3Pwmaoe")) === null || _appModel$getComponen5 === void 0 ? void 0 : _appModel$getComponen5.component;
8921
8920
 
8922
- if (pwmx0Regcomponent) {
8921
+ if (pwmxRegcomponent && getPinBehaviour(ppsData, apfconData, "^".concat(moduleName, "(OUT){0,1}$")) === _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK) {
8923
8922
  var _appModel$getPCPHelpe;
8924
8923
 
8925
- rowActions = rowActions.concat((_appModel$getPCPHelpe = appModel.getPCPHelper) === null || _appModel$getPCPHelpe === void 0 ? void 0 : _appModel$getPCPHelpe.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx0").forComponent(pwmx0Regcomponent).addIfLockedSetValue(moduleName + "0", true).addIfUnLockedSetValue(".*", false).build());
8924
+ rowActions = rowActions.concat((_appModel$getPCPHelpe = appModel.getPCPHelper) === null || _appModel$getPCPHelpe === void 0 ? void 0 : _appModel$getPCPHelpe.call(appModel).stateActionBuilder(rowData).rowWithName("out").forComponent(pwmxRegcomponent).addIfLockedSetValue("^" + moduleName + "$", true).addIfUnLockedSetValue(".*", false).build());
8926
8925
  }
8927
8926
 
8928
- if (pwmx1Regcomponent) {
8927
+ if (pwmx0Regcomponent) {
8929
8928
  var _appModel$getPCPHelpe2;
8930
8929
 
8931
- rowActions = rowActions.concat((_appModel$getPCPHelpe2 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe2 === void 0 ? void 0 : _appModel$getPCPHelpe2.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx1").forComponent(pwmx1Regcomponent).addIfLockedSetValue(moduleName + "1", true).addIfUnLockedSetValue(".*", false).build());
8930
+ rowActions = rowActions.concat((_appModel$getPCPHelpe2 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe2 === void 0 ? void 0 : _appModel$getPCPHelpe2.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx0").forComponent(pwmx0Regcomponent).addIfLockedSetValue(moduleName + "0", true).addIfUnLockedSetValue(".*", false).build());
8932
8931
  }
8933
8932
 
8934
- if (pwmx2Regcomponent) {
8933
+ if (pwmx1Regcomponent) {
8935
8934
  var _appModel$getPCPHelpe3;
8936
8935
 
8937
- rowActions = rowActions.concat((_appModel$getPCPHelpe3 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe3 === void 0 ? void 0 : _appModel$getPCPHelpe3.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx2").forComponent(pwmx2Regcomponent).addIfLockedSetValue(moduleName + "2", true).addIfUnLockedSetValue(".*", false).build());
8936
+ rowActions = rowActions.concat((_appModel$getPCPHelpe3 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe3 === void 0 ? void 0 : _appModel$getPCPHelpe3.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx1").forComponent(pwmx1Regcomponent).addIfLockedSetValue(moduleName + "1", true).addIfUnLockedSetValue(".*", false).build());
8938
8937
  }
8939
8938
 
8940
- if (pwmx3Regcomponent) {
8939
+ if (pwmx2Regcomponent) {
8941
8940
  var _appModel$getPCPHelpe4;
8942
8941
 
8943
- rowActions = rowActions.concat((_appModel$getPCPHelpe4 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe4 === void 0 ? void 0 : _appModel$getPCPHelpe4.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx3").forComponent(pwmx3Regcomponent).addIfLockedSetValue(moduleName + "3", true).addIfUnLockedSetValue(".*", false).build());
8942
+ rowActions = rowActions.concat((_appModel$getPCPHelpe4 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe4 === void 0 ? void 0 : _appModel$getPCPHelpe4.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx2").forComponent(pwmx2Regcomponent).addIfLockedSetValue(moduleName + "2", true).addIfUnLockedSetValue(".*", false).build());
8943
+ }
8944
+
8945
+ if (pwmx3Regcomponent) {
8946
+ var _appModel$getPCPHelpe5;
8947
+
8948
+ rowActions = rowActions.concat((_appModel$getPCPHelpe5 = appModel.getPCPHelper) === null || _appModel$getPCPHelpe5 === void 0 ? void 0 : _appModel$getPCPHelpe5.call(appModel).stateActionBuilder(rowData).rowWithName("pwmx3").forComponent(pwmx3Regcomponent).addIfLockedSetValue(moduleName + "3", true).addIfUnLockedSetValue(".*", false).build());
8944
8949
  }
8945
8950
 
8946
8951
  rowData = _objectSpread(_objectSpread({}, rowData), {}, {
@@ -8949,48 +8954,37 @@ function getRowData(appModel, rowData) {
8949
8954
  return rowData;
8950
8955
  }
8951
8956
 
8952
- var getModulePins = function getModulePins(allPins, moduleName) {
8953
- var pins = [];
8957
+ var getPinBehaviour = function getPinBehaviour(ppsPins, apfconPins, pinRegEx) {
8958
+ var tempPinBehaviour = _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__["behaviour"].LOCK_UNLOCK;
8954
8959
 
8955
- for (var portPin in allPins) {
8956
- var _allPins$portPin;
8957
-
8958
- var modulePins = (_allPins$portPin = allPins[portPin]) === null || _allPins$portPin === void 0 ? void 0 : _allPins$portPin[moduleName];
8959
-
8960
- for (var modulePin in modulePins) {
8961
- if (pins.indexOf(modulePin) === -1) {
8962
- pins.push(modulePin);
8960
+ if (ppsPins !== undefined) {
8961
+ for (var ppsPin in ppsPins) {
8962
+ if (ppsPin === "pps_out") {
8963
+ for (var ppsOut in ppsPins["pps_out"]) {
8964
+ if (ppsOut.match(new RegExp(pinRegEx, "ig"))) {
8965
+ tempPinBehaviour = _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS;
8966
+ break;
8967
+ }
8968
+ }
8969
+ } else {
8970
+ if (ppsPin.match(new RegExp(pinRegEx, "ig"))) {
8971
+ tempPinBehaviour = _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__["behaviour"].PPS;
8972
+ break;
8973
+ }
8963
8974
  }
8964
8975
  }
8965
8976
  }
8966
8977
 
8967
- return pins;
8968
- };
8969
-
8970
- var getPinName = function getPinName(modulePins, regEx) {
8971
- var pinName = "";
8972
- modulePins.forEach(function (pin) {
8973
- if (pin.match(new RegExp(regEx, "g"))) {
8974
- pinName = pin;
8975
- }
8976
- });
8977
- return pinName;
8978
- };
8979
-
8980
- var getpinBehaviour = function getpinBehaviour(allPins, moduleName, pinName) {
8981
- for (var portPin in allPins) {
8982
- var _allPins$portPin2, _allPins$portPin2$mod;
8983
-
8984
- var pinData = (_allPins$portPin2 = allPins[portPin]) === null || _allPins$portPin2 === void 0 ? void 0 : (_allPins$portPin2$mod = _allPins$portPin2[moduleName]) === null || _allPins$portPin2$mod === void 0 ? void 0 : _allPins$portPin2$mod[pinName];
8985
-
8986
- if (pinData === null || pinData === void 0 ? void 0 : pinData["pps"]) {
8987
- return "pps";
8988
- } else if (pinData === null || pinData === void 0 ? void 0 : pinData["apfcon"]) {
8989
- return "apfcon";
8978
+ if (apfconPins !== undefined) {
8979
+ for (var apfconPin in apfconPins) {
8980
+ if (apfconPin.match(new RegExp(pinRegEx, "ig"))) {
8981
+ tempPinBehaviour = _microchip_pins_interface_lib_types__WEBPACK_IMPORTED_MODULE_0__["behaviour"].APFCON;
8982
+ break;
8983
+ }
8990
8984
  }
8991
8985
  }
8992
8986
 
8993
- return "lock_unlock";
8987
+ return tempPinBehaviour;
8994
8988
  };
8995
8989
 
8996
8990
  /***/ }),
@@ -9189,7 +9183,7 @@ var Interface = {
9189
9183
  /*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, help, analytics, templates, imports, exports, softwareData, peripherals, default */
9190
9184
  /***/ (function(module) {
9191
9185
 
9192
- module.exports = JSON.parse("{\"moduleName\":\"PWM\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{\"software\":\"Software Settings\",\"hardware\":\"Hardware Settings\",\"additional\":\"Additional Pin Settings\"},\"UIOrder\":{\"software\":[\"*\"],\"hardware\":[\"pwmenPwmcon\",\"pwmoePwmcon\",\"timerSelection\",\"dutyCycle\",\"pwmdcValue\",\"pwmpolPwmcon\",\"pwmPeriod\",\"pwmFrequency\",\"pwmResolution\",\"*\"],\"additional\":[\"pwmoe0Pwmaoe\",\"pwmoe1Pwmaoe\",\"pwmoe2Pwmaoe\",\"pwmoe3Pwmaoe\",\"*\"]},\"hasPins\":true,\"tabs\":{\"main\":\"Easy View\",\"register\":\"Register Initialization\"},\"help\":{\"url\":\"v2/keyword-lookup?keyword=scf-pic8-pwm-v2&redirect=true\",\"tooltip\":\"Click here to open documentation.\"},\"analytics\":{\"logAlwaysComps\":[\"pwmenPwmcon\",\"pwmFrequency\",\"pwmResolution\",\"pwmoePwmcon\"],\"logOnChangeComps\":[],\"compMapping\":{\"pwmenPwmcon\":\"PWM_Enable\",\"pwmFrequency\":\"PWM_Frequency\",\"pwmResolution\":\"PWM_Resolution\",\"pwmoePwmcon\":\"PWM_OutputEnable\"}},\"templates\":[{\"src\":\"output/pwm-v2.c.ftl\",\"dest\":\"pwm/src/${sourceFileName}\",\"generateWithHardware\":true},{\"src\":\"output/pwm-v2.h.ftl\",\"dest\":\"pwm/${headerFileName}\",\"generateWithHardware\":true}],\"imports\":{\"initializer_system\":{\"nodeModule\":{\"importName\":\"systemInit\",\"node\":\"@microchip/initializer-system\"},\"import\":{\"interfaceId\":{\"name\":\"initializer-system\",\"version\":\"^0.5.3\"}}},\"scf_pic8_pwm_v2\":{\"import\":{\"interfaceId\":{\"name\":\"scf-pic8-pwm-v2\",\"version\":\"1.0.0\"},\"isRequired\":true}},\"osc_clocks\":{\"import\":{\"interfaceId\":{\"name\":\"osc-clocks\",\"version\":\"^0.2.0\"}}},\"Timer\":{\"import\":{\"interfaceId\":{\"name\":\"timer-2-4-6-general-parameters\",\"version\":\"^0.2.0\"}}},\"pin_standard\":{\"import\":{\"interfaceId\":{\"name\":\"pin-standard\",\"version\":\"^0.1.0\"}}},\"device_meta\":{\"import\":{\"interfaceId\":{\"name\":\"device-meta\",\"version\":\"^1\"}}}},\"exports\":{\"pwm_general\":{\"interfaces\":[{\"interfaceId\":{\"name\":\"pwm_general_parameters\",\"version\":\"0.1.0\"}}]}},\"softwareData\":{\"componentName\":{\"name\":\"componentName\",\"description\":\"Custom Name\",\"type\":\"string\",\"defaultValue\":\"PWM\",\"group\":\"software\",\"tabs\":[\"main\"],\"category\":\"software\",\"validation\":true},\"tmr2Dependency\":{\"name\":\"tmr2Dependency\",\"description\":\"Timer Dependency Selector\",\"category\":\"import\",\"type\":\"ComboBox\",\"group\":\"software\",\"tabs\":[\"main\"],\"importId\":\"Timer\"},\"timerSelection\":{\"name\":\"timerSelection\",\"description\":\"Select a Timer\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"defaultValue\":{\"value\":\"TMR2\",\"options\":[\"TMR2\",\"TMR4\",\"TMR6\"]},\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},\"dutyCycle\":{\"name\":\"dutyCycle\",\"description\":\"Duty Cycle (%)\",\"type\":\"number\",\"defaultValue\":50,\"group\":\"hardware\",\"validation\":true,\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true\"}},\"pwmdcValue\":{\"name\":\"pwmdcValue\",\"description\":\"PWMDC Value\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true\"}},\"pwmPeriod\":{\"name\":\"pwmPeriod\",\"description\":\"PWM Period (s)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"},\"pwmFrequency\":{\"name\":\"pwmFrequency\",\"description\":\"PWM Frequency (Hz)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"},\"pwmResolution\":{\"name\":\"pwmResolution\",\"description\":\"PWM Resolution (bits)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"}},\"peripherals\":[{\"interfaceId\":{\"name\":\"scf-pic8-pwm-v2\",\"version\":\"1.0.0\"},\"registers\":{\"PWMTMRS\":[{\"setting\":\"CTSEL\",\"name\":\"ctselPwmtmrs\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"CCPTMRS1\":[{\"setting\":\"CTSEL\",\"name\":\"ctselCcptmrs1\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}],\"CCPTMRS\":[{\"setting\":\"CTSEL\",\"name\":\"ctselCcptmrs\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"PWMCON\":[{\"setting\":\"PWMPOL\",\"name\":\"pwmpolPwmcon\",\"description\":\"PWM Polarity\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"],\"category\":\"hardware\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},{\"setting\":\"PWMOE\",\"name\":\"pwmoePwmcon\",\"category\":\"hardware\",\"description\":\"Output Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"],\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},{\"setting\":\"PWMOUT\",\"name\":\"pwmoutPwmcon\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"},{\"setting\":\"PWMEN\",\"name\":\"pwmenPwmcon\",\"description\":\"PWM Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"overrideDefaultValue\":\"enabled\",\"tabs\":[\"main\"],\"category\":\"hardware\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}}],\"PWMAOE\":[{\"setting\":\"PWMOE0\",\"name\":\"pwmoe0Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 1\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]},{\"setting\":\"PWMOE1\",\"name\":\"pwmoe1Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 2\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]},{\"setting\":\"PWMOE2\",\"name\":\"pwmoe2Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 3\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]},{\"setting\":\"PWMOE3\",\"name\":\"pwmoe3Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 4\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]}],\"PWMDCH\":[{\"setting\":\"PWMDCH\",\"name\":\"pwmdchPwmdch\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}],\"PWMDCL\":[{\"setting\":\"PWMDCL\",\"name\":\"pwmdclPwmdcl\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}]}}]}");
9186
+ module.exports = JSON.parse("{\"moduleName\":\"PWM\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{\"software\":\"Software Settings\",\"hardware\":\"Hardware Settings\",\"additional\":\"Additional Pin Settings\"},\"UIOrder\":{\"software\":[\"*\"],\"hardware\":[\"pwmenPwmcon\",\"pwmoePwmcon\",\"timerSelection\",\"dutyCycle\",\"pwmdcValue\",\"pwmpolPwmcon\",\"pwmPeriod\",\"pwmFrequency\",\"pwmResolution\",\"*\"],\"additional\":[\"pwmoe0Pwmaoe\",\"pwmoe1Pwmaoe\",\"pwmoe2Pwmaoe\",\"pwmoe3Pwmaoe\",\"*\"]},\"hasPins\":true,\"tabs\":{\"main\":\"Easy View\",\"register\":\"Register Initialization\"},\"help\":{\"url\":\"v2/keyword-lookup?keyword=scf-pic8-pwm-v2&redirect=true\",\"tooltip\":\"Click here to open documentation.\"},\"analytics\":{\"logAlwaysComps\":[\"pwmenPwmcon\",\"pwmFrequency\",\"pwmResolution\",\"pwmoePwmcon\"],\"logOnChangeComps\":[],\"compMapping\":{\"pwmenPwmcon\":\"PWM_Enable\",\"pwmFrequency\":\"PWM_Frequency\",\"pwmResolution\":\"PWM_Resolution\",\"pwmoePwmcon\":\"PWM_OutputEnable\"}},\"templates\":[{\"src\":\"output/pwm-v2.c.ftl\",\"dest\":\"pwm/src/${sourceFileName}\",\"generateWithHardware\":true},{\"src\":\"output/pwm-v2.h.ftl\",\"dest\":\"pwm/${headerFileName}\",\"generateWithHardware\":true}],\"imports\":{\"initializer_system\":{\"nodeModule\":{\"importName\":\"systemInit\",\"node\":\"@microchip/initializer-system\"},\"import\":{\"interfaceId\":{\"name\":\"initializer-system\",\"version\":\"^0\"}}},\"scf_pic8_pwm_v2\":{\"import\":{\"interfaceId\":{\"name\":\"scf-pic8-pwm-v2\",\"version\":\"1.0.0\"},\"isRequired\":true}},\"osc_clocks\":{\"import\":{\"interfaceId\":{\"name\":\"osc-clocks\",\"version\":\"^0\"}}},\"Timer\":{\"import\":{\"interfaceId\":{\"name\":\"timer-2-4-6-general-parameters\",\"version\":\"^0\"}}},\"pins_interface\":{\"import\":{\"interfaceId\":{\"name\":\"pins-interface\",\"version\":\"^1.*\"}}},\"device_meta\":{\"import\":{\"interfaceId\":{\"name\":\"device-meta\",\"version\":\"^1.*\"}}}},\"exports\":{\"pwm_general\":{\"interfaces\":[{\"interfaceId\":{\"name\":\"pwm_general_parameters\",\"version\":\"0.1.0\"}}]}},\"softwareData\":{\"componentName\":{\"name\":\"componentName\",\"description\":\"Custom Name\",\"type\":\"string\",\"defaultValue\":\"PWM\",\"group\":\"software\",\"tabs\":[\"main\"],\"category\":\"software\",\"validation\":true},\"tmr2Dependency\":{\"name\":\"tmr2Dependency\",\"description\":\"Timer Dependency Selector\",\"category\":\"import\",\"type\":\"ComboBox\",\"group\":\"software\",\"tabs\":[\"main\"],\"importId\":\"Timer\"},\"timerSelection\":{\"name\":\"timerSelection\",\"description\":\"Select a Timer\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"defaultValue\":{\"value\":\"TMR2\",\"options\":[\"TMR2\",\"TMR4\",\"TMR6\"]},\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},\"dutyCycle\":{\"name\":\"dutyCycle\",\"description\":\"Duty Cycle (%)\",\"type\":\"number\",\"defaultValue\":50,\"group\":\"hardware\",\"validation\":true,\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true\"}},\"pwmdcValue\":{\"name\":\"pwmdcValue\",\"description\":\"PWMDC Value\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true\"}},\"pwmPeriod\":{\"name\":\"pwmPeriod\",\"description\":\"PWM Period (s)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"},\"pwmFrequency\":{\"name\":\"pwmFrequency\",\"description\":\"PWM Frequency (Hz)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"},\"pwmResolution\":{\"name\":\"pwmResolution\",\"description\":\"PWM Resolution (bits)\",\"type\":\"number\",\"defaultValue\":0,\"group\":\"hardware\",\"uiBehavior\":{\"readonly\":true},\"tabs\":[\"main\"],\"category\":\"software\"}},\"peripherals\":[{\"interfaceId\":{\"name\":\"scf-pic8-pwm-v2\",\"version\":\"1.0.0\"},\"registers\":{\"PWMTMRS\":[{\"setting\":\"CTSEL\",\"name\":\"ctselPwmtmrs\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"CCPTMRS1\":[{\"setting\":\"CTSEL\",\"name\":\"ctselCcptmrs1\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}],\"CCPTMRS\":[{\"setting\":\"CTSEL\",\"name\":\"ctselCcptmrs\",\"category\":\"hardware\",\"description\":\"Insert Description Here\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"register\"]}],\"PWMCON\":[{\"setting\":\"PWMPOL\",\"name\":\"pwmpolPwmcon\",\"description\":\"PWM Polarity\",\"type\":\"ComboBox\",\"group\":\"hardware\",\"tabs\":[\"main\"],\"category\":\"hardware\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},{\"setting\":\"PWMOE\",\"name\":\"pwmoePwmcon\",\"category\":\"hardware\",\"description\":\"Output Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"main\"],\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}},{\"setting\":\"PWMOUT\",\"name\":\"pwmoutPwmcon\",\"description\":\"Insert Description Here\",\"type\":\"boolean\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"},{\"setting\":\"PWMEN\",\"name\":\"pwmenPwmcon\",\"description\":\"PWM Enable\",\"type\":\"boolean\",\"group\":\"hardware\",\"overrideDefaultValue\":\"enabled\",\"tabs\":[\"main\"],\"category\":\"hardware\",\"sdlHelp\":{\"tooltip\":\"Click for more Information\",\"url\":\"v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true\"}}],\"PWMAOE\":[{\"setting\":\"PWMOE0\",\"name\":\"pwmoe0Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 1\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]},{\"setting\":\"PWMOE1\",\"name\":\"pwmoe1Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 2\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]},{\"setting\":\"PWMOE2\",\"name\":\"pwmoe2Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 3\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]},{\"setting\":\"PWMOE3\",\"name\":\"pwmoe3Pwmaoe\",\"category\":\"hardware\",\"description\":\"Enable Additional Output 4\",\"type\":\"boolean\",\"group\":\"additional\",\"tabs\":[\"main\"]}],\"PWMDCH\":[{\"setting\":\"PWMDCH\",\"name\":\"pwmdchPwmdch\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}],\"PWMDCL\":[{\"setting\":\"PWMDCL\",\"name\":\"pwmdclPwmdcl\",\"description\":\"Insert Description Here\",\"type\":\"string\",\"group\":\"hardware\",\"tabs\":[\"register\"],\"category\":\"hardware\"}]}}]}");
9193
9187
 
9194
9188
  /***/ }),
9195
9189