@mchp-mcc/scf-pic8-pwm-v2 4.2.3 → 4.2.4

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.
@@ -1,36 +1,27 @@
1
- /**
2
- ${moduleNameUpperCase} Generated Driver File
3
-
4
- @Company
5
- Microchip Technology Inc.
6
-
7
- @File Name
8
- ${moduleNameLowerCase}.c
9
-
10
- @Summary
11
- This is the generated driver implementation file for the ${moduleNameUpperCase} driver.
12
-
13
- @Description
14
- This source file provides APIs for driver for ${moduleNameUpperCase}.
15
- Generation Information :
16
- Driver Version : 2.01
17
- The generated drivers are tested against the following:
18
- Compiler : ${compiler}
19
- MPLAB : ${tool}
20
- */
1
+ /**
2
+ * ${moduleNameUpperCase} Generated Driver File
3
+ *
4
+ * @file ${moduleNameLowerCase}.c
5
+ *
6
+ * @ingroup ${moduleNameLowerCase}
7
+ *
8
+ * @brief This file contains the driver code for ${moduleNameUpperCase} module.
9
+ *
10
+ * @version ${moduleNameUpperCase} Driver Version 2.0.2
11
+ */
21
12
 
22
13
  ${disclaimer}
23
14
 
24
15
  /**
25
- Section: Included Files
26
- */
16
+ * Section: Included Files
17
+ */
27
18
 
28
19
  #include <xc.h>
29
20
  #include "../${header.name}"
30
21
 
31
22
  /**
32
- Section: PWM Module APIs
33
- */
23
+ * Section: PWM Module APIs
24
+ */
34
25
 
35
26
  void ${api.Initialize.name}(void)
