@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/creator.js
CHANGED
|
@@ -830,6 +830,63 @@ var getModuleConfigFromFile = function getModuleConfigFromFile() {
|
|
|
830
830
|
|
|
831
831
|
/***/ }),
|
|
832
832
|
|
|
833
|
+
/***/ "./generated_module/src/pins/PCPHelper.ts":
|
|
834
|
+
/*!************************************************!*\
|
|
835
|
+
!*** ./generated_module/src/pins/PCPHelper.ts ***!
|
|
836
|
+
\************************************************/
|
|
837
|
+
/*! exports provided: getPinsData, getPinsLogic */
|
|
838
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
839
|
+
|
|
840
|
+
"use strict";
|
|
841
|
+
__webpack_require__.r(__webpack_exports__);
|
|
842
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsData", function() { return getPinsData; });
|
|
843
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogic", function() { return getPinsLogic; });
|
|
844
|
+
/* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../getUserData */ "./generated_module/src/getUserData.ts");
|
|
845
|
+
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; }
|
|
846
|
+
|
|
847
|
+
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; }
|
|
848
|
+
|
|
849
|
+
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; }
|
|
850
|
+
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
var mockPinsLogic = function mockPinsLogic(getPinsData) {
|
|
854
|
+
var getCompletePinData = function getCompletePinData(appModel) {
|
|
855
|
+
return {};
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
var getRowData = function getRowData(appModel, rowData) {
|
|
859
|
+
return rowData;
|
|
860
|
+
};
|
|
861
|
+
|
|
862
|
+
return {
|
|
863
|
+
getCompletePinData: getCompletePinData,
|
|
864
|
+
getRowData: getRowData,
|
|
865
|
+
getPinsData: getPinsData
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
|
|
869
|
+
var getPinsData = function getPinsData() {
|
|
870
|
+
var _getPinsDataFromFile;
|
|
871
|
+
|
|
872
|
+
return (_getPinsDataFromFile = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsDataFromFile"])()) !== null && _getPinsDataFromFile !== void 0 ? _getPinsDataFromFile : {
|
|
873
|
+
rows: []
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
var getPinsLogic = function getPinsLogic() {
|
|
877
|
+
var pinsLogic = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsLogicFromFile"])();
|
|
878
|
+
|
|
879
|
+
if (pinsLogic) {
|
|
880
|
+
return _objectSpread(_objectSpread({}, pinsLogic), {}, {
|
|
881
|
+
getPinsData: getPinsData
|
|
882
|
+
});
|
|
883
|
+
} else {
|
|
884
|
+
return mockPinsLogic(getPinsData);
|
|
885
|
+
}
|
|
886
|
+
};
|
|
887
|
+
|
|
888
|
+
/***/ }),
|
|
889
|
+
|
|
833
890
|
/***/ "./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js":
|
|
834
891
|
/*!*******************************************************************************!*\
|
|
835
892
|
!*** ./node_modules/@microchip/melody-automodule-interface/lib/src/Tables.js ***!
|
|
@@ -6713,6 +6770,84 @@ var UiSchemaBuilder = /** @class */ (function () {
|
|
|
6713
6770
|
exports.UiSchemaBuilder = UiSchemaBuilder;
|
|
6714
6771
|
//# sourceMappingURL=ViewSchemaBuilder.js.map
|
|
6715
6772
|
|
|
6773
|
+
/***/ }),
|
|
6774
|
+
|
|
6775
|
+
/***/ "./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js":
|
|
6776
|
+
/*!*************************************************************************************!*\
|
|
6777
|
+
!*** ./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js ***!
|
|
6778
|
+
\*************************************************************************************/
|
|
6779
|
+
/*! no static exports found */
|
|
6780
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6781
|
+
|
|
6782
|
+
"use strict";
|
|
6783
|
+
|
|
6784
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6785
|
+
exports.getCFunctionValidator = void 0;
|
|
6786
|
+
var cKeywords = [
|
|
6787
|
+
"auto",
|
|
6788
|
+
"const",
|
|
6789
|
+
"double",
|
|
6790
|
+
"float",
|
|
6791
|
+
"int",
|
|
6792
|
+
"short",
|
|
6793
|
+
"struct",
|
|
6794
|
+
"unsigned",
|
|
6795
|
+
"break",
|
|
6796
|
+
"continue",
|
|
6797
|
+
"else",
|
|
6798
|
+
"for",
|
|
6799
|
+
"long",
|
|
6800
|
+
"signed",
|
|
6801
|
+
"switch",
|
|
6802
|
+
"void",
|
|
6803
|
+
"case",
|
|
6804
|
+
"default",
|
|
6805
|
+
"enum",
|
|
6806
|
+
"goto",
|
|
6807
|
+
"register",
|
|
6808
|
+
"sizeof",
|
|
6809
|
+
"typedef",
|
|
6810
|
+
"volatile",
|
|
6811
|
+
"char",
|
|
6812
|
+
"do",
|
|
6813
|
+
"extern",
|
|
6814
|
+
"if",
|
|
6815
|
+
"return",
|
|
6816
|
+
"static",
|
|
6817
|
+
"union",
|
|
6818
|
+
"while",
|
|
6819
|
+
];
|
|
6820
|
+
var functionPattern = "(?=^([A-Za-z]\\S|_)\\w+$)";
|
|
6821
|
+
var errorMessage = "Must be valid C function syntax.";
|
|
6822
|
+
var doNotMatchKeywordsRegex = function () {
|
|
6823
|
+
return "(^(?!" + cKeywords.join("|") + ")).*";
|
|
6824
|
+
};
|
|
6825
|
+
var result = doNotMatchKeywordsRegex();
|
|
6826
|
+
var pattern = {
|
|
6827
|
+
pattern: functionPattern + result,
|
|
6828
|
+
};
|
|
6829
|
+
exports.getCFunctionValidator = function () { return ({
|
|
6830
|
+
getRjsfValidation: function () { return pattern; },
|
|
6831
|
+
getCustomErrorMessage: function () { return errorMessage; },
|
|
6832
|
+
}); };
|
|
6833
|
+
|
|
6834
|
+
|
|
6835
|
+
/***/ }),
|
|
6836
|
+
|
|
6837
|
+
/***/ "./node_modules/@microchip/scf-validators/lib/index.js":
|
|
6838
|
+
/*!*************************************************************!*\
|
|
6839
|
+
!*** ./node_modules/@microchip/scf-validators/lib/index.js ***!
|
|
6840
|
+
\*************************************************************/
|
|
6841
|
+
/*! no static exports found */
|
|
6842
|
+
/***/ (function(module, exports, __webpack_require__) {
|
|
6843
|
+
|
|
6844
|
+
"use strict";
|
|
6845
|
+
|
|
6846
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6847
|
+
var CFunctionValidator_1 = __webpack_require__(/*! ./Validators/CFunctionValidator */ "./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js");
|
|
6848
|
+
Object.defineProperty(exports, "getCFunctionValidator", { enumerable: true, get: function () { return CFunctionValidator_1.getCFunctionValidator; } });
|
|
6849
|
+
|
|
6850
|
+
|
|
6716
6851
|
/***/ }),
|
|
6717
6852
|
|
|
6718
6853
|
/***/ "./node_modules/core-js/es/math/log10.js":
|
|
@@ -7863,6 +7998,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
7863
7998
|
/* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.tsx");
|
|
7864
7999
|
/* 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");
|
|
7865
8000
|
/* 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__);
|
|
8001
|
+
/* 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");
|
|
8002
|
+
/* 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");
|
|
8003
|
+
/* harmony import */ var _microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__);
|
|
7866
8004
|
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; } } }; }
|
|
7867
8005
|
|
|
7868
8006
|
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); }
|
|
@@ -7878,6 +8016,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
7878
8016
|
|
|
7879
8017
|
|
|
7880
8018
|
|
|
8019
|
+
|
|
8020
|
+
|
|
7881
8021
|
var getDerivedData = function getDerivedData(dataModel) {
|
|
7882
8022
|
if (dataModel) {
|
|
7883
8023
|
return new MyDerivedData(dataModel);
|
|
@@ -7908,6 +8048,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
7908
8048
|
|
|
7909
8049
|
_defineProperty(this, "pwmCalculator", void 0);
|
|
7910
8050
|
|
|
8051
|
+
_defineProperty(this, "cValidator", Object(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__["getCFunctionValidator"])());
|
|
8052
|
+
|
|
7911
8053
|
_defineProperty(this, "getPwmCalculator", function () {
|
|
7912
8054
|
if (!_this.pwmCalculator) {
|
|
7913
8055
|
var _this$dataModel$getIm, _this$dataModel$getIm2;
|
|
@@ -7945,7 +8087,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
7945
8087
|
pwmResolution: function pwmResolution() {
|
|
7946
8088
|
return _this.getPwmCalculator().getPwmResolution();
|
|
7947
8089
|
},
|
|
7948
|
-
ctselCcptmrs1: _this.
|
|
8090
|
+
ctselCcptmrs1: _this.ctselTimerSetting,
|
|
8091
|
+
ctselPwmtmrs: _this.ctselTimerSetting,
|
|
7949
8092
|
pwmdchPwmdch: function pwmdchPwmdch() {
|
|
7950
8093
|
return Number(_this.dataModel.getComponentValue("pwmdcValue")) >> 2;
|
|
7951
8094
|
},
|
|
@@ -7955,10 +8098,23 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
7955
8098
|
templateData: function templateData() {
|
|
7956
8099
|
return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getGeneratorModel"])(_this.dataModel);
|
|
7957
8100
|
},
|
|
7958
|
-
getHelpUrl: _this.getSdlHelpOverride
|
|
8101
|
+
getHelpUrl: _this.getSdlHelpOverride,
|
|
8102
|
+
filterImports: _this.filterImports,
|
|
8103
|
+
getPinsLogic: _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_5__["getPinsLogic"],
|
|
8104
|
+
importName: _this.friendlyImportName,
|
|
8105
|
+
componentNameValidator: _this.componentNameValidator,
|
|
8106
|
+
getCustomUiErrors: _this.getCustomUiErrors
|
|
7959
8107
|
};
|
|
7960
8108
|
});
|
|
7961
8109
|
|
|
8110
|
+
_defineProperty(this, "friendlyImportName", function (importKey) {
|
|
8111
|
+
if (importKey === "scf_pic8_pwm_v2") return "PWM Hardware";
|
|
8112
|
+
if (importKey === "osc_clocks") return "Oscillator Clock";
|
|
8113
|
+
if (importKey === "initializer_system") return "system.c Initialize()";
|
|
8114
|
+
if (importKey === "pin_standard") return "Pins";
|
|
8115
|
+
return importKey;
|
|
8116
|
+
});
|
|
8117
|
+
|
|
7962
8118
|
_defineProperty(this, "overrideDefaultValues", function (componentName) {
|
|
7963
8119
|
var _this$dataModel$getHa2;
|
|
7964
8120
|
|
|
@@ -7971,14 +8127,34 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
7971
8127
|
}
|
|
7972
8128
|
});
|
|
7973
8129
|
|
|
8130
|
+
_defineProperty(this, "componentNameValidator", function () {
|
|
8131
|
+
return {
|
|
8132
|
+
pattern: _this.cValidator.getRjsfValidation().pattern
|
|
8133
|
+
};
|
|
8134
|
+
});
|
|
8135
|
+
|
|
8136
|
+
_defineProperty(this, "getCustomUiErrors", function (componentName) {
|
|
8137
|
+
switch (componentName) {
|
|
8138
|
+
case "componentName":
|
|
8139
|
+
return [{
|
|
8140
|
+
name: "pattern",
|
|
8141
|
+
message: _this.cValidator.getCustomErrorMessage()
|
|
8142
|
+
}];
|
|
8143
|
+
|
|
8144
|
+
default:
|
|
8145
|
+
return undefined;
|
|
8146
|
+
}
|
|
8147
|
+
});
|
|
8148
|
+
|
|
7974
8149
|
_defineProperty(this, "overrideDefaultOptions", function (componentName) {
|
|
7975
8150
|
switch (componentName) {
|
|
7976
8151
|
case "timerSelection":
|
|
7977
8152
|
{
|
|
7978
|
-
var _this$dataModel$getPe, _this$dataModel$getPe2;
|
|
8153
|
+
var _this$dataModel$getPe, _this$dataModel$getPe2, _this$dataModel$getPe3, _this$dataModel$getPe4;
|
|
7979
8154
|
|
|
7980
8155
|
var result = [];
|
|
7981
8156
|
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;
|
|
8157
|
+
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;
|
|
7982
8158
|
|
|
7983
8159
|
if (CCPTMRSREG) {
|
|
7984
8160
|
var _CCPTMRSREG$settings, _CTSELSETT$options;
|
|
@@ -8003,7 +8179,37 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
8003
8179
|
} finally {
|
|
8004
8180
|
_iterator.f();
|
|
8005
8181
|
}
|
|
8006
|
-
}
|
|
8182
|
+
}
|
|
8183
|
+
|
|
8184
|
+
if (PWMTMRSREG) {
|
|
8185
|
+
var _PWMTMRSREG$settings, _CTSELSETT$options2;
|
|
8186
|
+
|
|
8187
|
+
var _CTSELSETT = (_PWMTMRSREG$settings = PWMTMRSREG.settings) === null || _PWMTMRSREG$settings === void 0 ? void 0 : _PWMTMRSREG$settings.CTSEL;
|
|
8188
|
+
|
|
8189
|
+
var _iterator2 = _createForOfIteratorHelper((_CTSELSETT$options2 = _CTSELSETT === null || _CTSELSETT === void 0 ? void 0 : _CTSELSETT.options) !== null && _CTSELSETT$options2 !== void 0 ? _CTSELSETT$options2 : []),
|
|
8190
|
+
_step2;
|
|
8191
|
+
|
|
8192
|
+
try {
|
|
8193
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
8194
|
+
var _optnmatch$length2;
|
|
8195
|
+
|
|
8196
|
+
var _eachoptn = _step2.value;
|
|
8197
|
+
var _timeroptnregex = /^pwm[0-9]timer([0-9])$/i;
|
|
8198
|
+
|
|
8199
|
+
var _optnmatch = _eachoptn.alias.match(_timeroptnregex);
|
|
8200
|
+
|
|
8201
|
+
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]) : "";
|
|
8202
|
+
|
|
8203
|
+
result.push(_correctOptnName);
|
|
8204
|
+
}
|
|
8205
|
+
} catch (err) {
|
|
8206
|
+
_iterator2.e(err);
|
|
8207
|
+
} finally {
|
|
8208
|
+
_iterator2.f();
|
|
8209
|
+
}
|
|
8210
|
+
}
|
|
8211
|
+
|
|
8212
|
+
if (!CCPTMRSREG && !PWMTMRSREG) {
|
|
8007
8213
|
result.push("TMR2");
|
|
8008
8214
|
}
|
|
8009
8215
|
|
|
@@ -8025,11 +8231,32 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
8025
8231
|
return {};
|
|
8026
8232
|
});
|
|
8027
8233
|
|
|
8234
|
+
_defineProperty(this, "filterImports", function (imports) {
|
|
8235
|
+
var filteredImports = imports;
|
|
8236
|
+
var ImportKeys = ["Timer"];
|
|
8237
|
+
ImportKeys.forEach(function (importKey) {
|
|
8238
|
+
filteredImports = _this.getModel().filterImportBySetting(filteredImports, importKey, function (option) {
|
|
8239
|
+
if (option.payload !== undefined) {
|
|
8240
|
+
var _this$dataModel$getCo;
|
|
8241
|
+
|
|
8242
|
+
var rstSource = (_this$dataModel$getCo = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "disabled";
|
|
8243
|
+
var regexpNumber = /\d/;
|
|
8244
|
+
var inst = rstSource.match(regexpNumber);
|
|
8245
|
+
|
|
8246
|
+
if (rstSource.indexOf("TMR") !== -1) {
|
|
8247
|
+
return option.payload.moduleName === "TMR" + inst;
|
|
8248
|
+
}
|
|
8249
|
+
}
|
|
8250
|
+
});
|
|
8251
|
+
});
|
|
8252
|
+
return filteredImports;
|
|
8253
|
+
});
|
|
8254
|
+
|
|
8028
8255
|
_defineProperty(this, "getMyAlerts", function () {
|
|
8029
|
-
var _this$dataModel$
|
|
8256
|
+
var _this$dataModel$getCo2, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
|
|
8030
8257
|
|
|
8031
8258
|
var alerts = [];
|
|
8032
|
-
var timerSelection = (_this$dataModel$
|
|
8259
|
+
var timerSelection = (_this$dataModel$getCo2 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "";
|
|
8033
8260
|
var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
|
|
8034
8261
|
var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
|
|
8035
8262
|
|
|
@@ -8061,12 +8288,14 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
8061
8288
|
|
|
8062
8289
|
_defineProperty(this, "getSdlHelpOverride", function (componentName, helpUrl) {
|
|
8063
8290
|
if (componentName === "timerSelection") {
|
|
8064
|
-
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4;
|
|
8291
|
+
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4, _this$getModel$getPer5, _this$getModel$getPer6;
|
|
8065
8292
|
|
|
8066
8293
|
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) {
|
|
8067
8294
|
componentName = "ctselCcptmrs1";
|
|
8068
8295
|
} 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) {
|
|
8069
8296
|
componentName = "ctselCcptmrs";
|
|
8297
|
+
} 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) {
|
|
8298
|
+
componentName = "ctselPwmtmrs";
|
|
8070
8299
|
}
|
|
8071
8300
|
} else if (componentName === "dutyCycle" || componentName === "pwmdcValue") {
|
|
8072
8301
|
var _helpUrl, _this$getModel$getHar, _this$getModel$getHar2;
|
|
@@ -8078,10 +8307,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
8078
8307
|
});
|
|
8079
8308
|
|
|
8080
8309
|
_defineProperty(this, "pwm_general_parameters_payload", function () {
|
|
8081
|
-
var _this$dataModel$
|
|
8310
|
+
var _this$dataModel$getCo3;
|
|
8082
8311
|
|
|
8083
8312
|
return {
|
|
8084
|
-
interfaceApi: _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"].createFirmwareApi((_this$dataModel$
|
|
8313
|
+
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)),
|
|
8085
8314
|
customName: _this.dataModel.getComponentValue("componentName"),
|
|
8086
8315
|
modulename: _this.dataModel.getName(),
|
|
8087
8316
|
isdriverisr: false,
|
|
@@ -8118,18 +8347,18 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
8118
8347
|
return undefined;
|
|
8119
8348
|
});
|
|
8120
8349
|
|
|
8121
|
-
_defineProperty(this, "
|
|
8350
|
+
_defineProperty(this, "ctselTimerSetting", function () {
|
|
8122
8351
|
var _this$dataModel$getHa3, _this$dataModel$getHa4, _this$dataModel$getHa5;
|
|
8123
8352
|
|
|
8124
8353
|
switch (_this.dataModel.getComponentValue("timerSelection")) {
|
|
8125
8354
|
case "TMR2":
|
|
8126
|
-
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "
|
|
8355
|
+
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "timer2";
|
|
8127
8356
|
|
|
8128
8357
|
case "TMR4":
|
|
8129
|
-
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "
|
|
8358
|
+
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "timer4";
|
|
8130
8359
|
|
|
8131
8360
|
case "TMR6":
|
|
8132
|
-
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "
|
|
8361
|
+
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "timer6";
|
|
8133
8362
|
|
|
8134
8363
|
default:
|
|
8135
8364
|
return undefined;
|
|
@@ -8460,10 +8689,10 @@ var Interface = {
|
|
|
8460
8689
|
/*!*******************************!*\
|
|
8461
8690
|
!*** ./src/moduleConfig.json ***!
|
|
8462
8691
|
\*******************************/
|
|
8463
|
-
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
8692
|
+
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, help, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
8464
8693
|
/***/ (function(module) {
|
|
8465
8694
|
|
|
8466
|
-
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\"}]}}]}");
|
|
8695
|
+
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\"}]}}]}");
|
|
8467
8696
|
|
|
8468
8697
|
/***/ }),
|
|
8469
8698
|
|