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
PinGuard's sole purpose is to disconnect the pin when it is dropped. The
only thing really required to do so is the contained pin number. The
signal that it is connected to was in fact never used, but stored in the
struct anyway. This changes PinGuard to only store the pin number, with
pin number 0xFF still indicating an unconnected PinGuard.
Previously, the size of PinGuard was 2 or 4, depending on device.
With this change, PinGuard takes 1 or 2 bytes.
In each case, Option<PinGuard> and PinGuard have identical size due to
taking advantage of niches in the OutputSignal enum.
Additionally, this replaces all uses of Option<PinGuard> by plain
PinGuard: From my understanding, there was no meaningful difference
between Option<PinGuard> and PinGuard::new_unconnected() (both implying
that nothing should happen on Drop).
One consequence is that PinGuard::new_unconnected() can now be
constructed without being able to name an output signal. This will be
useful for the RMT driver, which uses the same Channel struct for rx and
tx configuration (Channel does not presently contain a PinGuard, but
arguably, it should).
0 commit comments