@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 CHANGED
@@ -1,6 +1,21 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## [4.2.6] - 2022-12-20
5
+
6
+ ### Improvements
7
+ - **CC8SCRIP-10646** :- Added a validator for the Custom Name in Easy View
8
+
9
+
10
+ ## [4.2.5] - 2022-05-06
11
+
12
+ ### New Features
13
+ - **CC8SCRIP-7975** :- "Select a Timer" Setting is not getting reflected in register view and in generated code
14
+ - **CC8SCRIP-7971** :- Added options for timer selection component in UI
15
+ - **CC8SCRIP-7856** :- Added "Timer Dependency Selector" Component in the UI
16
+ - **CC8SCRIP-7817** :- Added support to make PWMxOUT pin visible in pin grid view
17
+
18
+
4
19
  ## [4.2.4] - 2022-03-23
5
20
 
6
21
  ### New Features
package/Readme.md CHANGED
@@ -1,53 +1,38 @@
1
- # SCF Auto-Module Workflow
2
- ## Prerequisites:
3
- - Download & Install [nodejs](https://nodejs.org/en/download/)
4
- - Download & Install [yarn](https://yarnpkg.com/) (Depends on Node.js)
5
- - Download & Install [JRE 8u201](https://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html) (We have tested with 8u201, but it will probably work with others if you have a newer version.)
6
- - Setup node, yarn, & java in enviroment path
7
- - Download & Install a Code Editor. We are using [VSCode](https://code.visualstudio.com/download)
8
-
9
- - Run the following commands to set your registry to our internal artifactory server. This only needs to be done once per machine:
10
- - `yarn config set registry https://artifacts.microchip.com/artifactory/api/npm/npm/`
11
- - `npm config set registry https://artifacts.microchip.com/artifactory/api/npm/npm/`
12
-
13
-
14
- ## Setup
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.6] - 2022-12-20
22
+
23
+ ### Improvements
24
+ - **CC8SCRIP-10646** :- Added a validator for the Custom Name in Easy View
25
+
26
+
27
+ ## [4.2.5] - 2022-05-06
28
+
29
+ ### New Features
30
+ - **CC8SCRIP-7975** :- "Select a Timer" Setting is not getting reflected in register view and in generated code
31
+ - **CC8SCRIP-7971** :- Added options for timer selection component in UI
32
+ - **CC8SCRIP-7856** :- Added "Timer Dependency Selector" Component in the UI
33
+ - **CC8SCRIP-7817** :- Added support to make PWMxOUT pin visible in pin grid view
34
+
35
+
51
36
  ## [4.2.4] - 2022-03-23
52
37
 
53
38
  ### New Features
@@ -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 ***!
@@ -1445,6 +1502,84 @@ exports.getInterfaceName = helpers_1.getInterfaceName;
1445
1502
  exports.getInterfaceVersion = helpers_1.getInterfaceVersion;
1446
1503
 
1447
1504
 
1505
+ /***/ }),
1506
+
1507
+ /***/ "./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js":
1508
+ /*!*************************************************************************************!*\
1509
+ !*** ./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js ***!
1510
+ \*************************************************************************************/
1511
+ /*! no static exports found */
1512
+ /***/ (function(module, exports, __webpack_require__) {
1513
+
1514
+ "use strict";
1515
+
1516
+ Object.defineProperty(exports, "__esModule", { value: true });
1517
+ exports.getCFunctionValidator = void 0;
1518
+ var cKeywords = [
1519
+ "auto",
1520
+ "const",
1521
+ "double",
1522
+ "float",
1523
+ "int",
1524
+ "short",
1525
+ "struct",
1526
+ "unsigned",
1527
+ "break",
1528
+ "continue",
1529
+ "else",
1530
+ "for",
1531
+ "long",
1532
+ "signed",
1533
+ "switch",
1534
+ "void",
1535
+ "case",
1536
+ "default",
1537
+ "enum",
1538
+ "goto",
1539
+ "register",
1540
+ "sizeof",
1541
+ "typedef",
1542
+ "volatile",
1543
+ "char",
1544
+ "do",
1545
+ "extern",
1546
+ "if",
1547
+ "return",
1548
+ "static",
1549
+ "union",
1550
+ "while",
1551
+ ];
1552
+ var functionPattern = "(?=^([A-Za-z]\\S|_)\\w+$)";
1553
+ var errorMessage = "Must be valid C function syntax.";
1554
+ var doNotMatchKeywordsRegex = function () {
1555
+ return "(^(?!" + cKeywords.join("|") + ")).*";
1556
+ };
1557
+ var result = doNotMatchKeywordsRegex();
1558
+ var pattern = {
1559
+ pattern: functionPattern + result,
1560
+ };
1561
+ exports.getCFunctionValidator = function () { return ({
1562
+ getRjsfValidation: function () { return pattern; },
1563
+ getCustomErrorMessage: function () { return errorMessage; },
1564
+ }); };
1565
+
1566
+
1567
+ /***/ }),
1568
+
1569
+ /***/ "./node_modules/@microchip/scf-validators/lib/index.js":
1570
+ /*!*************************************************************!*\
1571
+ !*** ./node_modules/@microchip/scf-validators/lib/index.js ***!
1572
+ \*************************************************************/
1573
+ /*! no static exports found */
1574
+ /***/ (function(module, exports, __webpack_require__) {
1575
+
1576
+ "use strict";
1577
+
1578
+ Object.defineProperty(exports, "__esModule", { value: true });
1579
+ var CFunctionValidator_1 = __webpack_require__(/*! ./Validators/CFunctionValidator */ "./node_modules/@microchip/scf-validators/lib/Validators/CFunctionValidator.js");
1580
+ Object.defineProperty(exports, "getCFunctionValidator", { enumerable: true, get: function () { return CFunctionValidator_1.getCFunctionValidator; } });
1581
+
1582
+
1448
1583
  /***/ }),
1449
1584
 
1450
1585
  /***/ "./node_modules/core-js/es/math/log10.js":
@@ -2595,6 +2730,9 @@ __webpack_require__.r(__webpack_exports__);
2595
2730
  /* harmony import */ var _GeneratorModel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./GeneratorModel */ "./src/GeneratorModel.tsx");
