@mchp-mcc/clock-16bit-driver 1.2.0 → 1.2.1
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 +7 -3
- package/Readme.md +7 -3
- package/output/autoCreator.js +49 -12
- package/output/autoCreator.js.map +1 -1
- package/output/autoProcessor.js +49 -12
- package/output/autoProcessor.js.map +1 -1
- package/output/creator.js +49 -12
- package/output/creator.js.map +1 -1
- package/output/index.html +1 -1
- package/output/main.js +1 -1
- package/output/processor.js +49 -12
- package/output/processor.js.map +1 -1
- package/output/reducer.js +49 -12
- package/output/reducer.js.map +1 -1
- package/package.json +2 -2
- package/src/DerivedData.ts +62 -14
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@mchp-mcc/clock-16bit-driver",
|
3
|
-
"version": "1.2.
|
3
|
+
"version": "1.2.1",
|
4
4
|
"scf": {
|
5
5
|
"reducer": "output/reducer.js",
|
6
6
|
"creator": "output/creator.js",
|
@@ -106,7 +106,7 @@
|
|
106
106
|
"@microchip/initializer-system": "^0.5.3",
|
107
107
|
"@microchip/melody-automodule-interface": "^1.6.2",
|
108
108
|
"@microchip/pic-8bit-types": "^5.0.1",
|
109
|
-
"@microchip/run-directory": "^4.2.
|
109
|
+
"@microchip/run-directory": "^4.2.3",
|
110
110
|
"@microchip/scf-automodule": "^5.6.3",
|
111
111
|
"@microchip/scf-automodule-impl": "^1.8.2",
|
112
112
|
"@microchip/scf-autoview": "^3.26.1",
|
package/src/DerivedData.ts
CHANGED
@@ -125,19 +125,28 @@ class MyDerivedData implements DerivedData {
|
|
125
125
|
};
|
126
126
|
};
|
127
127
|
|
128
|
-
private
|
129
|
-
let
|
128
|
+
private getFamilyName = (): string => {
|
129
|
+
let deviceFamilyName = "";
|
130
130
|
const deviceMetaData = this.dataModel?.getImports()?.device_meta?.payload;
|
131
131
|
if (deviceMetaData) {
|
132
|
-
|
132
|
+
deviceFamilyName = deviceMetaData?.familyName;
|
133
133
|
}
|
134
|
-
return
|
134
|
+
return deviceFamilyName;
|
135
135
|
};
|
136
136
|
|
137
137
|
private isSecondaryDevice = (): boolean => {
|
138
|
-
const
|
139
|
-
|
140
|
-
|
138
|
+
const deviceFamilyName = this.getFamilyName();
|
139
|
+
|
140
|
+
const hasSecondaryCoreFlashSupport =
|
141
|
+
this.getModel()?.getImports()?.device_meta?.payload
|
142
|
+
?.hasSecondaryCoreFlashSupport ?? false;
|
143
|
+
|
144
|
+
/*
|
145
|
+
Device name ends with "S" followed by a digit.
|
146
|
+
The second part of the condition is for devices like Centaurus which have their inidividual flash.
|
147
|
+
|
148
|
+
*/
|
149
|
+
if (deviceFamilyName.match(/S\d$/) && !hasSecondaryCoreFlashSupport) {
|
141
150
|
return true;
|
142
151
|
}
|
143
152
|
return false;
|
@@ -300,7 +309,7 @@ class MyDerivedData implements DerivedData {
|
|
300
309
|
if (
|
301
310
|
interfaceData != undefined &&
|
302
311
|
this.dataModel?.getComponentValue("mainClockSource") !=
|
303
|
-
|
312
|
+
"FRC Oscillator with Postscaler"
|
304
313
|
) {
|
305
314
|
maxSystemClockFrequency =
|
306
315
|
interfaceData?.mainClockPayload?.maxSystemClockFrequency ?? 0;
|
@@ -333,6 +342,15 @@ class MyDerivedData implements DerivedData {
|
|
333
342
|
"CAN FD clock source frequency should be less than or equal to 640 MHz",
|
334
343
|
};
|
335
344
|
break;
|
345
|
+
case COMPONENT_MAIN_CLOCK_SOURCE:
|
346
|
+
if (this.shouldShowSecDeviceNotif()) {
|
347
|
+
uiBehavior = {
|
348
|
+
["ui:help"]: `Ensure to select ${this.dataModel.getComponentValue(
|
349
|
+
COMPONENT_MAIN_CLOCK_SOURCE,
|
350
|
+
)} as part of Main Device also`,
|
351
|
+
};
|
352
|
+
}
|
353
|
+
break;
|
336
354
|
default:
|
337
355
|
break;
|
338
356
|
}
|
@@ -362,9 +380,9 @@ class MyDerivedData implements DerivedData {
|
|
362
380
|
const canfdInterfaceRequests:
|
363
381
|
| Processor.Dictionary<any>
|
364
382
|
| undefined = this.dataModel
|
365
|
-
|
366
|
-
|
367
|
-
|
383
|
+
.getExportInterfaces()
|
384
|
+
.getInterface("canfd_clock", canfd_clock_interface.Interface.getInterfaceId())
|
385
|
+
?.args;
|
368
386
|
return canfdInterfaceRequests;
|
369
387
|
};
|
370
388
|
|
@@ -566,9 +584,39 @@ class MyDerivedData implements DerivedData {
|
|
566
584
|
}
|
567
585
|
}
|
568
586
|
|
587
|
+
if (this.shouldShowSecDeviceNotif()) {
|
588
|
+
alerts.push({
|
589
|
+
type: Processor.AlertTypes.Hint,
|
590
|
+
text: `Ensure to select ${this.dataModel?.getComponentValue(
|
591
|
+
COMPONENT_MAIN_CLOCK_SOURCE,
|
592
|
+
)} as clock source for the Main Device with frequency ${this.dataModel?.getComponentValue(
|
593
|
+
COMPONENT_MAIN_CLOCK_INPUT_FREQUENCY,
|
594
|
+
)}Hz`,
|
595
|
+
});
|
596
|
+
}
|
597
|
+
|
569
598
|
return alerts;
|
570
599
|
};
|
571
600
|
|
601
|
+
private shouldShowSecDeviceNotif = (): boolean => {
|
602
|
+
const deviceFamilyName = this.getFamilyName();
|
603
|
+
if (deviceFamilyName.match(/S\d$/)) {
|
604
|
+
if (
|
605
|
+
this.dataModel?.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE) ===
|
606
|
+
"Primary Oscillator" ||
|
607
|
+
this.dataModel?.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE) ===
|
608
|
+
"Primary Oscillator with PLL" ||
|
609
|
+
this.dataModel?.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE) ===
|
610
|
+
"External Oscillator" ||
|
611
|
+
this.dataModel?.getComponentValue(COMPONENT_MAIN_CLOCK_SOURCE) ===
|
612
|
+
"External Oscillator with PLL"
|
613
|
+
) {
|
614
|
+
return true;
|
615
|
+
}
|
616
|
+
}
|
617
|
+
return false;
|
618
|
+
};
|
619
|
+
|
572
620
|
private calculatedFunction = (): any => {
|
573
621
|
return;
|
574
622
|
};
|
@@ -1208,9 +1256,9 @@ class MyDerivedData implements DerivedData {
|
|
1208
1256
|
const clockApplicationInterfaceRequests:
|
1209
1257
|
| Processor.Dictionary<clock_16bit_drv_interface.Arguments>
|
1210
1258
|
| undefined = this.dataModel
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1259
|
+
.getExportInterfaces()
|
1260
|
+
.getInterface("clock_16bit_drv_interface", this.getClock16bitDrvInterfaceId())
|
1261
|
+
?.args;
|
1214
1262
|
const interfaceData: clock_16bit_config_interface.ProcessedPayload = this.dataModel.getImportValue(
|
1215
1263
|
CLOCK_16BIT_CONFIG_INTERFACE,
|
1216
1264
|
);
|