@mchp-mcc/dspic33a-flash 1.0.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.
@@ -0,0 +1,101 @@
1
+
2
+ /**
3
+ * ${moduleNameLowerCase} Generated Driver Types Header File
4
+ *
5
+ * @file ${moduleNameLowerCase}_types.h
6
+ *
7
+ * @ingroup ${moduleNameLowerCase}driver
8
+ *
9
+ * @brief ${moduleNameUpperCase} Driver using dsPIC MCUs
10
+ *
11
+ * @skipline @version Firmware Driver Version 1.0.0
12
+ <#if generatePLIBVersion == true>
13
+ *
14
+ * @skipline @version PLIB Version ${PLIBVersion}
15
+ </#if>
16
+ *
17
+ * @skipline Device : ${selectedDevice}
18
+ */
19
+
20
+ ${disclaimer}
21
+
22
+ #ifndef ${moduleNameUpperCase}_TYPES_H
23
+ #define ${moduleNameUpperCase}_TYPES_H
24
+ /**
25
+ @ingroup ${moduleNameLowerCase}driver
26
+ @brief Defines ${moduleNameUpperCase} odd address mask value
27
+ */
28
+ #define FLASH_ADDRESS_MASK 4U
29
+ /**
30
+ @ingroup ${moduleNameLowerCase}driver
31
+ @brief Defines ${moduleNameUpperCase} unlock key
32
+ */
33
+ #define FLASH_UNLOCK_KEY ${flashUnlockKey}
34
+ /**
35
+ @ingroup ${moduleNameLowerCase}driver
36
+ @brief Defines ${moduleNameUpperCase} page erase opcode
37
+ */
38
+ #define FLASH_PAGE_ERASE_OPCODE ${flashPageEraseOpcode}
39
+ /**
40
+ @ingroup ${moduleNameLowerCase}driver
41
+ @brief Defines ${moduleNameUpperCase} word write opcode
42
+ */
43
+ #define FLASH_WORD_WRITE_OPCODE ${flashWordWriteOpCode}
44
+ /**
45
+ @ingroup ${moduleNameLowerCase}driver
46
+ @brief Defines ${moduleNameUpperCase} word write opcode
47
+ */
48
+ #define FLASH_ROW_WRITE_OPCODE ${flashRowWriteOpcode}
49
+ /**
50
+ @ingroup ${moduleNameLowerCase}driver
51
+ @brief Defines ${moduleNameUpperCase} flash page size
52
+ */
53
+ #define FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS ${flashErasePageSizeInInstructions}U
54
+ /**
55
+ @ingroup ${moduleNameLowerCase}driver
56
+ @brief Defines ${moduleNameUpperCase} erase page mask
57
+ */
58
+ #define FLASH_ERASE_PAGE_MASK (~(FLASH_ERASE_PAGE_SIZE_IN_INSTRUCTIONS - 1U))
59
+
60
+ typedef void (*FLASH_CALLBACK)(void *);
61
+
62
+ typedef uint32_t flash_adr_t;
63
+ typedef ${flashInstructionType} flash_data_t;
64
+ typedef uint32_t flash_key_t;
65
+
66
+ /**
67
+ @ingroup ${moduleNameLowerCase}driver
68
+ @enum FLASH_PANEL
69
+ @brief This enum is be used for the flash panel numbers and maximum flash panels.
70
+ */
71
+ enum FLASH_PANEL
72
+ {
73
+ FLASH_PANEL_1 = 0,
74
+ FLASH_PANEL_2 = 1,
75
+ FLASH_PANEL_MAX_PANELS
76
+ };
77
+
78
+ /**
79
+ @ingroup ${moduleNameLowerCase}driver
80
+ @enum FLASH_RETURN_STATUS
81
+ @brief This enum is be used to return the status of write, read and erase operation.
82
+ */
83
+ enum FLASH_RETURN_STATUS {
84
+ FLASH_NO_ERROR, /**< No error occurred */
85
+ FLASH_INVALID_ADDRESS, /**< Invalid address */
86
+ FLASH_INVALID_DATA, /**< Invalid data */
87
+ FLASH_WRITE_ERROR, /**< Write error has occurred */
88
+ FLASH_READ_ERROR, /**< Read error has occurred */
89
+ FLASH_ERASE_ERROR, /**< Flash erase error occurred */
90
+ FLASH_INVALID_CALLBACK_HANDLER, /**< Invalid parameter to operation */
91
+ FLASH_OP_BUSY, /**< Flash is physically busy */
92
+ FLASH_OP_IN_PROGRESS, /**< Flash operation is in progress */
93
+ FLASH_INVALID_KEY, /**< Invalid NVM unlock Key */
94
+ FLASH_INVALID_OEPRATION, /**< Invalid program/erase operation (PROGOP) */
95
+ FLASH_SECURITY_ACCESS_CONTROL_ERROR, /**< Flash Security access control violation */
96
+ FLASH_PANEL_CONTROL_LOGIC_ERROR, /**< Error reported by flash panel control logic */
97
+ FLASH_ROW_OP_SYSTEM_BUS_ERROR, /**< Flash System bus error during row operation */
98
+ FLASH_ROW_OP_WARM_RESET_ERROR /**< Row programming operation not completed due to warm reset */
99
+ };
100
+
101
+ #endif //${moduleNameUpperCase}_TYPES_H
@@ -0,0 +1,43 @@
1
+ {
2
+ "payload": null,
3
+ "imports": {
4
+ "nvm_ctrl_32bit_upb_v1": {
5
+ "interfaceId": {
6
+ "name": "nvm_ctrl_32bit_upb_v1",
7
+ "version": "1.0.0"
8
+ },
9
+ "isRequired": true
10
+ },
11
+ "system_16bit_initializer": {
12
+ "interfaceId": {
13
+ "name": "system-16bit-initializer",
14
+ "version": "^1.0.0"
15
+ }
16
+ },
17
+ "config_16bit_interface": {
18
+ "interfaceId": {
19
+ "name": "config-16bit-interface",
20
+ "version": "^1.0.0"
21
+ }
22
+ },
23
+ "interrupt_service": {
24
+ "interfaceId": {
25
+ "name": "interrupt-16bit-interface",
26
+ "version": "^1.0.0"
27
+ }
28
+ }
29
+ },
30
+ "exports": {
31
+ "flash_interface": {
32
+ "interfaces": [
33
+ {
34
+ "interfaceId": {
35
+ "name": "flash-interface",
36
+ "version": "1.3.1"
37
+ }
38
+ }
39
+ ]
40
+ }
41
+ },
42
+ "isEntryPoint": false
43
+ }