2596
2731
  /* 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
2732
  /* 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__);
2733
+ /* 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");
2734
+ /* 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");
2735
+ /* harmony import */ var _microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__);
2598
2736
  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
2737
 
2600
2738
  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 +2748,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
2610
2748
 
2611
2749
 
2612
2750
 
2751
+
2752
+
2613
2753
  var getDerivedData = function getDerivedData(dataModel) {
2614
2754
  if (dataModel) {
2615
2755
  return new MyDerivedData(dataModel);
@@ -2640,6 +2780,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2640
2780
 
2641
2781
  _defineProperty(this, "pwmCalculator", void 0);
2642
2782
 
2783
+ _defineProperty(this, "cValidator", Object(_microchip_scf_validators_lib__WEBPACK_IMPORTED_MODULE_6__["getCFunctionValidator"])());
2784
+
2643
2785
  _defineProperty(this, "getPwmCalculator", function () {
2644
2786
  if (!_this.pwmCalculator) {
2645
2787
  var _this$dataModel$getIm, _this$dataModel$getIm2;
@@ -2677,7 +2819,8 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2677
2819
  pwmResolution: function pwmResolution() {
2678
2820
  return _this.getPwmCalculator().getPwmResolution();
2679
2821
  },
2680
- ctselCcptmrs1: _this.ctselCcptmrs1,
2822
+ ctselCcptmrs1: _this.ctselTimerSetting,
2823
+ ctselPwmtmrs: _this.ctselTimerSetting,
2681
2824
  pwmdchPwmdch: function pwmdchPwmdch() {
2682
2825
  return Number(_this.dataModel.getComponentValue("pwmdcValue")) >> 2;
2683
2826
  },
@@ -2687,10 +2830,23 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2687
2830
  templateData: function templateData() {
2688
2831
  return Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getGeneratorModel"])(_this.dataModel);
2689
2832
  },
2690
- getHelpUrl: _this.getSdlHelpOverride
2833
+ getHelpUrl: _this.getSdlHelpOverride,
2834
+ filterImports: _this.filterImports,
2835
+ getPinsLogic: _generated_module_src_pins_PCPHelper__WEBPACK_IMPORTED_MODULE_5__["getPinsLogic"],
2836
+ importName: _this.friendlyImportName,
2837
+ componentNameValidator: _this.componentNameValidator,
2838
+ getCustomUiErrors: _this.getCustomUiErrors
2691
2839
  };
2692
2840
  });
2693
2841
 
2842
+ _defineProperty(this, "friendlyImportName", function (importKey) {
2843
+ if (importKey === "scf_pic8_pwm_v2") return "PWM Hardware";
2844
+ if (importKey === "osc_clocks") return "Oscillator Clock";
2845
+ if (importKey === "initializer_system") return "system.c Initialize()";
2846
+ if (importKey === "pin_standard") return "Pins";
2847
+ return importKey;
2848
+ });
2849
+
2694
2850
  _defineProperty(this, "overrideDefaultValues", function (componentName) {
2695
2851
  var _this$dataModel$getHa2;
2696
2852
 
@@ -2703,14 +2859,34 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2703
2859
  }
2704
2860
  });
2705
2861
 
2862
+ _defineProperty(this, "componentNameValidator", function () {
2863
+ return {
2864
+ pattern: _this.cValidator.getRjsfValidation().pattern
2865
+ };
2866
+ });
2867
+
2868
+ _defineProperty(this, "getCustomUiErrors", function (componentName) {
2869
+ switch (componentName) {
2870
+ case "componentName":
2871
+ return [{
2872
+ name: "pattern",
2873
+ message: _this.cValidator.getCustomErrorMessage()
2874
+ }];
2875
+
2876
+ default:
2877
+ return undefined;
2878
+ }
2879
+ });
2880
+
2706
2881
  _defineProperty(this, "overrideDefaultOptions", function (componentName) {
2707
2882
  switch (componentName) {
2708
2883
  case "timerSelection":
2709
2884
  {
2710
- var _this$dataModel$getPe, _this$dataModel$getPe2;
2885
+ var _this$dataModel$getPe, _this$dataModel$getPe2, _this$dataModel$getPe3, _this$dataModel$getPe4;
2711
2886
 
2712
2887
  var result = [];
2713
2888
  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;
2889
+ 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
2890
 
2715
2891
  if (CCPTMRSREG) {
2716
2892
  var _CCPTMRSREG$settings, _CTSELSETT$options;
@@ -2735,7 +2911,37 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2735
2911
  } finally {
2736
2912
  _iterator.f();
2737
2913
  }
2738
- } else {
2914
+ }
2915
+
2916
+ if (PWMTMRSREG) {
2917
+ var _PWMTMRSREG$settings, _CTSELSETT$options2;
2918
+
2919
+ var _CTSELSETT = (_PWMTMRSREG$settings = PWMTMRSREG.settings) === null || _PWMTMRSREG$settings === void 0 ? void 0 : _PWMTMRSREG$settings.CTSEL;
2920
+
2921
+ var _iterator2 = _createForOfIteratorHelper((_CTSELSETT$options2 = _CTSELSETT === null || _CTSELSETT === void 0 ? void 0 : _CTSELSETT.options) !== null && _CTSELSETT$options2 !== void 0 ? _CTSELSETT$options2 : []),
2922
+ _step2;
2923
+
2924
+ try {
2925
+ for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
2926
+ var _optnmatch$length2;
2927
+
2928
+ var _eachoptn = _step2.value;
2929
+ var _timeroptnregex = /^pwm[0-9]timer([0-9])$/i;
2930
+
2931
+ var _optnmatch = _eachoptn.alias.match(_timeroptnregex);
2932
+
2933
+ 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]) : "";
2934
+
2935
+ result.push(_correctOptnName);
2936
+ }
2937
+ } catch (err) {
2938
+ _iterator2.e(err);
2939
+ } finally {
2940
+ _iterator2.f();
2941
+ }
2942
+ }
2943
+
2944
+ if (!CCPTMRSREG && !PWMTMRSREG) {
2739
2945
  result.push("TMR2");
2740
2946
  }
2741
2947
 
@@ -2757,11 +2963,32 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2757
2963
  return {};
2758
2964
  });
