@mchp-mcc/scf-pic8-osc-v1 4.3.3 → 4.3.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/output/creator.js CHANGED
@@ -6055,6 +6055,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
6055
6055
  alerts: _this.getMyAlerts,
6056
6056
  isEnabled: _this.isEnabled,
6057
6057
  isVisible: _this.isVisible,
6058
+ coscOsccon2: _this.getResOscValue,
6058
6059
  currentSystemClk: function currentSystemClk() {
6059
6060
  return _this.getClockCalculator().getCurrentSystemClk();
6060
6061
  },
@@ -6065,7 +6066,7 @@ var MyDerivedData = function MyDerivedData(dataModel) {
6065
6066
  config_device_results: _this.config_device_results,
6066
6067
  templateData: _this.getTemplateData,
6067
6068
  config_request_args: function config_request_args() {
6068
- return ["FEXTOSC", "CLKOUTEN", "MCLRE", "LVP"];
6069
+ return ["FEXTOSC", "CLKOUTEN", "MCLRE", "LVP", "RSTOSC"];
6069
6070
  },
6070
6071
  "osc-clocks_payload": _this.getOscClocksProcessedPayload,
6071
6072
  doNotShow: function doNotShow() {
@@ -6085,6 +6086,50 @@ var MyDerivedData = function MyDerivedData(dataModel) {
6085
6086
  return importKey;
6086
6087
  });
6087
6088
 
6089
+ _defineProperty(this, "getResOscValue", function () {
6090
+ var resetOscValue = _this.getDynamicComponetDefaultValue("RSTOSC");
6091
+
6092
+ var actualOscValue;
6093
+
6094
+ if ((resetOscValue === null || resetOscValue === void 0 ? void 0 : resetOscValue.indexOf("4x PLL")) !== -1) {
6095
+ actualOscValue = "EXTOSC with 4x PLL";
6096
+ } else if ((resetOscValue === null || resetOscValue === void 0 ? void 0 : resetOscValue.indexOf("Secondary Oscillator")) !== -1) {
6097
+ actualOscValue = "SOSC";
6098
+ } else if ((resetOscValue === null || resetOscValue === void 0 ? void 0 : resetOscValue.indexOf("Low-Frequency")) !== -1) {
6099
+ actualOscValue = "LFINTOSC";
6100
+ } else if ((resetOscValue === null || resetOscValue === void 0 ? void 0 : resetOscValue.indexOf("HFINTOSC with HFFRQ = 4 MHz and CDIV = 4:1")) !== -1) {
6101
+ actualOscValue = "HFINTOSC";
6102
+ } else if ((resetOscValue === null || resetOscValue === void 0 ? void 0 : resetOscValue.indexOf("HFINTOSC with HFFRQ = 64 MHz and CDIV = 1:1")) !== -1) {
6103
+ actualOscValue = "HFINTOSC";
6104
+ } else if ((resetOscValue === null || resetOscValue === void 0 ? void 0 : resetOscValue.indexOf("FEXTOSC")) !== -1) {
6105
+ actualOscValue = "EXTOSC";
6106
+ } else {
6107
+ actualOscValue = undefined;
6108
+ }
6109
+
6110
+ return actualOscValue;
6111
+ });
6112
+
6113
+ _defineProperty(this, "getPLLStatus", function () {
6114
+ var pllStatus = _this.getResOscValue();
6115
+
6116
+ var pllEnable = _this.dataModel.isComponentValue("pllenOscen");
6117
+
6118
+ var clkSrcVal = _this.dataModel.getComponentValue("noscOsccon1");
6119
+
6120
+ if (pllStatus === "EXTOSC with 4x PLL") {
6121
+ return true;
6122
+ } else if (pllEnable === true) {
6123
+ return true;
6124
+ } else if ((clkSrcVal === null || clkSrcVal === void 0 ? void 0 : clkSrcVal.indexOf("4x PLL")) !== -1) {
6125
+ return true;
6126
+ } else if ((clkSrcVal === null || clkSrcVal === void 0 ? void 0 : clkSrcVal.indexOf("2x PLL")) !== -1) {
6127
+ return true;
6128
+ } else {
6129
+ return false;
6130
+ }
6131
+ });
6132
+
6088
6133
  _defineProperty(this, "getOscClocksProcessedPayload", function () {
6089
6134
  var _this$getClockCalcula, _this$getClockCalcula2, _this$getClockCalcula3, _this$getClockCalcula4, _this$getClockCalcula5, _this$getClockCalcula6, _this$getClockCalcula7;
6090
6135
 
@@ -6117,26 +6162,22 @@ var MyDerivedData = function MyDerivedData(dataModel) {
6117
6162
  });
6118
6163
 
6119
6164
  _defineProperty(this, "getTemplateData", function () {
6120
- var _this$dataModel$isCom;
6165
+ var _this$getPLLStatus;
6121
6166
 
6122
6167
  var headers = {
6123
6168
  name: "clock.h",
6124
6169
  path: "../"
6125
- }; // const initRegisters = this.dataModel.getRegisterValues();
6170
+ }; // const initRegisters = this.dataModel.getRegisterValues() ;
6126
6171
 
6127
6172
  var registerValues = _this.dataModel.getRegisterValues();
6128
6173
 
6129
6174
  return _objectSpread({
6130
- productName: "CCL",
6131
- productVersion: "1.8.2",
6132
- compiler: "XC8 v2.20",
6133
- tool: "MPLAB X 5.40",
6134
6175
  deviceFrequency: _this.getClockCalculator().getCurrentSystemClk().toString(),
6135
6176
  // initRegisters: initRegisters,
6136
6177
  header: headers,
6137
6178
  moduleNameUpperCase: _this.getModuleName().toUpperCase(),
6138
6179
  moduleNameLowerCase: _this.getModuleName().toLowerCase(),
6139
- isPllEnabled: (_this$dataModel$isCom = _this.dataModel.isComponentValue("pllenOscen")) !== null && _this$dataModel$isCom !== void 0 ? _this$dataModel$isCom : false
6180
+ isPllEnabled: (_this$getPLLStatus = _this.getPLLStatus()) !== null && _this$getPLLStatus !== void 0 ? _this$getPLLStatus : false
6140
6181
  }, registerValues);
6141
6182
  });
6142
6183
 
@@ -6589,7 +6630,7 @@ _defineProperty(StringConstants, "HFINTOSC_2xPLL", "HFINTOSC with 2x PLL");
6589
6630
 
6590
6631
  _defineProperty(StringConstants, "EXTOSC", "EXTOSC");
6591
6632
 
6592
- _defineProperty(StringConstants, "EXTOSC_4xPLL", "EXTOSC with 4x PLL");
6633
+ _defineProperty(StringConstants, "EXTOSC_4xPLL", "EXTOSC with 4x PLL");
6593
6634
 
6594
6635
  _defineProperty(StringConstants, "OSC_NOT_NEEDED", "Oscillator not needed");
6595
6636