Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f0910e6

Browse filesBrowse files
authored
add 'NO_GLOBAL_UPDATE' define to avoid creating global UpdateClass instance (espressif#8500)
Save 180 bytes of ram if UpdateClass instance is not required
1 parent dbc060b commit f0910e6
Copy full SHA for f0910e6

File tree

Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed

‎libraries/Update/src/Update.h

Copy file name to clipboardExpand all lines: libraries/Update/src/Update.h
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,8 @@ class UpdateClass {
190190
uint8_t _ledOn;
191191
};
192192

193+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE)
193194
extern UpdateClass Update;
195+
#endif
194196

195197
#endif

‎libraries/Update/src/Updater.cpp

Copy file name to clipboardExpand all lines: libraries/Update/src/Updater.cpp
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,4 +414,6 @@ bool UpdateClass::_chkDataInBlock(const uint8_t *data, size_t len) const {
414414
return false;
415415
}
416416

417+
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE)
417418
UpdateClass Update;
419+
#endif

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.