We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
canopen_app_init
1 parent c7fb1de commit 3bb3c9cCopy full SHA for 3bb3c9c
1 file changed
CANopenNode_STM32/CO_app_STM32.c
@@ -63,12 +63,12 @@ canopen_app_init(CANopenNodeSTM32* _canopenNodeSTM32) {
63
canopenNodeSTM32 = _canopenNodeSTM32;
64
65
#if (CO_CONFIG_STORAGE) & CO_CONFIG_STORAGE_ENABLE
66
- CO_storage_t storage;
67
- CO_storage_entry_t storageEntries[] = {{.addr = &OD_PERSIST_COMM,
68
- .len = sizeof(OD_PERSIST_COMM),
69
- .subIndexOD = 2,
70
- .attr = CO_storage_cmd | CO_storage_restore,
71
- .addrNV = NULL}};
+ static CO_storage_t storage;
+ static CO_storage_entry_t storageEntries[] = {{.addr = &OD_PERSIST_COMM,
+ .len = sizeof(OD_PERSIST_COMM),
+ .subIndexOD = 2,
+ .attr = CO_storage_cmd | CO_storage_restore,
+ .addrNV = NULL}};
72
uint8_t storageEntriesCount = sizeof(storageEntries) / sizeof(storageEntries[0]);
73
uint32_t storageInitError = 0;
74
#endif
0 commit comments