You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Previously, these were implicit in the default values of some global
variables. Now, the default timeout is defined in twi.h and exposed
through Wire.h, which:
- Makes it easier to change later
- Allows sketches to detect the default timeout value
Note that this definition is split between twi.h and Wire.h to ensure
that the default values are available as compile-time constants in twi.c
(which allows for more efficient initialization than e.g. writing these
values from the Wire constructor or from the begin() method, where the
latter has the extra downside of potentially overwriting values
previously set with setWireTimeout() if begin() is called again).
Additionally, since twi does not currently depend on Wire.h, defining
these values in Wire.h and using them in twi.c was not feasible without
breaking adding this extra dependency, so instead this commit defines
the values in twi and then re-exposes them in Wire.h (with the intention
of sketches referring to the Wire.h versions, not the twi.h versions).
See #362 for additional discussion.
0 commit comments