@mchp-mcc/scf-pic8-pwm-v2 4.2.4 → 4.2.5
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 +9 -0
- package/Readme.md +23 -44
- package/output/autoCreator.js +140 -15
- package/output/autoCreator.js.map +1 -1
- package/output/autoProcessor.js +140 -15
- package/output/autoProcessor.js.map +1 -1
- package/output/creator.js +140 -15
- package/output/creator.js.map +1 -1
- package/output/processor.js +140 -15
- package/output/processor.js.map +1 -1
- package/package.json +13 -5
- package/src/DerivedData.test.ts +616 -0
- package/src/DerivedData.ts +60 -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 +28 -0
package/Changelog.md
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [4.2.5] - 2022-05-06
|
|
5
|
+
|
|
6
|
+
### New Features
|
|
7
|
+
- **CC8SCRIP-7975** :- "Select a Timer" Setting is not getting reflected in register view and in generated code
|
|
8
|
+
- **CC8SCRIP-7971** :- Added options for timer selection component in UI
|
|
9
|
+
- **CC8SCRIP-7856** :- Added "Timer Dependency Selector" Component in the UI
|
|
10
|
+
- **CC8SCRIP-7817** :- Added support to make PWMxOUT pin visible in pin grid view
|
|
11
|
+
|
|
12
|
+
|
|
4
13
|
## [4.2.4] - 2022-03-23
|
|
5
14
|
|
|
6
15
|
### New Features
|
package/Readme.md
CHANGED
|
@@ -1,53 +1,32 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
- cd to the project root
|
|
16
|
-
- run the following commands:
|
|
17
|
-
- `yarn install`
|
|
18
|
-
- this downloads all of the project dependencies to your machine
|
|
19
|
-
- `yarn build-run-dir`
|
|
20
|
-
- this builds a run directory in your project
|
|
21
|
-
- if download fails, checkout and build [Scripted Content Framework](https://bitbucket.microchip.com/projects/MCC/repos/scripts/browse)
|
|
22
|
-
and copy the generated run folder to your project's root directory
|
|
23
|
-
|
|
24
|
-
### Hardware Module
|
|
25
|
-
- A hardware file should already be created in the next step as long as you followed the prompts when running create scf-module, but in case you need to add a peripheral later follow the next step:
|
|
26
|
-
- create a file called `peripheral.json` in the src directory. Place a JSON object copied from the device and peripheral you wish to use for this project
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
### Compile & Build
|
|
30
|
-
- `yarn create-auto-module`
|
|
31
|
-
- Generates a `moduleConfig.json` file and creates a set of files in the generated_module directory specific to the data in `src/peripheral.json`.
|
|
32
|
-
-`moduleConfig.json` can now be modified to customize your project.
|
|
33
|
-
- `yarn build`
|
|
34
|
-
- Builds the project and distributes the output files to the run directory. This also runs `create-auto-module` as part of the build process
|
|
35
|
-
- `yarn start`
|
|
36
|
-
- Creates a watcher on the project that detects changes in the source files. When a change is detected, a short compilation is performed and the new files are distributed. It is intended to speed up the design process.
|
|
37
|
-
- In a different terminal open MCC by running `./launch` on unix / linux or .`/launch.bat` on windows. Update the default device indicated in the launch file to your desired device.
|
|
38
|
-
Under Device Resources you should see your module.
|
|
39
|
-
|
|
40
|
-
### Unit Tests
|
|
41
|
-
|
|
42
|
-
- `yarn test`
|
|
43
|
-
- Triggers all the unit test cases specified by any file ending in .test.ts
|
|
44
|
-
- Unit test report is available at coverage/lcov-report/index.html
|
|
1
|
+
# Pulse-Width Modulation (PWM) Driver
|
|
2
|
+
|
|
3
|
+
## Overview
|
|
4
|
+
The PWM module generates a Pulse-Width Modulated signal determined by the duty cycle, period, and
|
|
5
|
+
resolution that are configured by the following registers:
|
|
6
|
+
• TxPR
|
|
7
|
+
• TxCON
|
|
8
|
+
• PWMxDC
|
|
9
|
+
• PWMxCON
|
|
10
|
+
|
|
11
|
+
## Generated Files
|
|
12
|
+
This driver generates the following files:
|
|
13
|
+
* ./mcc_generated_files/pwm/src/pwm3.c => A driver file containing Register Initialization and API function implementations
|
|
14
|
+
* ./mcc_generated_files/pwm/pwm3.h => A driver file containing the API function prototypes
|
|
45
15
|
|
|
46
16
|
|
|
47
17
|
|
|
48
18
|
# Changelog
|
|
49
19
|
All notable changes to this project will be documented in this file.
|
|
50
20
|
|
|
21
|
+
## [4.2.5] - 2022-05-06
|
|
22
|
+
|
|
23
|
+
### New Features
|
|
24
|
+
- **CC8SCRIP-7975** :- "Select a Timer" Setting is not getting reflected in register view and in generated code
|
|
25
|
+
- **CC8SCRIP-7971** :- Added options for timer selection component in UI
|
|
26
|
+
- **CC8SCRIP-7856** :- Added "Timer Dependency Selector" Component in the UI
|
|
27
|
+
- **CC8SCRIP-7817** :- Added support to make PWMxOUT pin visible in pin grid view
|
|
28
|
+
|
|
29
|
+
|
|
51
30
|
## [4.2.4] - 2022-03-23
|
|
52
31
|
|
|
53
32
|
### New Features
|
package/output/autoCreator.js
CHANGED
|
@@ -821,6 +821,63 @@ var getModuleConfigFromFile = function getModuleConfigFromFile() {
|
|
|
821
821
|
|
|
822
822
|
/***/ }),
|
|
823
823
|
|
|
824
|
+
/***/ "./generated_module/src/pins/PCPHelper.ts":
|
|
825
|
+
/*!************************************************!*\
|
|
826
|
+
!*** ./generated_module/src/pins/PCPHelper.ts ***!
|
|
827
|
+
\************************************************/
|
|
828
|
+
/*! exports provided: getPinsData, getPinsLogic */
|
|
829
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
830
|
+
|
|
831
|
+
"use strict";
|
|
832
|
+
__webpack_require__.r(__webpack_exports__);
|
|
833
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsData", function() { return getPinsData; });
|
|
834
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getPinsLogic", function() { return getPinsLogic; });
|
|
835
|
+
/* harmony import */ var _getUserData__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../getUserData */ "./generated_module/src/getUserData.ts");
|
|
836
|
+
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; }
|
|
837
|
+
|
|
838
|
+
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; }
|
|
839
|
+
|
|
840
|
+
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; }
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
|
|
844
|
+
var mockPinsLogic = function mockPinsLogic(getPinsData) {
|
|
845
|
+
var getCompletePinData = function getCompletePinData(appModel) {
|
|
846
|
+
return {};
|
|
847
|
+
};
|
|
848
|
+
|
|
849
|
+
var getRowData = function getRowData(appModel, rowData) {
|
|
850
|
+
return rowData;
|
|
851
|
+
};
|
|
852
|
+
|
|
853
|
+
return {
|
|
854
|
+
getCompletePinData: getCompletePinData,
|
|
855
|
+
getRowData: getRowData,
|
|
856
|
+
getPinsData: getPinsData
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
|
|
860
|
+
var getPinsData = function getPinsData() {
|
|
861
|
+
var _getPinsDataFromFile;
|
|
862
|
+
|
|
863
|
+
return (_getPinsDataFromFile = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsDataFromFile"])()) !== null && _getPinsDataFromFile !== void 0 ? _getPinsDataFromFile : {
|
|
864
|
+
rows: []
|
|
865
|
+
};
|
|
866
|
+
};
|
|
867
|
+
var getPinsLogic = function getPinsLogic() {
|
|
868
|
+
var pinsLogic = Object(_getUserData__WEBPACK_IMPORTED_MODULE_0__["getPinsLogicFromFile"])();
|
|
869
|
+
|
|
870
|
+
if (pinsLogic) {
|
|
871
|
+
return _objectSpread(_objectSpread({}, pinsLogic), {}, {
|
|
872
|
+
getPinsData: getPinsData
|
|
873
|
+
});
|
|
874
|
+
} else {
|
|
875
|
+
return mockPinsLogic(getPinsData);
|
|
876
|
+
}
|
|
877
|
+
};
|
|
878
|
+
|
|
879
|
+
/***/ }),
|
|
880
|
+
|
|
824
881
|
/***/ "./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js":
|
|
825
882
|
/*!**************************************************************************************!*\
|
|
826
883
|
!*** ./node_modules/@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp.js ***!
|
|
@@ -2595,6 +2652,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2595
2652
|
/* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.tsx");
|
|
2596
2653
|
/* 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");
|
|
2597
2654
|
/* 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__);
|
|
2655
|
+
/* 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");
|
|
2598
2656
|
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; } } }; }
|
|
2599
2657
|
|
|
2600
2658
|
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); }
|
|
@@ -2610,6 +2668,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
2610
2668
|
|
|
2611
2669
|
|
|
2612
2670
|
|
|
2671
|
+
|
|
2613
2672
|
var getDerivedData = function getDerivedData(dataModel) {
|
|
2614
2673
|
if (dataModel) {
|
|
2615
2674
|
return new MyDerivedData(dataModel);
|
|
@@ -2677,7 +2736,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2677
2736
|
pwmResolution: function pwmResolution() {
|
|
2678
2737
|
return _this.getPwmCalculator().getPwmResolution();
|
|
2679
2738
|
},
|
|
2680
|
-
ctselCcptmrs1: _this.
|
|
2739
|
+
ctselCcptmrs1: _this.ctselTimerSetting,
|
|
2740
|
+
ctselPwmtmrs: _this.ctselTimerSetting,
|
|
2681
2741
|
pwmdchPwmdch: function pwmdchPwmdch() {
|
|
2682
2742
|
return Number(_this.dataModel.getComponentValue("pwmdcValue")) >> 2;
|
|
2683
2743
|
},
|
|
@@ -2687,10 +2747,21 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2687
2747
|
templateData: function templateData() {
|
|
2688
2748
|
return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getGeneratorModel"])(_this.dataModel);
|
|
2689
2749
|
},
|
|
2690
|
-
getHelpUrl: _this.getSdlHelpOverride
|
|
2750
|
+
getHelpUrl: _this.getSdlHelpOverride,
|
|
2751
|
+
filterImports: _this.filterImports,
|
|
2752
|
+
getPinsLogic: _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_5__["getPinsLogic"],
|
|
2753
|
+
importName: _this.friendlyImportName
|
|
2691
2754
|
};
|
|
2692
2755
|
});
|
|
2693
2756
|
|
|
2757
|
+
_defineProperty(this, "friendlyImportName", function (importKey) {
|
|
2758
|
+
if (importKey === "scf_pic8_pwm_v2") return "PWM Hardware";
|
|
2759
|
+
if (importKey === "osc_clocks") return "Oscillator Clock";
|
|
2760
|
+
if (importKey === "initializer_system") return "system.c Initialize()";
|
|
2761
|
+
if (importKey === "pin_standard") return "Pins";
|
|
2762
|
+
return importKey;
|
|
2763
|
+
});
|
|
2764
|
+
|
|
2694
2765
|
_defineProperty(this, "overrideDefaultValues", function (componentName) {
|
|
2695
2766
|
var _this$dataModel$getHa2;
|
|
2696
2767
|
|
|
@@ -2707,10 +2778,11 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2707
2778
|
switch (componentName) {
|
|
2708
2779
|
case "timerSelection":
|
|
2709
2780
|
{
|
|
2710
|
-
var _this$dataModel$getPe, _this$dataModel$getPe2;
|
|
2781
|
+
var _this$dataModel$getPe, _this$dataModel$getPe2, _this$dataModel$getPe3, _this$dataModel$getPe4;
|
|
2711
2782
|
|
|
2712
2783
|
var result = [];
|
|
2713
2784
|
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;
|
|
2785
|
+
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;
|
|
2714
2786
|
|
|
2715
2787
|
if (CCPTMRSREG) {
|
|
2716
2788
|
var _CCPTMRSREG$settings, _CTSELSETT$options;
|
|
@@ -2735,7 +2807,37 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2735
2807
|
} finally {
|
|
2736
2808
|
_iterator.f();
|
|
2737
2809
|
}
|
|
2738
|
-
}
|
|
2810
|
+
}
|
|
2811
|
+
|
|
2812
|
+
if (PWMTMRSREG) {
|
|
2813
|
+
var _PWMTMRSREG$settings, _CTSELSETT$options2;
|
|
2814
|
+
|
|
2815
|
+
var _CTSELSETT = (_PWMTMRSREG$settings = PWMTMRSREG.settings) === null || _PWMTMRSREG$settings === void 0 ? void 0 : _PWMTMRSREG$settings.CTSEL;
|
|
2816
|
+
|
|
2817
|
+
var _iterator2 = _createForOfIteratorHelper((_CTSELSETT$options2 = _CTSELSETT === null || _CTSELSETT === void 0 ? void 0 : _CTSELSETT.options) !== null && _CTSELSETT$options2 !== void 0 ? _CTSELSETT$options2 : []),
|
|
2818
|
+
_step2;
|
|
2819
|
+
|
|
2820
|
+
try {
|
|
2821
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
2822
|
+
var _optnmatch$length2;
|
|
2823
|
+
|
|
2824
|
+
var _eachoptn = _step2.value;
|
|
2825
|
+
var _timeroptnregex = /^pwm[0-9]timer([0-9])$/i;
|
|
2826
|
+
|
|
2827
|
+
var _optnmatch = _eachoptn.alias.match(_timeroptnregex);
|
|
2828
|
+
|
|
2829
|
+
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]) : "";
|
|
2830
|
+
|
|
2831
|
+
result.push(_correctOptnName);
|
|
2832
|
+
}
|
|
2833
|
+
} catch (err) {
|
|
2834
|
+
_iterator2.e(err);
|
|
2835
|
+
} finally {
|
|
2836
|
+
_iterator2.f();
|
|
2837
|
+
}
|
|
2838
|
+
}
|
|
2839
|
+
|
|
2840
|
+
if (!CCPTMRSREG && !PWMTMRSREG) {
|
|
2739
2841
|
result.push("TMR2");
|
|
2740
2842
|
}
|
|
2741
2843
|
|
|
@@ -2757,11 +2859,32 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2757
2859
|
return {};
|
|
2758
2860
|
});
|
|
2759
2861
|
|
|
2862
|
+
_defineProperty(this, "filterImports", function (imports) {
|
|
2863
|
+
var filteredImports = imports;
|
|
2864
|
+
var ImportKeys = ["Timer"];
|
|
2865
|
+
ImportKeys.forEach(function (importKey) {
|
|
2866
|
+
filteredImports = _this.getModel().filterImportBySetting(filteredImports, importKey, function (option) {
|
|
2867
|
+
if (option.payload !== undefined) {
|
|
2868
|
+
var _this$dataModel$getCo;
|
|
2869
|
+
|
|
2870
|
+
var rstSource = (_this$dataModel$getCo = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "disabled";
|
|
2871
|
+
var regexpNumber = /\d/;
|
|
2872
|
+
var inst = rstSource.match(regexpNumber);
|
|
2873
|
+
|
|
2874
|
+
if (rstSource.indexOf("TMR") !== -1) {
|
|
2875
|
+
return option.payload.moduleName === "TMR" + inst;
|
|
2876
|
+
}
|
|
2877
|
+
}
|
|
2878
|
+
});
|
|
2879
|
+
});
|
|
2880
|
+
return filteredImports;
|
|
2881
|
+
});
|
|
2882
|
+
|
|
2760
2883
|
_defineProperty(this, "getMyAlerts", function () {
|
|
2761
|
-
var _this$dataModel$
|
|
2884
|
+
var _this$dataModel$getCo2, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
|
|
2762
2885
|
|
|
2763
2886
|
var alerts = [];
|
|
2764
|
-
var timerSelection = (_this$dataModel$
|
|
2887
|
+
var timerSelection = (_this$dataModel$getCo2 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "";
|
|
2765
2888
|
var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
|
|
2766
2889
|
var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
|
|
2767
2890
|
|
|
@@ -2793,12 +2916,14 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2793
2916
|
|
|
2794
2917
|
_defineProperty(this, "getSdlHelpOverride", function (componentName, helpUrl) {
|
|
2795
2918
|
if (componentName === "timerSelection") {
|
|
2796
|
-
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4;
|
|
2919
|
+
var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4, _this$getModel$getPer5, _this$getModel$getPer6;
|
|
2797
2920
|
|
|
2798
2921
|
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) {
|
|
2799
2922
|
componentName = "ctselCcptmrs1";
|
|
2800
2923
|
} 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) {
|
|
2801
2924
|
componentName = "ctselCcptmrs";
|
|
2925
|
+
} 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) {
|
|
2926
|
+
componentName = "ctselPwmtmrs";
|
|
2802
2927
|
}
|
|
2803
2928
|
} else if (componentName === "dutyCycle" || componentName === "pwmdcValue") {
|
|
2804
2929
|
var _helpUrl, _this$getModel$getHar, _this$getModel$getHar2;
|
|
@@ -2810,10 +2935,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2810
2935
|
});
|
|
2811
2936
|
|
|
2812
2937
|
_defineProperty(this, "pwm_general_parameters_payload", function () {
|
|
2813
|
-
var _this$dataModel$
|
|
2938
|
+
var _this$dataModel$getCo3;
|
|
2814
2939
|
|
|
2815
2940
|
return {
|
|
2816
|
-
interfaceApi: _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"].createFirmwareApi((_this$dataModel$
|
|
2941
|
+
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)),
|
|
2817
2942
|
customName: _this.dataModel.getComponentValue("componentName"),
|
|
2818
2943
|
modulename: _this.dataModel.getName(),
|
|
2819
2944
|
isdriverisr: false,
|
|
@@ -2850,18 +2975,18 @@ var MyDerivedData = function MyDerivedData(dataModel) {
|
|
|
2850
2975
|
return undefined;
|
|
2851
2976
|
});
|
|
2852
2977
|
|
|
2853
|
-
_defineProperty(this, "
|
|
2978
|
+
_defineProperty(this, "ctselTimerSetting", function () {
|
|
2854
2979
|
var _this$dataModel$getHa3, _this$dataModel$getHa4, _this$dataModel$getHa5;
|
|
2855
2980
|
|
|
2856
2981
|
switch (_this.dataModel.getComponentValue("timerSelection")) {
|
|
2857
2982
|
case "TMR2":
|
|
2858
|
-
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "
|
|
2983
|
+
return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "timer2";
|
|
2859
2984
|
|
|
2860
2985
|
case "TMR4":
|
|
2861
|
-
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "
|
|
2986
|
+
return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "timer4";
|
|
2862
2987
|
|
|
2863
2988
|
case "TMR6":
|
|
2864
|
-
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "
|
|
2989
|
+
return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "timer6";
|
|
2865
2990
|
|
|
2866
2991
|
default:
|
|
2867
2992
|
return undefined;
|
|
@@ -3192,10 +3317,10 @@ var Interface = {
|
|
|
3192
3317
|
/*!*******************************!*\
|
|
3193
3318
|
!*** ./src/moduleConfig.json ***!
|
|
3194
3319
|
\*******************************/
|
|
3195
|
-
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
3320
|
+
/*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, help, analytics, templates, imports, exports, softwareData, peripherals, default */
|
|
3196
3321
|
/***/ (function(module) {
|
|
3197
3322
|
|
|
3198
|
-
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\"}]}}]}");
|
|
3323
|
+
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\"},\"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\"}]}}]}");
|
|
3199
3324
|
|
|
3200
3325
|
/***/ }),
|
|
3201
3326
|
|