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

Save 180 bytes of ram if UpdateClass instance is not required
This commit is contained in:
vortigont 2023-08-29 19:57:31 +09:00 committed by GitHub
parent dbc060b181
commit f0910e66a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View file

@ -190,6 +190,8 @@ class UpdateClass {
uint8_t _ledOn;
};
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE)
extern UpdateClass Update;
#endif
#endif

View file

@ -414,4 +414,6 @@ bool UpdateClass::_chkDataInBlock(const uint8_t *data, size_t len) const {
return false;
}
#if !defined(NO_GLOBAL_INSTANCES) && !defined(NO_GLOBAL_UPDATE)
UpdateClass Update;
#endif