2759
2965
 
2966
+ _defineProperty(this, "filterImports", function (imports) {
2967
+ var filteredImports = imports;
2968
+ var ImportKeys = ["Timer"];
2969
+ ImportKeys.forEach(function (importKey) {
2970
+ filteredImports = _this.getModel().filterImportBySetting(filteredImports, importKey, function (option) {
2971
+ if (option.payload !== undefined) {
2972
+ var _this$dataModel$getCo;
2973
+
2974
+ var rstSource = (_this$dataModel$getCo = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "disabled";
2975
+ var regexpNumber = /\d/;
2976
+ var inst = rstSource.match(regexpNumber);
2977
+
2978
+ if (rstSource.indexOf("TMR") !== -1) {
2979
+ return option.payload.moduleName === "TMR" + inst;
2980
+ }
2981
+ }
2982
+ });
2983
+ });
2984
+ return filteredImports;
2985
+ });
2986
+
2760
2987
  _defineProperty(this, "getMyAlerts", function () {
2761
- var _this$dataModel$getCo, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
2988
+ var _this$dataModel$getCo2, _timerSelection$match, _this$dataModel$getAs, _this$dataModel$getAs2;
2762
2989
 
2763
2990
  var alerts = [];
2764
- var timerSelection = (_this$dataModel$getCo = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo !== void 0 ? _this$dataModel$getCo : "";
2991
+ var timerSelection = (_this$dataModel$getCo2 = _this.dataModel.getComponentValue("timerSelection")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "";
2765
2992
  var groupmatch = (_timerSelection$match = timerSelection.match(/^TMR([0-9])$/)) !== null && _timerSelection$match !== void 0 ? _timerSelection$match : "";
2766
2993
  var timersuffix = (groupmatch === null || groupmatch === void 0 ? void 0 : groupmatch.length) > 1 ? groupmatch[1] : "";
2767
2994
 
@@ -2793,12 +3020,14 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2793
3020
 
2794
3021
  _defineProperty(this, "getSdlHelpOverride", function (componentName, helpUrl) {
2795
3022
  if (componentName === "timerSelection") {
2796
- var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4;
3023
+ var _this$getModel$getPer, _this$getModel$getPer2, _this$getModel$getPer3, _this$getModel$getPer4, _this$getModel$getPer5, _this$getModel$getPer6;
2797
3024
 
2798
3025
  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
3026
  componentName = "ctselCcptmrs1";
2800
3027
  } 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
3028
  componentName = "ctselCcptmrs";
3029
+ } 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) {
3030
+ componentName = "ctselPwmtmrs";
2802
3031
  }
2803
3032
  } else if (componentName === "dutyCycle" || componentName === "pwmdcValue") {
2804
3033
  var _helpUrl, _this$getModel$getHar, _this$getModel$getHar2;
@@ -2810,10 +3039,10 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2810
3039
  });
2811
3040
 
2812
3041
  _defineProperty(this, "pwm_general_parameters_payload", function () {
2813
- var _this$dataModel$getCo2;
3042
+ var _this$dataModel$getCo3;
2814
3043
 
2815
3044
  return {
2816
- interfaceApi: _interfaces_pwm_general_parameters__WEBPACK_IMPORTED_MODULE_2__["Interface"].createFirmwareApi((_this$dataModel$getCo2 = _this.dataModel.getComponentValue("componentName")) !== null && _this$dataModel$getCo2 !== void 0 ? _this$dataModel$getCo2 : "", Object(_GeneratorModel__WEBPACK_IMPORTED_MODULE_3__["getHeaderFiles"])(_this.dataModel)),
3045
+ 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
3046
  customName: _this.dataModel.getComponentValue("componentName"),
2818
3047
  modulename: _this.dataModel.getName(),
2819
3048
  isdriverisr: false,
@@ -2850,18 +3079,18 @@ var MyDerivedData = function MyDerivedData(dataModel) {
2850
3079
  return undefined;
2851
3080
  });
2852
3081
 
2853
- _defineProperty(this, "ctselCcptmrs1", function () {
3082
+ _defineProperty(this, "ctselTimerSetting", function () {
2854
3083
  var _this$dataModel$getHa3, _this$dataModel$getHa4, _this$dataModel$getHa5;
2855
3084
 
2856
3085
  switch (_this.dataModel.getComponentValue("timerSelection")) {
2857
3086
  case "TMR2":
2858
- return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "TMR2";
3087
+ return ((_this$dataModel$getHa3 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa3 === void 0 ? void 0 : _this$dataModel$getHa3.getName()) + "timer2";
2859
3088
 
2860
3089
  case "TMR4":
2861
- return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "TMR4";
3090
+ return ((_this$dataModel$getHa4 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa4 === void 0 ? void 0 : _this$dataModel$getHa4.getName()) + "timer4";
2862
3091
 
2863
3092
  case "TMR6":
2864
- return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "TMR6";
3093
+ return ((_this$dataModel$getHa5 = _this.dataModel.getHardware()) === null || _this$dataModel$getHa5 === void 0 ? void 0 : _this$dataModel$getHa5.getName()) + "timer6";
2865
3094
 
2866
3095
  default:
2867
3096
  return undefined;
@@ -3192,10 +3421,10 @@ var Interface = {
3192
3421
  /*!*******************************!*\
3193
3422
  !*** ./src/moduleConfig.json ***!
3194
3423
  \*******************************/
3195
- /*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, analytics, templates, imports, exports, softwareData, peripherals, default */
3424
+ /*! exports provided: moduleName, deviceType, booleanValues, UIGroups, UIOrder, hasPins, tabs, help, analytics, templates, imports, exports, softwareData, peripherals, default */
3196
3425
  /***/ (function(module) {
3197
3426
 
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\"}]}}]}");
3427
+ 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\"}]}}]}");
3199
3428
 
3200
3429
  /***/ }),
3201
3430