@mchp-mcc/scf-pic8-osc-v1 4.3.1 → 4.3.2

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.
@@ -12,7 +12,7 @@ import {
12
12
  } from "../generated_module/src/types/AutoModuleTypes";
13
13
  import * as InterfaceTypes from "@microchip/scf-interface";
14
14
 
15
- export const getDerivedData = (dataModel: AppModel): DerivedData => {
15
+ export const getDerivedData = (dataModel: AppModel | undefined): DerivedData => {
16
16
  if (dataModel) {
17
17
  return new MyDerivedData(dataModel);
18
18
  }
@@ -20,7 +20,7 @@ export const getDerivedData = (dataModel: AppModel): DerivedData => {
20
20
  };
21
21
 
22
22
  //This data will be used at the creator stage and relies on only the state
23
- class EmptyDerivedData implements DerivedData {
23
+ export class EmptyDerivedData implements DerivedData {
24
24
  getMyFunctions = (): DerivedFunctions => {
25
25
  return {};
26
26
  };
@@ -30,7 +30,7 @@ class EmptyDerivedData implements DerivedData {
30
30
  }
31
31
 
32
32
  //This data will be used at the processor stage
33
- class MyDerivedData implements DerivedData {
33
+ export class MyDerivedData implements DerivedData {
34
34
  private dataModel: AppModel;
35
35
  private clockCalculator: ClockCalculator;
36
36
 
@@ -57,9 +57,9 @@ class MyDerivedData implements DerivedData {
57
57
  isEnabled: this.isEnabled,
58
58
  isVisible: this.isVisible,
59
59
  currentSystemClk: (): number =>
60
- this.getClockCalculator()?.getCurrentSystemClk(),
60
+ this.getClockCalculator().getCurrentSystemClk(),
61
61
  "fosc-hz_payload": (): string =>
62
- this.getClockCalculator()?.getCurrentSystemClk()?.toString() ?? "1000000",
62
+ this.getClockCalculator().getCurrentSystemClk().toString(),
63
63
  initializer_system_results: this.initializer_system_results,
64
64
  config_device_results: this.config_device_results,
65
65
  templateData: this.getTemplateData,
@@ -112,14 +112,13 @@ class MyDerivedData implements DerivedData {
112
112
  compiler: "XC8 v2.20",
113
113
  tool: "MPLAB X 5.40",
114
114
 
115
- deviceFrequency:
116
- this.getClockCalculator()?.getCurrentSystemClk()?.toString() ?? "1000000",
115
+ deviceFrequency: this.getClockCalculator().getCurrentSystemClk().toString(),
117
116
 
118
117
  initRegisters: initRegisters,
119
118
  header: headers,
120
119
 
121
- moduleNameUpperCase: this.getModuleName()?.toUpperCase() ?? "",
122
- moduleNameLowerCase: this.getModuleName()?.toLowerCase() ?? "",
120
+ moduleNameUpperCase: this.getModuleName().toUpperCase(),
121
+ moduleNameLowerCase: this.getModuleName().toLowerCase(),
123
122
  };
124
123
  };
125
124
  private initializer_system_results = (): initializer_system.Results => {
@@ -201,7 +200,7 @@ class MyDerivedData implements DerivedData {
201
200
  )?.[componentName];
202
201
  let selectedOptionVal: string | undefined;
203
202
  if (externalClkSelectedOptions) {
204
- selectedOptionVal = externalClkSelectedOptions["defaultValue"]?.["value"];
203
+ selectedOptionVal = externalClkSelectedOptions["defaultValue"]["value"];
205
204
  }
206
205
  return selectedOptionVal ?? undefined;
207
206
  };