36
27
  {
@@ -1,23 +1,14 @@
1
- /**
2
- ${moduleNameUpperCase} Generated Driver API Header File
3
-
4
- @Company
5
- Microchip Technology Inc.
6
-
7
- @File Name
8
- ${moduleNameLowerCase}.h
9
-
10
- @Summary
11
- This is the generated header file for the ${moduleNameUpperCase} driver.
12
-
13
- @Description
14
- This header file provides APIs for the ${moduleNameUpperCase} driver.
15
- Generation Information :
16
- Driver Version : 2.01
17
- The generated drivers are tested against the following:
18
- Compiler : ${compiler}
19
- MPLAB : ${tool}
20
- */
1
+ /**
2
+ * ${moduleNameUpperCase} Generated Driver API Header File
3
+ *
4
+ * @file ${moduleNameLowerCase}.h
5
+ *
6
+ * @defgroup ${moduleNameLowerCase} ${moduleNameUpperCase}
7
+ *
8
+ * @brief This header file provides APIs for the ${moduleNameUpperCase} driver.
9
+ *
10
+ * @version ${moduleNameUpperCase} Driver Version 2.0.2
11
+ */
21
12
 
22
13
  ${disclaimer}
23
14
 
@@ -25,77 +16,32 @@ ${disclaimer}
25
16
  #define ${moduleNameUpperCase}_H
26
17
 
27
18
  /**
28
- Section: Included Files
29
- */
19
+ * Section: Included Files
20
+ */
30
21
 
31
22
  #include <xc.h>
32
23
  #include <stdint.h>
33
24
 
34
25
  /**
35
- Section: Macro Declarations
26
+ * Section: Macro Declarations
36
27
  */
37
28
 
38
29
  #define ${moduleNameUpperCase}_INITIALIZE_DUTY_VALUE ${pwmdcValue}
39
30
 
40
- /**
41
- Section: PWM Module APIs
42
- */
43
-
44
- /**
45
- @Summary
46
- Initializes the ${moduleNameUpperCase}
47
-
48
- @Description
49
- This routine initializes the ${api.Initialize.name}
50
- This routine must be called before any other ${moduleNameUpperCase} routine is called.
51
- This routine should only be called once during system initialization.
52
31
 
53
- @Preconditions
54
- None
55
-
56
- @Param
57
- None
58
-
59
- @Returns
60
- None
61
-
62
- @Comment
63
-
64
-
65
- @Example
66
- <code>
67
- uint16_t dutycycle;
68
-
69
- ${api.Initialize.name}();
70
- ${api.LoadDutyValue.name}(dutycycle);
71
- </code>
72
- */
32
+ /**
33
+ * @ingroup ${moduleNameLowerCase}
34
+ * @brief This routine initializes the ${moduleNameUpperCase} interface.
35
+ * @param none
36
+ * @return none
37
+ */
73
38
  ${simpleApi.Initialize};
74
39
 
75
40
  /**
76
- @Summary
77
- Loads 16-bit duty cycle.
78
-
79
- @Description
80
- This routine loads the 16 bit duty cycle value.
81
-
82
- @Preconditions
83
- ${api.Initialize.name}() function should have been called
84
- before calling this function.
85
-
86
- @Param
87
- Pass 16bit duty cycle value.
88
-
89
- @Returns
90
- None
91
-
92
- @Example
93
- <code>
94
- uint16_t dutycycle;
95
-
96
- ${api.Initialize.name}();
97
- ${api.LoadDutyValue.name}(dutycycle);
98
- </code>
41
+ * @ingroup ${moduleNameLowerCase}
42
+ * @brief This routine loads the 16 bit duty cycle value.
43
+ * @param ${api.LoadDutyValue.arguments[0].type} ${api.LoadDutyValue.arguments[0].name} - load ${moduleNameUpperCase} duty cycle value.
44
+ * @return none
99
45
  */
100
46
  ${simpleApi.LoadDutyValue};
101
47
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mchp-mcc/scf-pic8-pwm-v2",
3
- "version": "4.2.3",
3
+ "version": "4.2.4",
4
4
  "scf": {
5
5
  "reducer": "auto",
6
6
  "creator": "output/creator.js",
@@ -10,8 +10,66 @@
10
10
  },
11
11
  "displayName": "PWM",
12
12
  "category": "Drivers/PWM",
13
- "nullPrototype": "output/nullPrototype.json"
13
+ "nullPrototype": "output/nullPrototype.json",
14
+ "autoProcessor": "output/autoProcessor.js",
15
+ "autoCreator": "output/autoCreator.js",
16
+ "prototype": {
17
+ "payload": null,
18
+ "imports": {
19
+ "scf_pic8_pwm_v2": {
20
+ "interfaceId": {
21
+ "name": "scf-pic8-pwm-v2",
22
+ "version": "1.0.0"
23
+ },
24
+ "isRequired": true
25
+ },
26
+ "initializer_system": {
27
+ "interfaceId": {
28
+ "name": "initializer-system",
29
+ "version": "^0.5.3"
30
+ }
31
+ },
32
+ "osc_clocks": {
33
+ "interfaceId": {
34
+ "name": "osc-clocks",
35
+ "version": "^0.2.0"
36
+ }
37
+ },
38
+ "Timer": {
39
+ "interfaceId": {
40
+ "name": "timer-2-4-6-general-parameters",
41
+ "version": "^0.2.0"
42
+ }
43
+ },
44
+ "pin_standard": {
45
+ "interfaceId": {
46
+ "name": "pin-standard",
47
+ "version": "^0.1.0"
48
+ }
49
+ },
50
+ "device_meta": {
51
+ "interfaceId": {
52
+ "name": "device-meta",
53
+ "version": "^1"
54
+ }
55
+ }
56
+ },
57
+ "exports": {
58
+ "pwm_general": {
59
+ "interfaces": [
60
+ {
61
+ "interfaceId": {
62
+ "name": "pwm_general_parameters",
63
+ "version": "0.1.0"
64
+ }
65
+ }
66
+ ]
67
+ }
68
+ },
69
+ "isEntryPoint": true
70
+ }
14
71
  },
72
+ "jenkinsPipeline": "MCU8_DS_PIPELINE_2XY",
15
73
  "scf-automodule": {
16
74
  "peripheral": {
17
75
  "deviceName": "PIC16F18875",
@@ -23,9 +81,10 @@
23
81
  },
24
82
  "mode": "standard",
25
83
  "hookPaths": {
26
- "processor": "generated_module/src/processor.tsx",
27
- "creator": "generated_module/src/creator.tsx"
28
- }
84
+ "processor": "generated_module/src/processor.ts",
85
+ "creator": "generated_module/src/creator.ts"
86
+ },
87
+ "shouldNotifyOnDeploy": false
29
88
  },
