@mchp-mcc/clock-16bit-driver 1.1.1 → 1.2.1

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/reducer.js CHANGED
@@ -33471,28 +33471,65 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33471
33471
  requestedRefClockOutputFrequency_HzValidator: _this.requestedRefClockOutputFrequency_HzValidator,
33472
33472
  getCustomUiErrors: _this.getCustomUiErrors,
33473
33473
  "clock-16bit-drv-interface_payloads": _this.getClockApplicationInterfacePayload,
33474
+ "clock-16bit-drv-interface_payload": _this.getDefaultClockApplicationInterfacePayload,
33474
33475
  importName: _this.friendlyImportName,
33475
33476
  exportName: _this.friendlyExportName
33476
33477
  };
33477
33478
  });
33478
33479
 
33480
+ _defineProperty(this, "getFamilyName", function () {
33481
+ var _this$dataModel, _this$dataModel$getIm, _this$dataModel$getIm2;
33482
+
33483
+ var deviceFamilyName = "";
33484
+ var deviceMetaData = (_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : (_this$dataModel$getIm = _this$dataModel.getImports()) === null || _this$dataModel$getIm === void 0 ? void 0 : (_this$dataModel$getIm2 = _this$dataModel$getIm.device_meta) === null || _this$dataModel$getIm2 === void 0 ? void 0 : _this$dataModel$getIm2.payload;
33485
+
33486
+ if (deviceMetaData) {
33487
+ deviceFamilyName = deviceMetaData === null || deviceMetaData === void 0 ? void 0 : deviceMetaData.familyName;
33488
+ }
33489
+
33490
+ return deviceFamilyName;
33491
+ });
33492
+
33493
+ _defineProperty(this, "isSecondaryDevice", function () {
33494
+ var _this$getModel$getImp, _this$getModel, _this$getModel$getImp2, _this$getModel$getImp3, _this$getModel$getImp4;
33495
+
33496
+ var deviceFamilyName = _this.getFamilyName();
33497
+
33498
+ var hasSecondaryCoreFlashSupport = (_this$getModel$getImp = (_this$getModel = _this.getModel()) === null || _this$getModel === void 0 ? void 0 : (_this$getModel$getImp2 = _this$getModel.getImports()) === null || _this$getModel$getImp2 === void 0 ? void 0 : (_this$getModel$getImp3 = _this$getModel$getImp2.device_meta) === null || _this$getModel$getImp3 === void 0 ? void 0 : (_this$getModel$getImp4 = _this$getModel$getImp3.payload) === null || _this$getModel$getImp4 === void 0 ? void 0 : _this$getModel$getImp4.hasSecondaryCoreFlashSupport) !== null && _this$getModel$getImp !== void 0 ? _this$getModel$getImp : false;
33499
+ /*
33500
+ Device name ends with "S" followed by a digit.
33501
+ The second part of the condition is for devices like Centaurus which have their inidividual flash.
33502
+ */
33503
+
33504
+ if (deviceFamilyName.match(/S\d$/) && !hasSecondaryCoreFlashSupport) {
33505
+ return true;
33506
+ }
33507
+
33508
+ return false;
33509
+ });
33510
+
33479
33511
  _defineProperty(this, "isComponentEnabled", function (componentName) {
33480
33512
  var isComponentEnabled = false;
33481
33513
 
33482
33514
  if (componentName === COMPONENT_REF_CLOCK_SOURCE || componentName === COMPONENT_REQUESTED_REF_CLOCK_OUTPUT_FREQUENCY) {
33483
- var _this$dataModel;
33515
+ var _this$dataModel2;
33484
33516
 
33485
- if (((_this$dataModel = _this.dataModel) === null || _this$dataModel === void 0 ? void 0 : _this$dataModel.getComponentValue(COMPONENT_REF_CLOCK_ENABLE)) === true) {
33517
+ if (((_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : _this$dataModel2.getComponentValue(COMPONENT_REF_CLOCK_ENABLE)) === true) {
33486
33518
  isComponentEnabled = true;
33487
33519
  }
33488
33520
  } else if (componentName === COMPONENT_REF_CLOCK_ENABLE || componentName === COMPONENT_MAIN_CLOCK_SOURCE || componentName === COMPONENT_MAIN_CLOCK_INPUT_FREQUENCY || componentName === COMPONENT_SET_MAX_FREQUENCY || componentName === COMPONENT_FVCO_DIVIDER || componentName === COMPONENT_AUX_CLOCK_SOURCE || componentName === COMPONENT_CANFD_CLOCK_SOURCE || componentName === COMPONENT_AFVCO_DIVIDER || componentName === COMPONENT_AUX_CLOCK_INPUT_FREQUENCY || componentName === COMPONENT_REQUESTED_AUX_CLOCK_OUTPUT_FREQUENCY) {
33489
33521
  isComponentEnabled = true;
33490
33522
  } else if (componentName === COMPONENT_REQUESTED_SYSTEM_FREQUENCY) {
33491
- var _this$dataModel2;
33523
+ var _this$dataModel3;
33492
33524
 
33493
- if (((_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : _this$dataModel2.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) === false) {
33525
+ if (((_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : _this$dataModel3.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) === false) {
33494
33526
  isComponentEnabled = true;
33495
33527
  }
33528
+ } // Checking whether Secondary Device of Dual Core is being used
33529
+
33530
+
33531
+ if (componentName === COMPONENT_MAIN_CLOCK_SOURCE && _this.isSecondaryDevice()) {
33532
+ isComponentEnabled = false;
33496
33533
  }
33497
33534
 
33498
33535
  return isComponentEnabled;
@@ -33610,19 +33647,19 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33610
33647
  });
33611
33648
 
33612
33649
  _defineProperty(this, "getMaxSystemClockFrequency", function () {
33613
- var _this$dataModel3, _this$dataModel4;
33650
+ var _this$dataModel4, _this$dataModel5;
33614
33651
 
33615
33652
  var maxSystemClockFrequency = 0;
33616
33653
 
33617
33654
  var interfaceData = _this.dataModel.getImportValue(CLOCK_16BIT_CONFIG_INTERFACE);
33618
33655
 
33619
- if (interfaceData != undefined && ((_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : _this$dataModel3.getComponentValue("mainClockSource")) != "FRC Oscillator with Postscaler") {
33656
+ if (interfaceData != undefined && ((_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : _this$dataModel4.getComponentValue("mainClockSource")) != "FRC Oscillator with Postscaler") {
33620
33657
  var _interfaceData$mainCl5, _interfaceData$mainCl6;
33621
33658
 
33622
33659
  maxSystemClockFrequency = (_interfaceData$mainCl5 = interfaceData === null || interfaceData === void 0 ? void 0 : (_interfaceData$mainCl6 = interfaceData.mainClockPayload) === null || _interfaceData$mainCl6 === void 0 ? void 0 : _interfaceData$mainCl6.maxSystemClockFrequency) !== null && _interfaceData$mainCl5 !== void 0 ? _interfaceData$mainCl5 : 0;
33623
33660
  }
33624
33661
 
33625
- if (((_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : _this$dataModel4.getComponentValue("mainClockSource")) == "FRC Oscillator with Postscaler") {
33662
+ if (((_this$dataModel5 = _this.dataModel) === null || _this$dataModel5 === void 0 ? void 0 : _this$dataModel5.getComponentValue("mainClockSource")) == "FRC Oscillator with Postscaler") {
33626
33663
  if (_this.getClockPropertiesFromPayLoad()["FRC_CLOCK"] != undefined) {
33627
33664
  var _this$getClockPropert;
33628
33665
 
@@ -33645,6 +33682,13 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33645
33682
  uiBehavior = _defineProperty({}, "ui:help", "CAN FD clock source frequency should be less than or equal to 640 MHz");
33646
33683
  break;
33647
33684
 
33685
+ case COMPONENT_MAIN_CLOCK_SOURCE:
33686
+ if (_this.shouldShowSecDeviceNotif()) {
33687
+ uiBehavior = _defineProperty({}, "ui:help", "Ensure to select ".concat(_this.dataModel.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE), " as part of Main Device also"));
33688
+ }
33689
+
33690
+ break;
33691
+
33648
33692
  default:
33649
33693
  break;
33650
33694
  }
@@ -33711,11 +33755,11 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33711
33755
  });
33712
33756
 
33713
33757
  _defineProperty(this, "isRequestedSystemFrequencyVisible", function () {
33714
- var _this$dataModel5;
33758
+ var _this$dataModel6;
33715
33759
 
33716
33760
  var visible = false;
33717
33761
 
33718
- if (((_this$dataModel5 = _this.dataModel) === null || _this$dataModel5 === void 0 ? void 0 : _this$dataModel5.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) === false) {
33762
+ if (((_this$dataModel6 = _this.dataModel) === null || _this$dataModel6 === void 0 ? void 0 : _this$dataModel6.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) === false) {
33719
33763
  var mainClockSource = _this.dataModel.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE);
33720
33764
 
33721
33765
  if (mainClockSource != undefined) {
@@ -33801,16 +33845,16 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33801
33845
  });
33802
33846
 
33803
33847
  _defineProperty(this, "getMyAlerts", function () {
33804
- var _this$dataModel7;
33848
+ var _this$dataModel8;
33805
33849
 
33806
33850
  var alerts = [];
33807
33851
 
33808
33852
  if (_this.isCanfdClockSupported() && _this.getCanfdClockRequestList()) {
33809
- var _this$dataModel6;
33853
+ var _this$dataModel7;
33810
33854
 
33811
33855
  var canfdClockSource = _this.dataModel.getComponentValue(COMPONENT_CANFD_CLOCK_SOURCE);
33812
33856
 
33813
- var calculatedCanFdClockSrcFreq = (_this$dataModel6 = _this.dataModel) === null || _this$dataModel6 === void 0 ? void 0 : _this$dataModel6.getComponentValue("calculatedCanfdOutputFrequency_Hz");
33857
+ var calculatedCanFdClockSrcFreq = (_this$dataModel7 = _this.dataModel) === null || _this$dataModel7 === void 0 ? void 0 : _this$dataModel7.getComponentValue("calculatedCanfdOutputFrequency_Hz");
33814
33858
 
33815
33859
  if (calculatedCanFdClockSrcFreq && calculatedCanFdClockSrcFreq != "0.00 kHz") {
33816
33860
  var canClkFreqVal = _this.getCalculatedCanfdOutputFrequency_Hz();
@@ -33846,10 +33890,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33846
33890
  }
33847
33891
  }
33848
33892
 
33849
- if ((_this$dataModel7 = _this.dataModel) === null || _this$dataModel7 === void 0 ? void 0 : _this$dataModel7.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) {
33850
- var _this$dataModel8;
33893
+ if ((_this$dataModel8 = _this.dataModel) === null || _this$dataModel8 === void 0 ? void 0 : _this$dataModel8.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) {
33894
+ var _this$dataModel9;
33851
33895
 
33852
- var mainClockSource = (_this$dataModel8 = _this.dataModel) === null || _this$dataModel8 === void 0 ? void 0 : _this$dataModel8.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE);
33896
+ var mainClockSource = (_this$dataModel9 = _this.dataModel) === null || _this$dataModel9 === void 0 ? void 0 : _this$dataModel9.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE);
33853
33897
 
33854
33898
  if (mainClockSource != undefined && (mainClockSource === null || mainClockSource === void 0 ? void 0 : mainClockSource.indexOf(PLL)) < 0) {
33855
33899
  alerts.push({
@@ -33859,9 +33903,32 @@ var MyDerivedData = function MyDerivedData(dataModel) {
33859
33903
  }
33860
33904
  }
33861
33905
 
33906
+ if (_this.shouldShowSecDeviceNotif()) {
33907
+ var _this$dataModel10, _this$dataModel11;
33908
+
33909
+ alerts.push({
33910
+ type: _microchip_scf_common_lib_Processor__WEBPACK_IMPORTED_MODULE_0__["AlertTypes"].Hint,
33911
+ text: "Ensure to select ".concat((_this$dataModel10 = _this.dataModel) === null || _this$dataModel10 === void 0 ? void 0 : _this$dataModel10.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE), " as clock source for the Main Device with frequency ").concat((_this$dataModel11 = _this.dataModel) === null || _this$dataModel11 === void 0 ? void 0 : _this$dataModel11.getComponentValue(COMPONENT_MAIN_CLOCK_INPUT_FREQUENCY), "Hz")
33912
+ });
33913
+ }
33914
+
33862
33915
  return alerts;
33863
33916
  });
33864
33917
 
33918
+ _defineProperty(this, "shouldShowSecDeviceNotif", function () {
33919
+ var deviceFamilyName = _this.getFamilyName();
33920
+
33921
+ if (deviceFamilyName.match(/S\d$/)) {
33922
+ var _this$dataModel12, _this$dataModel13, _this$dataModel14, _this$dataModel15;
33923
+
33924
+ if (((_this$dataModel12 = _this.dataModel) === null || _this$dataModel12 === void 0 ? void 0 : _this$dataModel12.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE)) === "Primary Oscillator" || ((_this$dataModel13 = _this.dataModel) === null || _this$dataModel13 === void 0 ? void 0 : _this$dataModel13.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE)) === "Primary Oscillator with PLL" || ((_this$dataModel14 = _this.dataModel) === null || _this$dataModel14 === void 0 ? void 0 : _this$dataModel14.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE)) === "External Oscillator" || ((_this$dataModel15 = _this.dataModel) === null || _this$dataModel15 === void 0 ? void 0 : _this$dataModel15.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE)) === "External Oscillator with PLL") {
33925
+ return true;
33926
+ }
33927
+ }
33928
+
33929
+ return false;
33930
+ });
33931
+
33865
33932
  _defineProperty(this, "calculatedFunction", function () {
33866
33933
  return;
33867
33934
  });
@@ -34453,9 +34520,9 @@ var MyDerivedData = function MyDerivedData(dataModel) {
34453
34520
  });
34454
34521
 
34455
34522
  _defineProperty(this, "canfdClockArg", function () {
34456
- var _this$dataModel$getSt, _this$dataModel9, _this$dataModel9$getS, _this$dataModel9$getS2, _this$dataModel9$getS3;
34523
+ var _this$dataModel$getSt, _this$dataModel16, _this$dataModel16$get, _this$dataModel16$get2, _this$dataModel16$get3;
34457
34524
 
34458
- var canClock = (_this$dataModel$getSt = (_this$dataModel9 = _this.dataModel) === null || _this$dataModel9 === void 0 ? void 0 : (_this$dataModel9$getS = _this$dataModel9.getState()) === null || _this$dataModel9$getS === void 0 ? void 0 : (_this$dataModel9$getS2 = _this$dataModel9$getS.main) === null || _this$dataModel9$getS2 === void 0 ? void 0 : (_this$dataModel9$getS3 = _this$dataModel9$getS2.canfdClock) === null || _this$dataModel9$getS3 === void 0 ? void 0 : _this$dataModel9$getS3.canfdClockSource) !== null && _this$dataModel$getSt !== void 0 ? _this$dataModel$getSt : "FVCO/4";
34525
+ var canClock = (_this$dataModel$getSt = (_this$dataModel16 = _this.dataModel) === null || _this$dataModel16 === void 0 ? void 0 : (_this$dataModel16$get = _this$dataModel16.getState()) === null || _this$dataModel16$get === void 0 ? void 0 : (_this$dataModel16$get2 = _this$dataModel16$get.main) === null || _this$dataModel16$get2 === void 0 ? void 0 : (_this$dataModel16$get3 = _this$dataModel16$get2.canfdClock) === null || _this$dataModel16$get3 === void 0 ? void 0 : _this$dataModel16$get3.canfdClockSource) !== null && _this$dataModel$getSt !== void 0 ? _this$dataModel$getSt : "FVCO/4";
34459
34526
  return {
34460
34527
  canfdClockSource: canClock,
34461
34528
  requestedCanfdClockOutputFrequency_Hz: _this.getRequestedCanfdClockFreq()
@@ -34467,10 +34534,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
34467
34534
  });
34468
34535
 
34469
34536
  _defineProperty(this, "getCanfdClockSrcFreq", function () {
34470
- var _this$dataModel10, _this$dataModel10$get, _this$dataModel$getCo, _this$dataModel11;
34537
+ var _this$dataModel17, _this$dataModel17$get, _this$dataModel$getCo, _this$dataModel18;
34471
34538
 
34472
- var interfaceData = (_this$dataModel10 = _this.dataModel) === null || _this$dataModel10 === void 0 ? void 0 : (_this$dataModel10$get = _this$dataModel10.getImportValue("clock_16bit_config_interface")) === null || _this$dataModel10$get === void 0 ? void 0 : _this$dataModel10$get.componentFrequenciesPayload;
34473
- var canClkSrc = (_this$dataModel$getCo = (_this$dataModel11 = _this.dataModel) === null || _this$dataModel11 === void 0 ? void 0 : _this$dataModel11.getComponentValue("canfdClockSource")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "FVCO/4";
34539
+ var interfaceData = (_this$dataModel17 = _this.dataModel) === null || _this$dataModel17 === void 0 ? void 0 : (_this$dataModel17$get = _this$dataModel17.getImportValue("clock_16bit_config_interface")) === null || _this$dataModel17$get === void 0 ? void 0 : _this$dataModel17$get.componentFrequenciesPayload;
34540
+ var canClkSrc = (_this$dataModel$getCo = (_this$dataModel18 = _this.dataModel) === null || _this$dataModel18 === void 0 ? void 0 : _this$dataModel18.getComponentValue("canfdClockSource")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "FVCO/4";
34474
34541
  var canClkFreq = Object(_Util__WEBPACK_IMPORTED_MODULE_3__["getCanfdClockFrequency"])(canClkSrc, interfaceData);
34475
34542
  return Object(_Util__WEBPACK_IMPORTED_MODULE_3__["getCanClkDivFreq"])(canClkSrc, canClkFreq);
34476
34543
  });
@@ -34644,6 +34711,25 @@ var MyDerivedData = function MyDerivedData(dataModel) {
34644
34711
  return clockApplicationInterfacePayloads;
34645
34712
  });
34646
34713
 
34714
+ _defineProperty(this, "getDefaultClockApplicationInterfacePayload", function () {
34715
+ var interfaceData = _this.dataModel.getImportValue(CLOCK_16BIT_CONFIG_INTERFACE);
34716
+
34717
+ if (interfaceData != undefined) {
34718
+ return {
34719
+ mainClockPayload: interfaceData.mainClockPayload,
34720
+ hasUSB: interfaceData.hasUSB,
34721
+ hasAuxClock: interfaceData.hasAuxClock,
34722
+ hasRefClock: interfaceData.hasRefClock,
34723
+ hasCanfdClock: interfaceData.hasCanfdClock,
34724
+ hasSecondaryOscillator: interfaceData.hasSecondaryOscillator,
34725
+ isSecondaryOscillatorEnabled: interfaceData.isSecondaryOscillatorEnabled,
34726
+ auxClockPayload: interfaceData.auxClockPayload,
34727
+ refClockPayload: interfaceData.refClockPayload,
34728
+ canfdClockPayload: interfaceData.canfdClockPayload
34729
+ };
34730
+ }
34731
+ });
34732
+
34647
34733
  _defineProperty(this, "friendlyExportName", function (exportKey) {
34648
34734
  var exportName;
34649
34735
 
@@ -34928,7 +35014,7 @@ var updateValue = function updateValue(key, existingValue, componentName, newVal
34928
35014
 
34929
35015
  __webpack_require__(/*! core-js/es/set/index */"./node_modules/core-js/es/set/index.js");
34930
35016
  __webpack_require__(/*! core-js/es/map/index */"./node_modules/core-js/es/map/index.js");
34931
- module.exports = __webpack_require__(/*! /home/jenkins/agent/workspace/Content_clock-16bit-driver_1.1.1/src/reducer.tsx */"./src/reducer.tsx");
35017
+ module.exports = __webpack_require__(/*! /home/jenkins/agent/workspace/Content_clock-16bit-driver_1.2.1/src/reducer.tsx */"./src/reducer.tsx");
34932
35018
 
34933
35019
 
34934
35020
  /***/ })