Also release owned Pins with Usart::free()#261
Conversation
This would mean that I think we can do better than storing the |
|
Reading back the pins from the peripheral is a nifty idea. Going to try that tomorrow. |
|
Cool stuff, thanks for doing this! I required this a few times already but just for debugging things and I just used unsfe for that :P
I fully agree with this :) |
jonas-schievink
left a comment
There was a problem hiding this comment.
Cool! Can you also add a changelog entry?
Avoid dupliaction where possible
Return ownership of the pins back to the user when calling
free()Useful to multiplex a single USARTE instance to multiple serial connections on different pins (for smaller NRF52 devices which only have one USARTE instance).
Alternative: Only take a reference to the pins in in
new().Please let me know which one is the preferred approach.