30
89
  "license": "SEE LICENSE IN LICENSE.txt",
31
90
  "scripts": {
@@ -45,7 +104,10 @@
45
104
  "build-prod": "gulp build --gulpfile config/gulpfile.js --production --cwd .",
46
105
  "profile": "jest profile",
47
106
  "build-run-dir-future": "node config/extract-run-directory-future.js",
48
- "release": "yarn build && yarn test && node -e 'require(\"./config/scf-project-scripts\").releaseProject()'"
107
+ "release": "yarn build && yarn test && node -e 'require(\"./config/scf-project-scripts\").releaseProject()'",
108
+ "test:itf:all": "node ./node_modules/@mchp-mcc/ccl-itf/lib/index.js --sp=./tests/itf --rd=./run",
109
+ "test:itf:dev": "node ./node_modules/@mchp-mcc/ccl-itf/lib/index.js --sp=./tests/itf --rd=./run --sf=pwmV2.major.test.ts --df=\"PIC16F18875|PIC16F18854|PIC16LF18856\"",
110
+ "postprocess": "node config/appendPrototype.js"
49
111
  },
50
112
  "husky": {
51
113
  "hooks": {
@@ -62,15 +124,13 @@
62
124
  "config.json",
63
125
  "src/**/*"
64
126
  ],
65
- "publishConfig": {
66
- "registry": "https://artifacts.microchip.com/artifactory/api/npm/npm/"
67
- },
68
127
  "jest": {
69
128
  "testPathIgnorePatterns": [
70
129
  "/node_modules/",
71
130
  "/run/",
72
131
  "/generated_module/examples/",
73
- "/lib/"
132
+ "/lib/",
133
+ "/tests/itf/"
74
134
  ],
75
135
  "modulePathIgnorePatterns": [
76
136
  "<rootDir>/run"
@@ -83,13 +143,12 @@
83
143
  "@microchip/basic_pin": "^1.0.2",
84
144
  "@microchip/fosc-hz": "^0.1.2",
85
145
  "@microchip/osc-clocks": "^0.2.0",
86
- "@microchip/pin-standard": "^0.2.11",
87
- "@microchip/scf-automodule-interface": "^0.15.3",
88
- "@microchip/scf-common": "^3.10.0",
89
- "@microchip/scf-device": "^8.0.0",
146
+ "@microchip/pin-standard": "^0.2.14",
147
+ "@microchip/scf-common": "^3.17.0",
148
+ "@microchip/scf-device": "^8.5.0",
90
149
  "@microchip/scf-integration-test": "^1.0.0",
91
150
  "@microchip/scf-interface": "^1.4.0",
92
- "@microchip/scf-register-view-helper": "^2.4.0",
151
+ "@microchip/scf-register-view-helper": "^2.5.0",
93
152
  "@microchip/timer-2-4-6-general-parameters": "^0.2.0",
94
153
  "core-js": "^3.6.5",
95
154
  "lodash.filter": "^4.6.0",
@@ -102,11 +161,16 @@
102
161
  "@babel/preset-env": "^7.9.6",
103
162
  "@babel/preset-react": "^7.9.4",
104
163
  "@babel/preset-typescript": "^7.9.0",
164
+ "@mchp-mcc/ccl-itf": "^0.2.16",
165
+ "@mchp-mcc/pic-8bit": "^5.4.5",
166
+ "@mchp-mcc/pic-8bit-types": "^5.4.1",
105
167
  "@microchip/initializer-system": "^0.5.3",
168
+ "@microchip/melody-automodule-interface": "^1.5.1",
106
169
  "@microchip/pic-8bit-types": "^5.0.1",
107
- "@microchip/run-directory": "^2.3.81",
108
- "@microchip/scf-automodule": "^4.10.4",
109
- "@microchip/scf-autoview": "^3.11.0",
170
+ "@microchip/run-directory": "^3.3.0",
171
+ "@microchip/scf-automodule": "^5.5.1",
172
+ "@microchip/scf-automodule-impl": "^1.7.1",
173
+ "@microchip/scf-autoview": "^3.26.1",
110
174
  "@microchip/scf-project-scripts": "^1.0.0",
111
175
  "@types/core-js": "^2.5.1",
112
176
  "@types/enzyme": "^3.9.3",
@@ -157,7 +221,5 @@
157
221
  },
158
222
  "description": "- Download & Install [nodejs](https://nodejs.org/en/download/)\r - Download & Install npm\r - Setup node & npm in enviroment path",
159
223
  "main": "lib/generated_module/src/index.js",
160
- "author": "",
161
- "notificationEmail": "de15b1e6.microchip.com@amer.teams.ms",
162
- "bitBucketRepository": "https://bitbucket.microchip.com/projects/cc8scrip/repos/scf-pic8-pwm-v2/browse"
163
- }
224
+ "author": ""
225
+ }
@@ -1,5 +1,5 @@
1
- import { CreatorFunctions } from "@microchip/scf-automodule-interface/lib/src/CreatorFunctions";
2
- import { State } from "../generated_module/src/creator";
1
+ import { CreatorFunctions } from "@microchip/melody-automodule-interface/lib/src/CreatorFunctions";
2
+ import { State } from "../generated_module/src/types/State";
3
3
 
