@mchp-mcc/clock-16bit-driver 1.1.1 → 1.2.0
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/Changelog.md +10 -0
- package/Readme.md +10 -0
- package/output/autoCreator.js +71 -22
- package/output/autoCreator.js.map +1 -1
- package/output/autoProcessor.js +71 -22
- package/output/autoProcessor.js.map +1 -1
- package/output/creator.js +71 -22
- package/output/creator.js.map +1 -1
- package/output/index.html +1 -1
- package/output/main.js +1 -1
- package/output/nullPrototype.json +6 -0
- package/output/processor.js +71 -22
- package/output/processor.js.map +1 -1
- package/output/reducer.js +70 -21
- package/output/reducer.js.map +1 -1
- package/package.json +12 -6
- package/src/DerivedData.ts +55 -7
- package/src/moduleConfig.json +8 -0
- package/tests/itf/Utils.ts +52 -0
- package/tests/itf/clock.test.ts +1165 -0
package/output/reducer.js
CHANGED
@@ -33471,28 +33471,58 @@ 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, "getDeviceName", function () {
|
33481
|
+
var _this$dataModel, _this$dataModel$getIm, _this$dataModel$getIm2;
|
33482
|
+
|
33483
|
+
var deviceName = "";
|
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
|
+
deviceName = deviceMetaData === null || deviceMetaData === void 0 ? void 0 : deviceMetaData.deviceName;
|
33488
|
+
}
|
33489
|
+
|
33490
|
+
return deviceName;
|
33491
|
+
});
|
33492
|
+
|
33493
|
+
_defineProperty(this, "isSecondaryDevice", function () {
|
33494
|
+
var deviceName = _this.getDeviceName(); // device name ends with "S" followed by a digit
|
33495
|
+
|
33496
|
+
|
33497
|
+
if (deviceName.match(/S\d$/)) {
|
33498
|
+
return true;
|
33499
|
+
}
|
33500
|
+
|
33501
|
+
return false;
|
33502
|
+
});
|
33503
|
+
|
33479
33504
|
_defineProperty(this, "isComponentEnabled", function (componentName) {
|
33480
33505
|
var isComponentEnabled = false;
|
33481
33506
|
|
33482
33507
|
if (componentName === COMPONENT_REF_CLOCK_SOURCE || componentName === COMPONENT_REQUESTED_REF_CLOCK_OUTPUT_FREQUENCY) {
|
33483
|
-
var _this$
|
33508
|
+
var _this$dataModel2;
|
33484
33509
|
|
33485
|
-
if (((_this$
|
33510
|
+
if (((_this$dataModel2 = _this.dataModel) === null || _this$dataModel2 === void 0 ? void 0 : _this$dataModel2.getComponentValue(COMPONENT_REF_CLOCK_ENABLE)) === true) {
|
33486
33511
|
isComponentEnabled = true;
|
33487
33512
|
}
|
33488
33513
|
} 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
33514
|
isComponentEnabled = true;
|
33490
33515
|
} else if (componentName === COMPONENT_REQUESTED_SYSTEM_FREQUENCY) {
|
33491
|
-
var _this$
|
33516
|
+
var _this$dataModel3;
|
33492
33517
|
|
33493
|
-
if (((_this$
|
33518
|
+
if (((_this$dataModel3 = _this.dataModel) === null || _this$dataModel3 === void 0 ? void 0 : _this$dataModel3.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) === false) {
|
33494
33519
|
isComponentEnabled = true;
|
33495
33520
|
}
|
33521
|
+
} // Checking whether Secondary Device of Dual Core is being used
|
33522
|
+
|
33523
|
+
|
33524
|
+
if (componentName === COMPONENT_MAIN_CLOCK_SOURCE && _this.isSecondaryDevice()) {
|
33525
|
+
isComponentEnabled = false;
|
33496
33526
|
}
|
33497
33527
|
|
33498
33528
|
return isComponentEnabled;
|
@@ -33610,19 +33640,19 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
33610
33640
|
});
|
33611
33641
|
|
33612
33642
|
_defineProperty(this, "getMaxSystemClockFrequency", function () {
|
33613
|
-
var _this$
|
33643
|
+
var _this$dataModel4, _this$dataModel5;
|
33614
33644
|
|
33615
33645
|
var maxSystemClockFrequency = 0;
|
33616
33646
|
|
33617
33647
|
var interfaceData = _this.dataModel.getImportValue(CLOCK_16BIT_CONFIG_INTERFACE);
|
33618
33648
|
|
33619
|
-
if (interfaceData != undefined && ((_this$
|
33649
|
+
if (interfaceData != undefined && ((_this$dataModel4 = _this.dataModel) === null || _this$dataModel4 === void 0 ? void 0 : _this$dataModel4.getComponentValue("mainClockSource")) != "FRC Oscillator with Postscaler") {
|
33620
33650
|
var _interfaceData$mainCl5, _interfaceData$mainCl6;
|
33621
33651
|
|
33622
33652
|
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
33653
|
}
|
33624
33654
|
|
33625
|
-
if (((_this$
|
33655
|
+
if (((_this$dataModel5 = _this.dataModel) === null || _this$dataModel5 === void 0 ? void 0 : _this$dataModel5.getComponentValue("mainClockSource")) == "FRC Oscillator with Postscaler") {
|
33626
33656
|
if (_this.getClockPropertiesFromPayLoad()["FRC_CLOCK"] != undefined) {
|
33627
33657
|
var _this$getClockPropert;
|
33628
33658
|
|
@@ -33711,11 +33741,11 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
33711
33741
|
});
|
33712
33742
|
|
33713
33743
|
_defineProperty(this, "isRequestedSystemFrequencyVisible", function () {
|
33714
|
-
var _this$
|
33744
|
+
var _this$dataModel6;
|
33715
33745
|
|
33716
33746
|
var visible = false;
|
33717
33747
|
|
33718
|
-
if (((_this$
|
33748
|
+
if (((_this$dataModel6 = _this.dataModel) === null || _this$dataModel6 === void 0 ? void 0 : _this$dataModel6.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) === false) {
|
33719
33749
|
var mainClockSource = _this.dataModel.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE);
|
33720
33750
|
|
33721
33751
|
if (mainClockSource != undefined) {
|
@@ -33801,16 +33831,16 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
33801
33831
|
});
|
33802
33832
|
|
33803
33833
|
_defineProperty(this, "getMyAlerts", function () {
|
33804
|
-
var _this$
|
33834
|
+
var _this$dataModel8;
|
33805
33835
|
|
33806
33836
|
var alerts = [];
|
33807
33837
|
|
33808
33838
|
if (_this.isCanfdClockSupported() && _this.getCanfdClockRequestList()) {
|
33809
|
-
var _this$
|
33839
|
+
var _this$dataModel7;
|
33810
33840
|
|
33811
33841
|
var canfdClockSource = _this.dataModel.getComponentValue(COMPONENT_CANFD_CLOCK_SOURCE);
|
33812
33842
|
|
33813
|
-
var calculatedCanFdClockSrcFreq = (_this$
|
33843
|
+
var calculatedCanFdClockSrcFreq = (_this$dataModel7 = _this.dataModel) === null || _this$dataModel7 === void 0 ? void 0 : _this$dataModel7.getComponentValue("calculatedCanfdOutputFrequency_Hz");
|
33814
33844
|
|
33815
33845
|
if (calculatedCanFdClockSrcFreq && calculatedCanFdClockSrcFreq != "0.00 kHz") {
|
33816
33846
|
var canClkFreqVal = _this.getCalculatedCanfdOutputFrequency_Hz();
|
@@ -33846,10 +33876,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
33846
33876
|
}
|
33847
33877
|
}
|
33848
33878
|
|
33849
|
-
if ((_this$
|
33850
|
-
var _this$
|
33879
|
+
if ((_this$dataModel8 = _this.dataModel) === null || _this$dataModel8 === void 0 ? void 0 : _this$dataModel8.getComponentValue(COMPONENT_SET_MAX_FREQUENCY)) {
|
33880
|
+
var _this$dataModel9;
|
33851
33881
|
|
33852
|
-
var mainClockSource = (_this$
|
33882
|
+
var mainClockSource = (_this$dataModel9 = _this.dataModel) === null || _this$dataModel9 === void 0 ? void 0 : _this$dataModel9.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE);
|
33853
33883
|
|
33854
33884
|
if (mainClockSource != undefined && (mainClockSource === null || mainClockSource === void 0 ? void 0 : mainClockSource.indexOf(PLL)) < 0) {
|
33855
33885
|
alerts.push({
|
@@ -34453,9 +34483,9 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
34453
34483
|
});
|
34454
34484
|
|
34455
34485
|
_defineProperty(this, "canfdClockArg", function () {
|
34456
|
-
var _this$dataModel$getSt, _this$
|
34486
|
+
var _this$dataModel$getSt, _this$dataModel10, _this$dataModel10$get, _this$dataModel10$get2, _this$dataModel10$get3;
|
34457
34487
|
|
34458
|
-
var canClock = (_this$dataModel$getSt = (_this$
|
34488
|
+
var canClock = (_this$dataModel$getSt = (_this$dataModel10 = _this.dataModel) === null || _this$dataModel10 === void 0 ? void 0 : (_this$dataModel10$get = _this$dataModel10.getState()) === null || _this$dataModel10$get === void 0 ? void 0 : (_this$dataModel10$get2 = _this$dataModel10$get.main) === null || _this$dataModel10$get2 === void 0 ? void 0 : (_this$dataModel10$get3 = _this$dataModel10$get2.canfdClock) === null || _this$dataModel10$get3 === void 0 ? void 0 : _this$dataModel10$get3.canfdClockSource) !== null && _this$dataModel$getSt !== void 0 ? _this$dataModel$getSt : "FVCO/4";
|
34459
34489
|
return {
|
34460
34490
|
canfdClockSource: canClock,
|
34461
34491
|
requestedCanfdClockOutputFrequency_Hz: _this.getRequestedCanfdClockFreq()
|
@@ -34467,10 +34497,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
34467
34497
|
});
|
34468
34498
|
|
34469
34499
|
_defineProperty(this, "getCanfdClockSrcFreq", function () {
|
34470
|
-
var _this$
|
34500
|
+
var _this$dataModel11, _this$dataModel11$get, _this$dataModel$getCo, _this$dataModel12;
|
34471
34501
|
|
34472
|
-
var interfaceData = (_this$
|
34473
|
-
var canClkSrc = (_this$dataModel$getCo = (_this$
|
34502
|
+
var interfaceData = (_this$dataModel11 = _this.dataModel) === null || _this$dataModel11 === void 0 ? void 0 : (_this$dataModel11$get = _this$dataModel11.getImportValue("clock_16bit_config_interface")) === null || _this$dataModel11$get === void 0 ? void 0 : _this$dataModel11$get.componentFrequenciesPayload;
|
34503
|
+
var canClkSrc = (_this$dataModel$getCo = (_this$dataModel12 = _this.dataModel) === null || _this$dataModel12 === void 0 ? void 0 : _this$dataModel12.getComponentValue("canfdClockSource")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "FVCO/4";
|
34474
34504
|
var canClkFreq = Object(_Util__WEBPACK_IMPORTED_MODULE_3__["getCanfdClockFrequency"])(canClkSrc, interfaceData);
|
34475
34505
|
return Object(_Util__WEBPACK_IMPORTED_MODULE_3__["getCanClkDivFreq"])(canClkSrc, canClkFreq);
|
34476
34506
|
});
|
@@ -34644,6 +34674,25 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
34644
34674
|
return clockApplicationInterfacePayloads;
|
34645
34675
|
});
|
34646
34676
|
|
34677
|
+
_defineProperty(this, "getDefaultClockApplicationInterfacePayload", function () {
|
34678
|
+
var interfaceData = _this.dataModel.getImportValue(CLOCK_16BIT_CONFIG_INTERFACE);
|
34679
|
+
|
34680
|
+
if (interfaceData != undefined) {
|
34681
|
+
return {
|
34682
|
+
mainClockPayload: interfaceData.mainClockPayload,
|
34683
|
+
hasUSB: interfaceData.hasUSB,
|
34684
|
+
hasAuxClock: interfaceData.hasAuxClock,
|
34685
|
+
hasRefClock: interfaceData.hasRefClock,
|
34686
|
+
hasCanfdClock: interfaceData.hasCanfdClock,
|
34687
|
+
hasSecondaryOscillator: interfaceData.hasSecondaryOscillator,
|
34688
|
+
isSecondaryOscillatorEnabled: interfaceData.isSecondaryOscillatorEnabled,
|
34689
|
+
auxClockPayload: interfaceData.auxClockPayload,
|
34690
|
+
refClockPayload: interfaceData.refClockPayload,
|
34691
|
+
canfdClockPayload: interfaceData.canfdClockPayload
|
34692
|
+
};
|
34693
|
+
}
|
34694
|
+
});
|
34695
|
+
|
34647
34696
|
_defineProperty(this, "friendlyExportName", function (exportKey) {
|
34648
34697
|
var exportName;
|
34649
34698
|
|
@@ -34928,7 +34977,7 @@ var updateValue = function updateValue(key, existingValue, componentName, newVal
|
|
34928
34977
|
|
34929
34978
|
__webpack_require__(/*! core-js/es/set/index */"./node_modules/core-js/es/set/index.js");
|
34930
34979
|
__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.
|
34980
|
+
module.exports = __webpack_require__(/*! /home/jenkins/agent/workspace/Content_clock-16bit-driver_1.2.0/src/reducer.tsx */"./src/reducer.tsx");
|
34932
34981
|
|
34933
34982
|
|
34934
34983
|
/***/ })
|