@mchp-mcc/scf-pic8-pwm-v2 4.2.4 → 4.2.6
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 +15 -0
- package/Readme.md +29 -44
- package/output/autoCreator.js +244 -15
- package/output/autoCreator.js.map +1 -1
- package/output/autoProcessor.js +244 -15
- package/output/autoProcessor.js.map +1 -1
- package/output/creator.js +244 -15
- package/output/creator.js.map +1 -1
- package/output/processor.js +244 -15
- package/output/processor.js.map +1 -1
- package/output/pwm-v2.c.ftl +1 -1
- package/output/pwm-v2.h.ftl +7 -7
- package/package.json +15 -7
- package/src/DerivedData.test.ts +627 -0
- package/src/DerivedData.ts +84 -6
- package/src/GeneratorModel.test.tsx +69 -0
- package/src/PinsLogic.test.ts +155 -0
- package/src/PwmCalculator.test.tsx +56 -0
- package/src/interfaces/pwm_general_parameters.test.tsx +40 -0
- package/src/moduleConfig.json +30 -1
package/output/autoProcessor.js
CHANGED
|
@@ -823,6 +823,63 @@ var getModuleConfigFromFile = function getModuleConfigFromFile() {
|
|
|
823
823
|
|
|
824
824
|
/***/ }),
|
|
825
825
|
|
|
826
|
+
/***/ "./generated_module/src/pins/PCPHelper.ts":
|
|
827
|
+
/*!************************************************!*\
|
|
828
|
+
!*** ./generated_module/src/pins/PCPHelper.ts ***!
|
|
829
|
+
\************************************************/
|
|
830
|
+
/*! exports provided: getPinsData, getPinsLogic */
|
|
831
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
832
|
+
|
|
833
|
+
"use strict";
|
|
834
|
+
__webpack_require__.r(__webpack_exports__);
|
|
835
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsData", function() { return getPinsData; });
|
|
836
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogic", function() { return getPinsLogic; });
|
|
837
|
+
/* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../getUserData */ "./generated_module/src/getUserData.ts");
|
|
838
|
+
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; }
|
|
839
|
+
|
|
840
|
+
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; }
|
|
841
|
+
|
|
842
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
843
|
+
|
|
844
|
+
|
|
845
|
+
|
|
846
|
+
var mockPinsLogic = function mockPinsLogic(getPinsData) {
|
|
847
|
+
var getCompletePinData = function getCompletePinData(appModel) {
|
|
848
|
+
return {};
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
var getRowData = function getRowData(appModel, rowData) {
|
|
852
|
+
return rowData;
|
|
853
|
+
};
|
|
854
|
+
|
|
855
|
+
return {
|
|
856
|
+
getCompletePinData: getCompletePinData,
|
|
857
|
+
getRowData: getRowData,
|
|
858
|
+
getPinsData: getPinsData
|
|
859
|
+
};
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
var getPinsData = function getPinsData() {
|
|
863
|
+
var _getPinsDataFromFile;
|
|
864
|
+
|
|
865
|
+
return (_getPinsDataFromFile = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsDataFromFile"])()) !== null && _getPinsDataFromFile !== void 0 ? _getPinsDataFromFile : {
|
|
866
|
+
rows: []
|
|
867
|
+
};
|
|
868
|
+
};
|
|
869
|
+
var getPinsLogic = function getPinsLogic() {
|
|
870
|
+
var pinsLogic = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsLogicFromFile"])();
|
|
871
|
+
|
|
872
|
+
if (pinsLogic) {
|
|
873
|
+
return _objectSpread(_objectSpread({}, pinsLogic), {}, {
|
|
874
|
+
getPinsData: getPinsData
|
|
875
|
+
});
|
|
876
|
+
} else {
|
|
877
|
+
return mockPinsLogic(getPinsData);
|
|
878
|
+
}
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
/***/ }),
|
|
882
|
+
|
|
826
883
|
/***/ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js":
|
|
827
884
|
/*!**************************************************************************************!*\
|
|
828
885
|
!*** ./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js ***!
|
|
@@ -1447,6 +1504,84 @@ exports.getInterfaceName = helpers_1.getInterfaceName;
|
|
|
1447
1504
|
exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
|
|
1448
1505
|
|
|
1449
1506
|
|
|
1507
|
+
/***/ }),
|
|
1508
|
+
|
|
1509
|
+
/***/ "./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js":
|
|
1510
|
+
/*!*************************************************************************************!*\
|
|
1511
|
+
!*** ./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js ***!
|
|
1512
|
+
\*************************************************************************************/
|
|
1513
|
+
/*! no static exports found */
|
|
1514
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1515
|
+
|
|
1516
|
+
"use strict";
|
|
1517
|
+
|
|
1518
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1519
|
+
exports.getCFunctionValidator = void 0;
|
|
1520
|
+
var cKeywords = [
|
|
1521
|
+
"auto",
|
|
1522
|
+
"const",
|
|
1523
|
+
"double",
|
|
1524
|
+
"float",
|
|
1525
|
+
"int",
|
|
1526
|
+
"short",
|
|
1527
|
+
"struct",
|
|
1528
|
+
"unsigned",
|
|
1529
|
+
"break",
|
|
1530
|
+
"continue",
|
|
1531
|
+
"else",
|
|
1532
|
+
"for",
|
|
1533
|
+
"long",
|
|
1534
|
+
"signed",
|
|
1535
|
+
"switch",
|
|
1536
|
+
"void",
|
|
1537
|
+
"case",
|
|
1538
|
+
"default",
|
|
1539
|
+
"enum",
|
|
1540
|
+
"goto",
|
|
1541
|
+
"register",
|
|
1542
|
+
"sizeof",
|
|
1543
|
+
"typedef",
|
|
1544
|
+
"volatile",
|
|
1545
|
+
"char",
|
|
1546
|
+
"do",
|
|
1547
|
+
"extern",
|
|
1548
|
+
"if",
|
|
1549
|
+
"return",
|
|
1550
|
+
"static",
|
|
1551
|
+
"union",
|
|
1552
|
+
"while",
|
|
1553
|
+
];
|
|
1554
|
+
var functionPattern = "(?=^([A-Za-z]\\S|_)\\w+$)";
|
|
1555
|
+
var errorMessage = "Must be valid C function syntax.";
|
|
1556
|
+
var doNotMatchKeywordsRegex = function () {
|
|
1557
|
+
return "(^(?!" + cKeywords.join("|") + ")).*";
|
|
1558
|
+
};
|
|
1559
|
+
var result = doNotMatchKeywordsRegex();
|
|
1560
|
+
var pattern = {
|
|
1561
|
+
pattern: functionPattern + result,
|
|
1562
|
+
};
|
|
1563
|
+
exports.getCFunctionValidator = function () { return ({
|
|
1564
|
+
getRjsfValidation: function () { return pattern; },
|
|
1565
|
+
getCustomErrorMessage: function () { return errorMessage; },
|
|
1566
|
+
}); };
|
|
1567
|
+
|
|
1568
|
+
|
|
1569
|
+
/***/ }),
|
|
1570
|
+
|
|
1571
|
+
/***/ "./node_modules/@microchip/scf-validators/lib/index.js":
|
|
1572
|
+
/*!*************************************************************!*\
|
|
1573
|
+
!*** ./node_modules/@microchip/scf-validators/lib/index.js ***!
|
|
1574
|
+
\*************************************************************/
|
|
1575
|
+
/*! no static exports found */
|
|
1576
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
1577
|
+
|
|
1578
|
+
"use strict";
|
|
1579
|
+
|
|
1580
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1581
|
+
var CFunctionValidator_1 = __webpack_require__(/*! ./Validators/CFunctionValidator */ "./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js");
|
|
1582
|
+
Object.defineProperty(exports, "getCFunctionValidator", { enumerable: true, get: function () { return CFunctionValidator_1.getCFunctionValidator; } });
|
|
1583
|
+
|
|
1584
|
+
|
|
1450
1585
|
/***/ }),
|
|
1451
1586
|
|
|
1452
1587
|
/***/ "./node_modules/core-js/es/math/log10.js":
|
|
@@ -2597,6 +2732,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2597
2732
|
/* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.tsx");
|
|
2598
2733
|
/* harmony import */ var _microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @microchip/scf-automodule-impl/lib/autoModule/ContextualHelp */ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js");
|
|
2599
2734
|
/* harmony import */ var _microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_automodule_impl_lib_autoModule_ContextualHelp__WEBPACK_IMPORTED_MODULE_4__);
|
|
2735
|
+
/* 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");
|
|
2736
|
+
/* 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");
|
|
2737
|
+
/* harmony import */ var _microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__);
|
|
2600
2738
|
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; } } }; }
|
|
2601
2739
|
|
|
2602
2740
|
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); }
|
|
@@ -2612,6 +2750,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
2612
2750
|
|
|
2613
2751
|
|
|
2614
2752
|
|
|
2753
|
+
|
|
2754
|
+
|
|
2615
2755
|
var getDerivedData = function getDerivedData(dataModel) {
|
|
2616
2756
|
if (dataModel) {
|
|
2617
2757
|
return new MyDerivedData(dataModel);
|
|
@@ -2642,6 +2782,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2642
2782
|
|
|
2643
2783
|
_defineProperty(this, "pwmCalculator", void 0);
|
|
2644
2784
|
|
|
2785
|
+
_defineProperty(this, "cValidator", Object(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__["getCFunctionValidator"])());
|
|
2786
|
+
|
|
2645
2787
|
_defineProperty(this, "getPwmCalculator", function () {
|
|
2646
2788
|
if (!_this.pwmCalculator) {
|
|
2647
2789
|
var _this$dataModel$getIm, _this$dataModel$getIm2;
|
|
@@ -2679,7 +2821,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2679
2821
|
pwmResolution: function pwmResolution() {
|
|
2680
2822
|
return _this.getPwmCalculator().getPwmResolution();
|
|
2681
2823
|
},
|
|
2682
|
-
ctselCcptmrs1: _this.
|
|
2824
|
+
ctselCcptmrs1: _this.ctselTimerSetting,
|
|
2825
|
+
ctselPwmtmrs: _this.ctselTimerSetting,
|
|
2683
2826
|
pwmdchPwmdch: function pwmdchPwmdch() {
|
|
2684
2827
|
return Number(_this.dataModel.getComponentValue("pwmdcValue")) >> 2;
|
|
2685
2828
|
},
|
|
@@ -2689,10 +2832,23 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2689
2832
|
templateData: function templateData() {
|
|
2690
2833
|
return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getGeneratorModel"])(_this.dataModel);
|
|
2691
2834
|
},
|
|
2692
|
-
getHelpUrl: _this.getSdlHelpOverride
|
|
2835
|
+
getHelpUrl: _this.getSdlHelpOverride,
|
|
2836
|
+
filterImports: _this.filterImports,
|
|
2837
|
+
getPinsLogic: _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_5__["getPinsLogic"],
|
|
2838
|
+
importName: _this.friendlyImportName,
|
|
2839
|
+
componentNameValidator: _this.componentNameValidator,
|
|
2840
|
+
getCustomUiErrors: _this.getCustomUiErrors
|
|
2693
2841
|
};
|
|
2694
2842
|
});
|
|
2695
2843
|
|
|
2844
|
+
_defineProperty(this, "friendlyImportName", function (importKey) {
|
|
2845
|
+
if (importKey === "scf_pic8_pwm_v2") return "PWM Hardware";
|
|
2846
|
+
if (importKey === "osc_clocks") return "Oscillator Clock";
|
|
2847
|
+
if (importKey === "initializer_system") return "system.c Initialize()";
|
|
2848
|
+
if (importKey === "pin_standard") return "Pins";
|
|
2849
|
+
return importKey;
|
|
2850
|
+
});
|
|
2851
|
+
|
|
2696
2852
|
_defineProperty(this, "overrideDefaultValues", function (componentName) {
|
|
2697
2853
|
var _this$dataModel$getHa2;
|
|
2698
2854
|
|
|
@@ -2705,14 +2861,34 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2705
2861
|
}
|
|
2706
2862
|
});
|
|
2707
2863
|
|
|
2864
|
+
_defineProperty(this, "componentNameValidator", function () {
|
|
2865
|
+
return {
|
|
2866
|
+
pattern: _this.cValidator.getRjsfValidation().pattern
|
|
2867
|
+
};
|
|
2868
|
+
});
|
|
2869
|
+
|
|
2870
|
+
_defineProperty(this, "getCustomUiErrors", function (componentName) {
|
|
2871
|
+
switch (componentName) {
|
|
2872
|
+
case "componentName":
|
|
2873
|
+
return [{
|
|
2874
|
+
name: "pattern",
|
|
2875
|
+
message: _this.cValidator.getCustomErrorMessage()
|
|
2876
|
+
}];
|
|
2877
|
+
|
|
2878
|
+
default:
|
|
2879
|
+
return undefined;
|
|
2880
|
+
}
|
|
2881
|
+
});
|
|
2882
|
+
|
|
2708
2883
|
_defineProperty(this, "overrideDefaultOptions", function (componentName) {
|
|
2709
2884
|
switch (componentName) {
|
|
2710
2885
|
case "timerSelection":
|
|
2711
2886
|
{
|
|
2712
|
-
var _this$dataModel$getPe, _this$dataModel$getPe2;
|
|
2887
|
+
var _this$dataModel$getPe, _this$dataModel$getPe2, _this$dataModel$getPe3, _this$dataModel$getPe4;
|
|
2713
2888
|
|
|
2714
2889
|
var result = [];
|
|
2715
2890
|
var CCPTMRSREG = (_this$dataModel$getPe = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$getPe === void 0 ? void 0 : (_this$dataModel$getPe2 = _this$dataModel$getPe.registers) === null || _this$dataModel$getPe2 === void 0 ? void 0 : _this$dataModel$getPe2.CCPTMRS1;
|
|
2891
|
+
var PWMTMRSREG = (_this$dataModel$getPe3 = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$getPe3 === void 0 ? void 0 : (_this$dataModel$getPe4 = _this$dataModel$getPe3.registers) === null || _this$dataModel$getPe4 === void 0 ? void 0 : _this$dataModel$getPe4.PWMTMRS;
|
|
2716
2892
|
|
|
2717
2893
|
if (CCPTMRSREG) {
|
|
2718
2894
|
var _CCPTMRSREG$settings, _CTSELSETT$options;
|
|
@@ -2737,7 +2913,37 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2737
2913
|
} finally {
|
|
2738
2914
|
_iterator.f();
|
|
2739
2915
|
}
|
|
2740
|
-
}
|
|
2916
|
+
}
|
|
2917
|
+
|
|
2918
|
+
if (PWMTMRSREG) {
|
|
2919
|
+
var _PWMTMRSREG$settings, _CTSELSETT$options2;
|
|
2920
|
+
|
|
2921
|
+
var _CTSELSETT = (_PWMTMRSREG$settings = PWMTMRSREG.settings) === null || _PWMTMRSREG$settings === void 0 ? void 0 : _PWMTMRSREG$settings.CTSEL;
|
|
2922
|
+
|
|
2923
|
+
var _iterator2 = _createForOfIteratorHelper((_CTSELSETT$options2 = _CTSELSETT === null || _CTSELSETT === void 0 ? void 0 : _CTSELSETT.options) !== null && _CTSELSETT$options2 !== void 0 ? _CTSELSETT$options2 : []),
|
|
2924
|
+
_step2;
|
|
2925
|
+
|
|
2926
|
+
try {
|
|
2927
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
2928
|
+
var _optnmatch$length2;
|
|
2929
|
+
|
|
2930
|
+
var _eachoptn = _step2.value;
|
|
2931
|
+
var _timeroptnregex = /^pwm[0-9]timer([0-9])$/i;
|
|
2932
|
+
|
|
2933
|
+
var _optnmatch = _eachoptn.alias.match(_timeroptnregex);
|
|
2934
|
+
|
|
2935
|
+
var _correctOptnName = ((_optnmatch$length2 = _optnmatch === null || _optnmatch === void 0 ? void 0 : _optnmatch.length) !== null && _optnmatch$length2 !== void 0 ? _optnmatch$length2 : 0) > 1 ? "TMR" + (_optnmatch === null || _optnmatch === void 0 ? void 0 : _optnmatch[1]) : "";
|
|
2936
|
+
|
|
2937
|
+
result.push(_correctOptnName);
|
|
2938
|
+
}
|
|
2939
|
+
} catch (err) {
|
|
2940
|
+
_iterator2.e(err);
|
|
2941
|
+
} finally {
|
|
2942
|
+
_iterator2.f();
|
|
2943
|
+
}
|
|
2944
|
+
}
|
|
2945
|
+
|
|
2946
|
+
if (!CCPTMRSREG && !PWMTMRSREG) {
|
|
2741
2947
|
result.push("TMR2");
|
|
2742
2948
|
}
|
|
2743
2949
|
|
|
@@ -2759,11 +2965,32 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2759
2965
|
return {};
|
|
2760
2966
|
});
|
|
2761
2967
|
|
|
2968
|
+
_defineProperty(this, "filterImports", function (imports) {
|
|
2969
|
+
var filteredImports = imports;
|
|
2970
|
+
var ImportKeys = ["Timer"];
|
|
2971
|
+
ImportKeys.forEach(function (importKey) {
|
|
2972
|
+
filteredImports = _this.getModel().filterImportBySetting(filteredImports, importKey, function (option) {
|
|
2973
|
+
if (option.payload !== undefined) {
|
|
2974
|
+
var _this$dataModel$getCo;
|
|
2975
|
+
|
|
2976
|
+
var rstSource = (_this$dataModel$getCo = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "disabled";
|
|
2977
|
+
var regexpNumber = /\d/;
|
|
2978
|
+
var inst = rstSource.match(regexpNumber);
|
|
2979
|
+
|
|
2980
|
+
if (rstSource.indexOf("TMR") !== -1) {
|
|
2981
|
+
return option.payload.moduleName === "TMR" + inst;
|
|
2982
|
+
}
|
|
2983
|
+
}
|
|
2984
|
+
});
|
|
2985
|
+
});
|
|
2986
|
+
return filteredImports;
|
|
2987
|
+
});
|
|
2988
|
+
|
|
2762
2989
|
_defineProperty(this, "getMyAlerts", function () {
|
|
2763
|
-
var _this$dataModel$
|
|
2990
|
+
var _this$dataModel$getCo2, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
|
|
2764
2991
|
|
|
2765
2992
|
var alerts = [];
|
|
2766
|
-
var timerSelection = (_this$dataModel$
|
|
2993
|
+
var timerSelection = (_this$dataModel$getCo2 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "";
|
|
2767
2994
|
var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
|
|
2768
2995
|
var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
|
|
2769
2996
|
|
|
@@ -2795,12 +3022,14 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2795
3022
|
|
|
2796
3023
|
_defineProperty(this, "getSdlHelpOverride", function (componentName, helpUrl) {
|
|
2797
3024
|
if (componentName === "timerSelection") {
|
|
2798
|
-
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4;
|
|
3025
|
+
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4, _this$getModel$getPer5, _this$getModel$getPer6;
|
|
2799
3026
|
|
|
2800
3027
|
if ((_this$getModel$getPer = _this.getModel().getPeripheralDescription()) === null || _this$getModel$getPer === void 0 ? void 0 : (_this$getModel$getPer2 = _this$getModel$getPer.registers) === null || _this$getModel$getPer2 === void 0 ? void 0 : _this$getModel$getPer2.CCPTMRS1) {
|
|
2801
3028
|
componentName = "ctselCcptmrs1";
|
|
2802
3029
|
} else if ((_this$getModel$getPer3 = _this.getModel().getPeripheralDescription()) === null || _this$getModel$getPer3 === void 0 ? void 0 : (_this$getModel$getPer4 = _this$getModel$getPer3.registers) === null || _this$getModel$getPer4 === void 0 ? void 0 : _this$getModel$getPer4.CCPTMRS) {
|
|
2803
3030
|
componentName = "ctselCcptmrs";
|
|
3031
|
+
} else if ((_this$getModel$getPer5 = _this.getModel().getPeripheralDescription()) === null || _this$getModel$getPer5 === void 0 ? void 0 : (_this$getModel$getPer6 = _this$getModel$getPer5.registers) === null || _this$getModel$getPer6 === void 0 ? void 0 : _this$getModel$getPer6.PWMTMRS) {
|
|
3032
|
+
componentName = "ctselPwmtmrs";
|
|
2804
3033
|
}
|
|
2805
3034
|
} else if (componentName === "dutyCycle" || componentName === "pwmdcValue") {
|
|
2806
3035
|
var _helpUrl, _this$getModel$getHar, _this$getModel$getHar2;
|
|
@@ -2812,10 +3041,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2812
3041
|
});
|
|
2813
3042
|
|
|
2814
3043
|
_defineProperty(this, "pwm_general_parameters_payload", function () {
|
|
2815
|
-
var _this$dataModel$
|
|
3044
|
+
var _this$dataModel$getCo3;
|
|
2816
3045
|
|
|
2817
3046
|
return {
|
|
2818
|
-
interfaceApi: _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"].createFirmwareApi((_this$dataModel$
|
|
3047
|
+
interfaceApi: _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"].createFirmwareApi((_this$dataModel$getCo3 = _this.dataModel.getComponentValue("componentName")) !== null && _this$dataModel$getCo3 !== void 0 ? _this$dataModel$getCo3 : "", Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getHeaderFiles"])(_this.dataModel)),
|
|
2819
3048
|
customName: _this.dataModel.getComponentValue("componentName"),
|
|
2820
3049
|
modulename: _this.dataModel.getName(),
|
|
2821
3050
|
isdriverisr: false,
|
|
@@ -2852,18 +3081,18 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2852
3081
|
return undefined;
|
|
2853
3082
|
});
|
|
2854
3083
|
|
|
2855
|
-
_defineProperty(this, "
|
|
3084
|
+
_defineProperty(this, "ctselTimerSetting", function () {
|
|
2856
3085
|
var _this$dataModel$getHa3, _this$dataModel$getHa4, _this$dataModel$getHa5;
|
|
2857
3086
|
|
|
2858
3087
|
switch (_this.dataModel.getComponentValue("timerSelection")) {
|
|
2859
3088
|
case "TMR2":
|
|
2860
|
-
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "
|
|
3089
|
+
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "timer2";
|
|
2861
3090
|
|
|
2862
3091
|
case "TMR4":
|
|
2863
|
-
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "
|
|
3092
|
+
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "timer4";
|
|
2864
3093
|
|
|
2865
3094
|
case "TMR6":
|
|
2866
|
-
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "
|
|
3095
|
+
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "timer6";
|
|
2867
3096
|
|
|
2868
3097
|
default:
|
|
2869
3098
|
return undefined;
|
|
@@ -3194,10 +3423,10 @@ var Interface = {
|
|
|
3194
3423
|
/*!*******************************!*\
|
|
3195
3424
|
!*** ./src/moduleConfig.json ***!
|
|
3196
3425
|
\*******************************/
|
|
3197
|
-
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
3426
|
+
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, help, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
3198
3427
|
/***/ (function(module) {
|
|
3199
3428
|
|
|
3200
|
-
module.exports = JSON.parse("{\"moduleName\":\"PWM\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{\"software\":\"Software Settings\",\"hardware\":\"Hardware Settings\"},\"UIOrder\":{\"software\":[\"*\"],\"hardware\":[\"pwmenPwmcon\",\"timerSelection\",\"dutyCycle\",\"pwmdcValue\",\"pwmpolPwmcon\",\"pwmPeriod\",\"pwmFrequency\",\"pwmResolution\",\"*\"]},\"hasPins\":true,\"tabs\":{\"main\":\"Easy View\",\"register\":\"Register Initialization\"},\"analytics\":{\"logAlwaysComps\":[\"pwmenPwmcon\",\"pwmFrequency\",\"pwmResolution\"],\"logOnChangeComps\":[],\"compMapping\":{\"pwmenPwmcon\":\"PWM_Enable\",\"pwmFrequency\":\"PWM_Frequency\",\"pwmResolution\":\"PWM_Resolution\"}},\"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\"},\"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\":{\"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\":\"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\"}}],\"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\"}]}}]}");
|
|
3429
|
+
module.exports = JSON.parse("{\"moduleName\":\"PWM\",\"deviceType\":\"PIC\",\"booleanValues\":{\"true\":\"enabled\",\"false\":\"disabled\"},\"UIGroups\":{\"software\":\"Software Settings\",\"hardware\":\"Hardware Settings\"},\"UIOrder\":{\"software\":[\"*\"],\"hardware\":[\"pwmenPwmcon\",\"timerSelection\",\"dutyCycle\",\"pwmdcValue\",\"pwmpolPwmcon\",\"pwmPeriod\",\"pwmFrequency\",\"pwmResolution\",\"*\"]},\"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\"],\"logOnChangeComps\":[],\"compMapping\":{\"pwmenPwmcon\":\"PWM_Enable\",\"pwmFrequency\":\"PWM_Frequency\",\"pwmResolution\":\"PWM_Resolution\"}},\"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\":\"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\"}}],\"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\"}]}}]}");
|
|
3201
3430
|
|
|
3202
3431
|
/***/ }),
|
|
3203
3432
|
|