4
4
  export const getCreatorFunctions = (): CreatorFunctions => {
5
5
  return {
@@ -9,7 +9,8 @@ import * as pwm_general from "./interfaces/pwm_general_parameters";
9
9
  import * as initializer_system from "@microchip/initializer-system";
10
10
  import { Interface, Arguments } from "@microchip/scf-interface";
11
11
  import { getGeneratorModel, getHeaderFiles } from "./GeneratorModel";
12
- import { MyExportNames } from "../generated_module/src/types";
12
+ import { MyComponentNames, MyExportNames } from "../generated_module/src/types";
13
+ import { getAutoSdlHelp } from "@microchip/scf-automodule-impl/lib/autoModule/ContextualHelp";
13
14
 
14
15
  export const getDerivedData = (dataModel: AppModel): DerivedData => {
15
16
  if (dataModel) {
@@ -75,6 +76,7 @@ class MyDerivedData implements DerivedData {
75
76
  Number(this.dataModel.getComponentValue("pwmdcValue")) & 3,
76
77
 
77
78
  templateData: (): any => getGeneratorModel(this.dataModel),
79
+ getHelpUrl: this.getSdlHelpOverride,
78
80
  };
79
81
  };
80
82
 
@@ -159,6 +161,26 @@ class MyDerivedData implements DerivedData {
159
161
  return alerts;
160
162
  };
161
163
 
164
+ private getSdlHelpOverride = (
165
+ componentName: MyComponentNames,
166
+ helpUrl: string,
167
+ ): string => {
168
+ if (componentName === "timerSelection") {
169
+ if (this.getModel().getPeripheralDescription()?.registers?.CCPTMRS1) {
170
+ componentName = "ctselCcptmrs1";
171
+ } else if (this.getModel().getPeripheralDescription()?.registers?.CCPTMRS) {
172
+ componentName = "ctselCcptmrs";
173
+ }
174
+ } else if (componentName === "dutyCycle" || componentName === "pwmdcValue") {
175
+ helpUrl = helpUrl?.replace(
176
+ "${instance}",
177
+ this.getModel().getHardware()?.getName() ?? "",
178
+ );
179
+ }
180
+
181
+ return getAutoSdlHelp(this.getModel(), componentName, helpUrl);
182
+ };
183
+
162
184
  private pwm_general_parameters_payload = (): pwm_general.ProcessedPayload => {
163
185
  return {
164
186
  interfaceApi: pwm_general.Interface.createFirmwareApi(
@@ -0,0 +1,23 @@
1
+ {
2
+ "name": "@mchp-mcc/local-catalog",
3
+ "version": "1.0.0",
4
+ "content": [
5
+ {
6
+ "name": "@mchp-mcc/scf-pic8-pwm-v2",
7
+ "version": "*",
8
+ "meta": {
9
+ "keywords": [
10
+ "pic8",
11
+ "pwm"
12
+ ],
13
+ "defaultSelection": "defaultRequired",
14
+ "name": "PWM",
15
+ "category": "Drivers/PWM",
16
+ "description": "This module is a 16-bit Pulse-Width Modulator (PWM) with a compare feature and multiple outputs.",
17
+ "deviceFilterRegEx": "^PIC18F.*Q10$|^PIC16[L]{0,1}F188.*$|^PIC16F152.*$|^PIC16F180[57][45]$",
18
+ "releaseNotesLink": "https://onlinedocs.microchip.com/v2/keyword-lookup?keyword=MCC.MELODY.8BITPIC.RELEASENOTES&version=latest&redirect=true"
19
+ }
20
+ }
21
+ ],
22
+ "catalogs": []
23
+ }
@@ -30,6 +30,19 @@
30
30
  "main": "Easy View",
31
31
  "register": "Register Initialization"
32
32
  },
33
+ "analytics": {
34
+ "logAlwaysComps": [
35
+ "pwmenPwmcon",
36
+ "pwmFrequency",
37
+ "pwmResolution"
38
+ ],
39
+ "logOnChangeComps": [],
40
+ "compMapping": {
41
+ "pwmenPwmcon": "PWM_Enable",
42
+ "pwmFrequency": "PWM_Frequency",
43
+ "pwmResolution": "PWM_Resolution"
44
+ }
45
+ },
33
46
  "templates": [
34
47
  {
35
48
  "src": "output/pwm-v2.c.ftl",
@@ -87,6 +100,14 @@
87
100
  "version": "^0.1.0"
88
101
  }
89
102
  }
103
+ },
104
+ "device_meta": {
105
+ "import": {
106
+ "interfaceId": {
107
+ "name": "device-meta",
108
+ "version": "^1"
109
+ }
110
+ }
90
111
  }
91
112
  },
92
113
  "exports": {
@@ -129,7 +150,11 @@
129
150
  "tabs": [
130
151
  "main"
131
152
  ],
132
- "category": "software"
153
+ "category": "software",
154
+ "sdlHelp": {
155
+ "tooltip": "Click for more Information",
156
+ "url": "v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true"
157
+ }
133
158
  },
134
159
  "dutyCycle": {
135
160
  "name": "dutyCycle",
@@ -141,7 +166,11 @@
141
166
  "tabs": [
142
167
  "main"
143
168
  ],
144
- "category": "software"
169
+ "category": "software",
170
+ "sdlHelp": {
171
+ "tooltip": "Click for more Information",
172
+ "url": "v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true"
173
+ }
145
174
  },
146
175
  "pwmdcValue": {
147
176
  "name": "pwmdcValue",
@@ -155,7 +184,11 @@
155
184
  "tabs": [
156
185
  "main"
157
186
  ],
158
- "category": "software"
187
+ "category": "software",
188
+ "sdlHelp": {
189
+ "tooltip": "Click for more Information",
190
+ "url": "v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${instance}DC&redirect=true"
191
+ }
159
192
  },
160
193
  "pwmPeriod": {
161
194
  "name": "pwmPeriod",
@@ -243,7 +276,11 @@
243
276
  "tabs": [
244
277
  "main"
245
278
  ],
246
- "category": "hardware"
279
+ "category": "hardware",
280
+ "sdlHelp": {
281
+ "tooltip": "Click for more Information",
282
+ "url": "v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true"
283
+ }
247
284
  },
248
285
  {
249
286
  "setting": "PWMOUT",
@@ -266,7 +303,11 @@
266
303
  "tabs": [
267
304
  "main"
268
305
  ],
269
- "category": "hardware"
306
+ "category": "hardware",
307
+ "sdlHelp": {
308
+ "tooltip": "Click for more Information",
309
+ "url": "v2/keyword-lookup?keyword=atmel;device:${deviceName};register:${registerName}&redirect=true"
310
+ }
270
311
  }
271
312
  ],
272
313
  "PWMDCH": [