Unverified Commit f0910e66 authored by vortigont's avatar vortigont Committed by GitHub

add 'NO_GLOBAL_UPDATE' define to avoid creating global UpdateClass instance (#8500)

Save 180 bytes of ram if UpdateClass instance is not required
parent dbc060b1
...@@ -190,6 +190,8 @@ class UpdateClass { ...@@ -190,6 +190,8 @@ class UpdateClass {
uint8_t _ledOn; uint8_t _ledOn;
}; };
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE)
extern UpdateClass Update; extern UpdateClass Update;
#endif
#endif #endif
...@@ -414,4 +414,6 @@ bool UpdateClass::_chkDataInBlock(const uint8_t *data, size_t len) const { ...@@ -414,4 +414,6 @@ bool UpdateClass::_chkDataInBlock(const uint8_t *data, size_t len) const {
return false; return false;
} }
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE)
UpdateClass Update; UpdateClass Update;
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment