@mchp-mcc/scf-pic8-pwm-v2 4.2.6 → 4.2.8
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 +11 -12
- package/LICENSE.txt +1 -1
- package/Readme.md +11 -12
- package/output/autoCreator.js +30 -25
- package/output/autoCreator.js.map +1 -1
- package/output/autoProcessor.js +30 -25
- package/output/autoProcessor.js.map +1 -1
- package/output/creator.js +5343 -5048
- package/output/creator.js.map +1 -1
- package/output/processor.js +5343 -5048
- package/output/processor.js.map +1 -1
- package/output/pwm-v2.c.ftl +12 -4
- package/output/pwm-v2.h.ftl +1 -1
- package/package.json +17 -17
- package/src/DerivedData.test.ts +58 -31
- package/src/DerivedData.ts +15 -14
- package/src/GeneratorModel.test.tsx +2 -32
- package/src/GeneratorModel.tsx +3 -2
- package/src/PinsLogic.test.ts +3 -55
- package/src/catalog.json +1 -1
package/Changelog.md
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
-
## [4.2.
|
|
4
|
+
## [4.2.8] - 2023-06-14
|
|
5
5
|
|
|
6
|
-
###
|
|
7
|
-
- **CC8SCRIP-
|
|
6
|
+
### New Features
|
|
7
|
+
- **CC8SCRIP-13286** :- Added 10-Bit PWM Peripheral Support for PIC16(L)F177x
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
## [4.2.
|
|
10
|
+
## [4.2.7] - 2023-03-09
|
|
11
11
|
|
|
12
|
-
###
|
|
13
|
-
- **CC8SCRIP-
|
|
14
|
-
- **CC8SCRIP-
|
|
15
|
-
- **CC8SCRIP-
|
|
16
|
-
- **CC8SCRIP-7817** :- Added support to make PWMxOUT pin visible in pin grid view
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
- **CC8SCRIP-13488** :- Added support for Timer8 dependency in UI and generated driver for PIC18FxxK40 device family
|
|
14
|
+
- **CC8SCRIP-13401** :- Added support for timer dependency selector in the UI
|
|
15
|
+
- **CC8SCRIP-12947** :- PWM output not seen when multiple instances are used.
|
|
17
16
|
|
|
18
17
|
|
|
19
|
-
## [4.2.
|
|
18
|
+
## [4.2.6] - 2022-12-20
|
|
20
19
|
|
|
21
|
-
###
|
|
22
|
-
- **CC8SCRIP-
|
|
20
|
+
### Improvements
|
|
21
|
+
- **CC8SCRIP-10646** :- Added a validator for the Custom Name in Easy View
|
package/LICENSE.txt
CHANGED
package/Readme.md
CHANGED
|
@@ -18,22 +18,21 @@ This driver generates the following files:
|
|
|
18
18
|
# Changelog
|
|
19
19
|
All notable changes to this project will be documented in this file.
|
|
20
20
|
|
|
21
|
-
## [4.2.
|
|
21
|
+
## [4.2.8] - 2023-06-14
|
|
22
22
|
|
|
23
|
-
###
|
|
24
|
-
- **CC8SCRIP-
|
|
23
|
+
### New Features
|
|
24
|
+
- **CC8SCRIP-13286** :- Added 10-Bit PWM Peripheral Support for PIC16(L)F177x
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
## [4.2.
|
|
27
|
+
## [4.2.7] - 2023-03-09
|
|
28
28
|
|
|
29
|
-
###
|
|
30
|
-
- **CC8SCRIP-
|
|
31
|
-
- **CC8SCRIP-
|
|
32
|
-
- **CC8SCRIP-
|
|
33
|
-
- **CC8SCRIP-7817** :- Added support to make PWMxOUT pin visible in pin grid view
|
|
29
|
+
### Bug Fixes
|
|
30
|
+
- **CC8SCRIP-13488** :- Added support for Timer8 dependency in UI and generated driver for PIC18FxxK40 device family
|
|
31
|
+
- **CC8SCRIP-13401** :- Added support for timer dependency selector in the UI
|
|
32
|
+
- **CC8SCRIP-12947** :- PWM output not seen when multiple instances are used.
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
## [4.2.
|
|
35
|
+
## [4.2.6] - 2022-12-20
|
|
37
36
|
|
|
38
|
-
###
|
|
39
|
-
- **CC8SCRIP-
|
|
37
|
+
### Improvements
|
|
38
|
+
- **CC8SCRIP-10646** :- Added a validator for the Custom Name in Easy View
|
package/output/autoCreator.js
CHANGED
|
@@ -536,10 +536,10 @@ var filterModeOptions = function filterModeOptions(options, component, masterCom
|
|
|
536
536
|
|
|
537
537
|
var getProcessedHandle = function getProcessedHandle(handle, payload) {
|
|
538
538
|
if (handle) {
|
|
539
|
-
var _ref, _ref2, _payload$
|
|
539
|
+
var _ref, _ref2, _ref3, _payload$customName;
|
|
540
540
|
|
|
541
541
|
handle = _objectSpread(_objectSpread({}, handle), {}, {
|
|
542
|
-
label: (_ref = (_ref2 = (_payload$
|
|
542
|
+
label: (_ref = (_ref2 = (_ref3 = (_payload$customName = payload === null || payload === void 0 ? void 0 : payload.customName) !== null && _payload$customName !== void 0 ? _payload$customName : payload === null || payload === void 0 ? void 0 : payload.moduleName) !== null && _ref3 !== void 0 ? _ref3 : payload === null || payload === void 0 ? void 0 : payload.name) !== null && _ref2 !== void 0 ? _ref2 : handle.label) !== null && _ref !== void 0 ? _ref : handle.providerId + " : " + handle.exportId
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
|
|
@@ -2820,6 +2820,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2820
2820
|
return _this.getPwmCalculator().getPwmResolution();
|
|
2821
2821
|
},
|
|
2822
2822
|
ctselCcptmrs1: _this.ctselTimerSetting,
|
|
2823
|
+
ctselCcptmrs: _this.ctselTimerSetting,
|
|
2823
2824
|
ctselPwmtmrs: _this.ctselTimerSetting,
|
|
2824
2825
|
pwmdchPwmdch: function pwmdchPwmdch() {
|
|
2825
2826
|
return Number(_this.dataModel.getComponentValue("pwmdcValue")) >> 2;
|
|
@@ -2882,11 +2883,11 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2882
2883
|
switch (componentName) {
|
|
2883
2884
|
case "timerSelection":
|
|
2884
2885
|
{
|
|
2885
|
-
var _this$dataModel$getPe, _this$dataModel$getPe2, _this$dataModel$getPe3, _this$dataModel$getPe4;
|
|
2886
|
+
var _this$dataModel$getPe, _this$dataModel$getPe2, _this$dataModel$getPe3, _this$dataModel$getPe4, _this$dataModel$getPe5, _this$dataModel$getPe6, _this$dataModel$getPe7;
|
|
2886
2887
|
|
|
2887
2888
|
var result = [];
|
|
2888
|
-
var CCPTMRSREG = (_this$dataModel$getPe = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$
|
|
2889
|
-
var PWMTMRSREG = (_this$dataModel$
|
|
2889
|
+
var CCPTMRSREG = (_this$dataModel$getPe = (_this$dataModel$getPe2 = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$getPe2 === void 0 ? void 0 : (_this$dataModel$getPe3 = _this$dataModel$getPe2.registers) === null || _this$dataModel$getPe3 === void 0 ? void 0 : _this$dataModel$getPe3.CCPTMRS1) !== null && _this$dataModel$getPe !== void 0 ? _this$dataModel$getPe : (_this$dataModel$getPe4 = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$getPe4 === void 0 ? void 0 : (_this$dataModel$getPe5 = _this$dataModel$getPe4.registers) === null || _this$dataModel$getPe5 === void 0 ? void 0 : _this$dataModel$getPe5.CCPTMRS;
|
|
2890
|
+
var PWMTMRSREG = (_this$dataModel$getPe6 = _this.dataModel.getPeripheralDescription()) === null || _this$dataModel$getPe6 === void 0 ? void 0 : (_this$dataModel$getPe7 = _this$dataModel$getPe6.registers) === null || _this$dataModel$getPe7 === void 0 ? void 0 : _this$dataModel$getPe7.PWMTMRS;
|
|
2890
2891
|
|
|
2891
2892
|
if (CCPTMRSREG) {
|
|
2892
2893
|
var _CCPTMRSREG$settings, _CTSELSETT$options;
|
|
@@ -2901,7 +2902,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2901
2902
|
var _optnmatch$length;
|
|
2902
2903
|
|
|
2903
2904
|
var eachoptn = _step.value;
|
|
2904
|
-
var timeroptnregex = /^pwm
|
|
2905
|
+
var timeroptnregex = /^pwm\d+timer(\d)$/i;
|
|
2905
2906
|
var optnmatch = eachoptn.alias.match(timeroptnregex);
|
|
2906
2907
|
var correctOptnName = ((_optnmatch$length = optnmatch === null || optnmatch === void 0 ? void 0 : optnmatch.length) !== null && _optnmatch$length !== void 0 ? _optnmatch$length : 0) > 1 ? "TMR" + (optnmatch === null || optnmatch === void 0 ? void 0 : optnmatch[1]) : "";
|
|
2907
2908
|
result.push(correctOptnName);
|
|
@@ -2926,7 +2927,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2926
2927
|
var _optnmatch$length2;
|
|
2927
2928
|
|
|
2928
2929
|
var _eachoptn = _step2.value;
|
|
2929
|
-
var _timeroptnregex = /^pwm
|
|
2930
|
+
var _timeroptnregex = /^pwm\d+timer(\d)$/i;
|
|
2930
2931
|
|
|
2931
2932
|
var _optnmatch = _eachoptn.alias.match(_timeroptnregex);
|
|
2932
2933
|
|
|
@@ -3080,20 +3081,18 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
3080
3081
|
});
|
|
3081
3082
|
|
|
3082
3083
|
_defineProperty(this, "ctselTimerSetting", function () {
|
|
3083
|
-
var _this$dataModel$
|
|
3084
|
+
var _this$dataModel$getCo4, _timerSelection$match2;
|
|
3084
3085
|
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "timer2";
|
|
3086
|
+
var timerSelection = (_this$dataModel$getCo4 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo4 !== void 0 ? _this$dataModel$getCo4 : "";
|
|
3087
|
+
var groupmatch = (_timerSelection$match2 = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match2 !== void 0 ? _timerSelection$match2 : "";
|
|
3088
3088
|
|
|
3089
|
-
|
|
3090
|
-
|
|
3089
|
+
if (groupmatch.length > 1) {
|
|
3090
|
+
var _this$dataModel$getHa3;
|
|
3091
3091
|
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
return undefined;
|
|
3092
|
+
var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
|
|
3093
|
+
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "timer" + timersuffix;
|
|
3094
|
+
} else {
|
|
3095
|
+
return undefined;
|
|
3097
3096
|
}
|
|
3098
3097
|
});
|
|
3099
3098
|
|
|
@@ -3138,12 +3137,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3138
3137
|
/* harmony import */ var _generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../generated_module/src/autoModule/AutoModuleHelpers */ "./generated_module/src/autoModule/AutoModuleHelpers.ts");
|
|
3139
3138
|
/* harmony import */ var _generated_module_src_autoModule_AutoModuleTemplates__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../generated_module/src/autoModule/AutoModuleTemplates */ "./generated_module/src/autoModule/AutoModuleTemplates.ts");
|
|
3140
3139
|
/* harmony import */ var _generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../generated_module/src/Utils */ "./generated_module/src/Utils.ts");
|
|
3140
|
+
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; }
|
|
3141
|
+
|
|
3142
|
+
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; }
|
|
3143
|
+
|
|
3144
|
+
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; }
|
|
3145
|
+
|
|
3141
3146
|
|
|
3142
3147
|
|
|
3143
3148
|
|
|
3144
3149
|
|
|
3145
3150
|
var getGeneratorModel = function getGeneratorModel(model) {
|
|
3146
|
-
var _model$getComponentVa, _model$getPeripheralD, _model$getPeripheralD2, _model$getPeripheralD3, _model$getPeripheralD4, _model$getName, _model$getName2, _pwmInterface$headerF, _model$getImportValue, _templateSettings$reg, _templateSettings$reg2, _templateSettings$reg3, _templateSettings$reg4, _templateSettings$reg5, _templateSettings$reg6, _templateSettings$reg7,
|
|
3151
|
+
var _model$getComponentVa, _model$getPeripheralD, _model$getPeripheralD2, _model$getPeripheralD3, _model$getPeripheralD4, _model$getName, _model$getName2, _pwmInterface$headerF, _model$getImportValue, _templateSettings$reg, _templateSettings$reg2, _templateSettings$reg3, _templateSettings$reg4, _templateSettings$reg5, _templateSettings$reg6, _templateSettings$reg7, _ctsel$options$length, _ctsel$options;
|
|
3147
3152
|
|
|
3148
3153
|
if (!model.getHardware()) return {};
|
|
3149
3154
|
var pwmInterface = _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_0__["Interface"].createFirmwareApi((_model$getComponentVa = model.getComponentValue("componentName")) !== null && _model$getComponentVa !== void 0 ? _model$getComponentVa : "", getHeaderFiles(model));
|
|
@@ -3152,7 +3157,7 @@ var getGeneratorModel = function getGeneratorModel(model) {
|
|
|
3152
3157
|
var initRegisters = Object(_generated_module_src_Utils__WEBPACK_IMPORTED_MODULE_3__["values"])(registerValues !== null && registerValues !== void 0 ? registerValues : {});
|
|
3153
3158
|
var ctsel = (_model$getPeripheralD = model.getPeripheralDescription()) === null || _model$getPeripheralD === void 0 ? void 0 : (_model$getPeripheralD2 = _model$getPeripheralD.registers) === null || _model$getPeripheralD2 === void 0 ? void 0 : (_model$getPeripheralD3 = _model$getPeripheralD2.CCPTMRS1) === null || _model$getPeripheralD3 === void 0 ? void 0 : (_model$getPeripheralD4 = _model$getPeripheralD3.settings) === null || _model$getPeripheralD4 === void 0 ? void 0 : _model$getPeripheralD4.CTSEL;
|
|
3154
3159
|
var CTSELvalue = ctsel ? Object(_generated_module_src_autoModule_AutoModuleHelpers__WEBPACK_IMPORTED_MODULE_1__["getOptionValueByName"])(ctsel, model.getDerivedFunction("ctselCcptmrs1")) : 1;
|
|
3155
|
-
return {
|
|
3160
|
+
return _objectSpread({
|
|
3156
3161
|
moduleNameLowerCase: (_model$getName = model.getName()) === null || _model$getName === void 0 ? void 0 : _model$getName.toLowerCase(),
|
|
3157
3162
|
moduleNameUpperCase: (_model$getName2 = model.getName()) === null || _model$getName2 === void 0 ? void 0 : _model$getName2.toUpperCase(),
|
|
3158
3163
|
header: (_pwmInterface$headerF = pwmInterface.headerFiles) === null || _pwmInterface$headerF === void 0 ? void 0 : _pwmInterface$headerF[0],
|
|
@@ -3168,14 +3173,14 @@ var getGeneratorModel = function getGeneratorModel(model) {
|
|
|
3168
3173
|
//TODO
|
|
3169
3174
|
//Registers and Settings
|
|
3170
3175
|
initRegisters: initRegisters,
|
|
3171
|
-
PWMDCH:
|
|
3172
|
-
PWMDCL:
|
|
3173
|
-
CCPTMRSregname: (_templateSettings$
|
|
3174
|
-
CTSELsettingname: (_templateSettings$
|
|
3176
|
+
// PWMDCH: templateSettings?.registers?.PWMDCH.name ?? "",
|
|
3177
|
+
// PWMDCL: templateSettings?.registers?.PWMDCL?.name ?? "",
|
|
3178
|
+
CCPTMRSregname: (_templateSettings$reg = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg2 = templateSettings.registers) === null || _templateSettings$reg2 === void 0 ? void 0 : (_templateSettings$reg3 = _templateSettings$reg2.CCPTMRS1) === null || _templateSettings$reg3 === void 0 ? void 0 : _templateSettings$reg3.name) !== null && _templateSettings$reg !== void 0 ? _templateSettings$reg : "",
|
|
3179
|
+
CTSELsettingname: (_templateSettings$reg4 = templateSettings === null || templateSettings === void 0 ? void 0 : (_templateSettings$reg5 = templateSettings.registers) === null || _templateSettings$reg5 === void 0 ? void 0 : (_templateSettings$reg6 = _templateSettings$reg5.CCPTMRS1) === null || _templateSettings$reg6 === void 0 ? void 0 : (_templateSettings$reg7 = _templateSettings$reg6.settings) === null || _templateSettings$reg7 === void 0 ? void 0 : _templateSettings$reg7.CTSEL.name) !== null && _templateSettings$reg4 !== void 0 ? _templateSettings$reg4 : "",
|
|
3175
3180
|
CTSELvalue: CTSELvalue,
|
|
3176
3181
|
timerselpresence: ((_ctsel$options$length = ctsel === null || ctsel === void 0 ? void 0 : (_ctsel$options = ctsel.options) === null || _ctsel$options === void 0 ? void 0 : _ctsel$options.length) !== null && _ctsel$options$length !== void 0 ? _ctsel$options$length : 0) > 0 ? "timerselpresent" : "timerselabsent",
|
|
3177
3182
|
pwmdcValue: model.getComponentValue("pwmdcValue")
|
|
3178
|
-
};
|
|
3183
|
+
}, registerValues);
|
|
3179
3184
|
};
|
|
3180
3185
|
var getHeaderFiles = function getHeaderFiles(model) {
|
|
3181
3186
|
return [{
|