This PR adds a `DynamicPin which can change direction at runtime. I've also taken the liberty to refactor some duplicate code into helpers.
Also adds an example that demonstrates how to use these.
The current limitation is that the pin id is still baked into a DynamicPin's type, which makes it difficult to e.g. pass a bunch of these around in a collection to pick and reconfigure them at runtime. I'm working on a solution for this that's probably a breaking change to this PR, but am only ~halfway there.
This PR adds a `DynamicPin which can change direction at runtime. I've also taken the liberty to refactor some duplicate code into helpers.
Also adds an example that demonstrates how to use these.
The current limitation is that the pin id is still baked into a DynamicPin's type, which makes it difficult to e.g. pass a bunch of these around in a collection to pick and reconfigure them at runtime. I'm working on a solution for this that's probably a breaking change to this PR, but am only ~halfway there.